From: Ferruh Yigit Date: Fri, 20 Apr 2018 00:01:24 +0000 (+0100) Subject: drivers/net: fix link autoneg value for virtual PMDs X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=18869f97f163a58d29d45a2e85c6ed444b1c72e1;p=dpdk.git drivers/net: fix link autoneg value for virtual PMDs These drivers never attempt link speed negotiation. Change link_autoneg value to ETH_LINK_FIXED to be more accurate and consistent between PMDs. Fixes: 1e3a958f40b3 ("ethdev: fix link autonegotiation value") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Acked-by: Thomas Monjalon --- diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index b394d3cb29..428a4c81c6 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -94,7 +94,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_AUTONEG + .link_autoneg = ETH_LINK_FIXED, }; static uint16_t diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 35a6d3ef72..77ac4f2b24 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -61,7 +61,7 @@ static const 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_AUTONEG, + .link_autoneg = ETH_LINK_FIXED, }; static int is_kni_initialized; diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 6413a90642..d3b002c5f3 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -89,7 +89,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_AUTONEG, + .link_autoneg = ETH_LINK_FIXED, }; static uint16_t diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 570c9e984d..932cf3ce82 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -96,7 +96,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_AUTONEG, + .link_autoneg = ETH_LINK_FIXED, }; static int diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index e53823adb3..c05f5a1e4f 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -60,7 +60,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_AUTONEG + .link_autoneg = ETH_LINK_FIXED, }; static uint16_t diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c index e3243940cb..1fb010e295 100644 --- a/drivers/net/softnic/rte_eth_softnic.c +++ b/drivers/net/softnic/rte_eth_softnic.c @@ -522,7 +522,7 @@ pmd_ethdev_register(struct rte_vdev_device *vdev, soft_dev->data->dev_private = dev_private; soft_dev->data->dev_link.link_speed = hard_speed; soft_dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX; - soft_dev->data->dev_link.link_autoneg = ETH_LINK_AUTONEG; + soft_dev->data->dev_link.link_autoneg = ETH_LINK_FIXED; soft_dev->data->dev_link.link_status = ETH_LINK_DOWN; soft_dev->data->mac_addrs = ð_addr; soft_dev->data->promiscuous = 1; diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index ef33aace91..07dfacbcdf 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -76,7 +76,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_AUTONEG + .link_autoneg = ETH_LINK_FIXED, }; static void