summaryrefslogtreecommitdiff
path: root/drivers/net/af_packet
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-01-05 18:38:55 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-16 18:47:49 +0100
commit1e3a958f40b305d66e8d067121a30efbd2753f2a (patch)
tree5794e55dd82fb60946d166ca7aa2a44833f4935b /drivers/net/af_packet
parent35906acbf34daa32469fa63d759846057f36e6fb (diff)
downloaddpdk-next-eventdev-1e3a958f40b305d66e8d067121a30efbd2753f2a.zip
dpdk-next-eventdev-1e3a958f40b305d66e8d067121a30efbd2753f2a.tar.gz
dpdk-next-eventdev-1e3a958f40b305d66e8d067121a30efbd2753f2a.tar.xz
ethdev: fix link autonegotiation value
There are 3 kind of link data in ethdev: - capabilities (rte_eth_dev_info) - configuration (rte_eth_conf) - status (rte_eth_link) A bit-field is used for capabilities (rte_eth_dev_info.speed_capa) and configuration (rte_eth_conf.link_speeds). Bits are defined in ETH_LINK_SPEED_*. Some numerical (ETH_SPEED_NUM_*) and boolean (ETH_LINK_*) values are used for the link status (rte_eth_link.*). There was a mistake in the comment of rte_eth_link.link_autoneg, suggesting ETH_LINK_SPEED_[AUTONEG/FIXED] which are 0/1, instead of ETH_LINK_[AUTONEG/FIXED] which are 1/0. The drivers are fixed to use ETH_LINK_[AUTONEG/FIXED]. Fixes: 82113036e4e5 ("ethdev: redesign link speed config") Suggested-by: Andrew Rybchenko <arybchenko@solarflare.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'drivers/net/af_packet')
-rw-r--r--drivers/net/af_packet/rte_eth_af_packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index fa84eb9..d515408 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -124,7 +124,7 @@ static struct rte_eth_link pmd_link = {
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_DOWN,
- .link_autoneg = ETH_LINK_SPEED_AUTONEG
+ .link_autoneg = ETH_LINK_AUTONEG
};
static uint16_t