drivers/net: fix link autoneg value for virtual PMDs
authorFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Apr 2018 00:01:24 +0000 (01:01 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 16:34:43 +0000 (17:34 +0100)
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 <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
drivers/net/af_packet/rte_eth_af_packet.c
drivers/net/kni/rte_eth_kni.c
drivers/net/null/rte_eth_null.c
drivers/net/pcap/rte_eth_pcap.c
drivers/net/ring/rte_eth_ring.c
drivers/net/softnic/rte_eth_softnic.c
drivers/net/tap/rte_eth_tap.c

index b394d3c..428a4c8 100644 (file)
@@ -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
index 35a6d3e..77ac4f2 100644 (file)
@@ -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;
 
index 6413a90..d3b002c 100644 (file)
@@ -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
index 570c9e9..932cf3c 100644 (file)
@@ -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
index e53823a..c05f5a1 100644 (file)
@@ -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
index e324394..1fb010e 100644 (file)
@@ -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 = &eth_addr;
        soft_dev->data->promiscuous = 1;
index ef33aac..07dfacb 100644 (file)
@@ -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