]> git.droids-corp.org - dpdk.git/commitdiff
drivers/net: update link status
authorFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Apr 2018 11:30:35 +0000 (12:30 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 14:54:56 +0000 (15:54 +0100)
Update link status related feature document items and minor updates in
some link status related functions.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
19 files changed:
doc/guides/nics/features/avf.ini
doc/guides/nics/features/avf_vec.ini
doc/guides/nics/features/fm10k.ini
doc/guides/nics/features/fm10k_vf.ini
doc/guides/nics/features/i40e_vf.ini
doc/guides/nics/features/i40e_vf_vec.ini
doc/guides/nics/features/igb_vf.ini
doc/guides/nics/features/qede.ini
doc/guides/nics/features/qede_vf.ini
doc/guides/nics/features/vhost.ini
doc/guides/nics/features/virtio.ini
doc/guides/nics/features/virtio_vec.ini
drivers/net/e1000/em_ethdev.c
drivers/net/ena/ena_ethdev.c
drivers/net/fm10k/fm10k_ethdev.c
drivers/net/i40e/i40e_ethdev_vf.c
drivers/net/ixgbe/ixgbe_ethdev.c
drivers/net/mlx4/mlx4_ethdev.c
drivers/net/mlx5/mlx5_ethdev.c

index ccb9edde325e6b8f96ca0440822675065222cd0a..35ceada24fee3ca8505bb3c1d30013ba5b98da08 100644 (file)
@@ -6,7 +6,6 @@
 [Features]
 Speed capabilities   = Y
 Link status          = Y
-Link status event    = Y
 Rx interrupt         = Y
 Queue start/stop     = Y
 MTU update           = Y
index 8924994856aa06f20d88751941ca630611278f8a..3050bc4a60febb480889b576413f5d9ab19e5219 100644 (file)
@@ -6,7 +6,6 @@
 [Features]
 Speed capabilities   = Y
 Link status          = Y
-Link status event    = Y
 Rx interrupt         = Y
 Queue start/stop     = Y
 MTU update           = Y
index f0f61a7d7daff10f786caea4035229d3fcb447d9..58f58b99c3207f856815c996cb0685581d5cf674 100644 (file)
@@ -5,6 +5,8 @@
 ;
 [Features]
 Speed capabilities   = P
+Link status          = Y
+Link status event    = Y
 Rx interrupt         = Y
 Queue start/stop     = Y
 Jumbo frame          = Y
index 32b93df4be7409328b8e93229becfc81ee2f1be0..44b50faa1349cd1f57a5b8b7cd91e46386561a55 100644 (file)
@@ -5,6 +5,8 @@
 ;
 [Features]
 Speed capabilities   = P
+Link status          = Y
+Link status event    = Y
 Rx interrupt         = Y
 Queue start/stop     = Y
 Jumbo frame          = Y
index 46e0d9fce302890bcb9607679047908ae0c9bee9..ba2d8cbe922628f32ac20aaa241f29edf083b61d 100644 (file)
@@ -5,6 +5,7 @@
 ;
 [Features]
 Rx interrupt         = Y
+Link status          = Y
 Queue start/stop     = Y
 Jumbo frame          = Y
 Scattered Rx         = Y
index c2c6c19fee4bbd716273d8087c46aa41176f0b41..421ed919326953fc7981cf66e1e74262e0e593ff 100644 (file)
@@ -5,6 +5,7 @@
 ;
 [Features]
 Rx interrupt         = Y
+Link status          = Y
 Queue start/stop     = Y
 Jumbo frame          = Y
 Scattered Rx         = Y
index e641a2c975a248d3cae6e4ccc8ab0fc8dbddb14b..d9653234b56725064691b0ecc3d7b345ca1a0609 100644 (file)
@@ -4,6 +4,7 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Features]
+Link status          = Y
 Rx interrupt         = Y
 Scattered Rx         = Y
 TSO                  = Y
index 605cfa968cd7a8bb24288417e10d55711000f200..2d6af365ed8d3253f50417f55a76bddc6de5e2d4 100644 (file)
@@ -6,7 +6,6 @@
 [Features]
 Speed capabilities   = Y
 Link status          = Y
-Link status event    = Y
 MTU update           = Y
 Jumbo frame          = Y
 Scattered Rx         = Y
index 18857b6e3ee1da7ac1ac35e863a2a17254b11fa7..70071a1bdaeb8552e056faaaa248c75a31cdac10 100644 (file)
@@ -6,7 +6,6 @@
 [Features]
 Speed capabilities   = Y
 Link status          = Y
-Link status event    = Y
 MTU update           = Y
 Jumbo frame          = Y
 Scattered Rx         = Y
index dffd1f49399ef6bdbab512cd7b8521c8b8b0a374..ef81abb439a34870f431c38f767128a7e85f53c3 100644 (file)
@@ -5,7 +5,6 @@
 ;
 [Features]
 Link status          = Y
-Link status event    = Y
 Free Tx mbuf on demand = Y
 Queue status event   = Y
 Basic stats          = Y
index 16e577df0d60f829efc6a1b9ed91fcf9efc212cc..a16b8172140a21529d521f2ac4f3ee4d363d0d11 100644 (file)
@@ -6,6 +6,7 @@
 [Features]
 Speed capabilities   = P
 Link status          = Y
+Link status event    = Y
 Rx interrupt         = Y
 Queue start/stop     = Y
 Scattered Rx         = Y
index c06c860d4bbe2f42da2b6af04331dd800e7230bd..e60fe36aeb70557ef00651305b7b31c363a01f74 100644 (file)
@@ -6,6 +6,7 @@
 [Features]
 Speed capabilities   = P
 Link status          = Y
+Link status event    = Y
 Rx interrupt         = Y
 Queue start/stop     = Y
 Promiscuous mode     = Y
index de7db2650e8edddabb4eed7146e2c205d8458f78..694a6242c70a652f4852a3dd0f6d3eb7a3a88b0c 100644 (file)
@@ -1183,7 +1183,7 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
                link.link_autoneg = !(dev->data->dev_conf.link_speeds &
                                ETH_LINK_SPEED_FIXED);
        } else if (!link_check && (link.link_status == ETH_LINK_UP)) {
-               link.link_speed = 0;
+               link.link_speed = ETH_SPEED_NUM_NONE;
                link.link_duplex = ETH_LINK_HALF_DUPLEX;
                link.link_status = ETH_LINK_DOWN;
                link.link_autoneg = ETH_LINK_FIXED;
index ab4e2af91bc12b1bd3bd3a0d8fc61ed5f2ac658d..41b5638fd60fb0065952509847d16b404f134813 100644 (file)
@@ -728,7 +728,7 @@ static int ena_link_update(struct rte_eth_dev *dev,
 {
        struct rte_eth_link *link = &dev->data->dev_link;
 
-       link->link_status = 1;
+       link->link_status = ETH_LINK_UP;
        link->link_speed = ETH_SPEED_NUM_10G;
        link->link_duplex = ETH_LINK_FULL_DUPLEX;
 
index 34affd1cc99087577094b5cde64fb6a6bd4b8524..7dfeddfe04f2c5ffc3e0952817477ea2d61991a5 100644 (file)
@@ -1260,13 +1260,11 @@ fm10k_link_update(struct rte_eth_dev *dev,
                FM10K_DEV_PRIVATE_TO_INFO(dev->data->dev_private);
        PMD_INIT_FUNC_TRACE();
 
-       /* The speed is ~50Gbps per Gen3 x8 PCIe interface. For now, we
-        * leave the speed undefined since there is no 50Gbps Ethernet.
-        */
-       dev->data->dev_link.link_speed  = 0;
+       dev->data->dev_link.link_speed  = ETH_SPEED_NUM_50G;
        dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX;
        dev->data->dev_link.link_status =
                dev_info->sm_down ? ETH_LINK_DOWN : ETH_LINK_UP;
+       dev->data->dev_link.link_autoneg = ETH_LINK_FIXED;
 
        return 0;
 }
index 031c70680877f30c633ec26f73fabc9d7330083f..48e7ac21e0e7e9b69898f7672959a1bdaffe92d5 100644 (file)
@@ -2112,7 +2112,7 @@ i40evf_dev_link_update(struct rte_eth_dev *dev,
        new_link.link_status = vf->link_up ? ETH_LINK_UP :
                                             ETH_LINK_DOWN;
        new_link.link_autoneg =
-               dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED;
+               !(dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED);
 
        return rte_eth_linkstatus_set(dev, &new_link);
 }
index 33ee52e45d89d3b21032ab6b750bbbd6596827f7..73a24b88aff97cff2732ccc8b13c4c4aa63a60a4 100644 (file)
@@ -3900,7 +3900,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 
        memset(&link, 0, sizeof(link));
        link.link_status = ETH_LINK_DOWN;
-       link.link_speed = 0;
+       link.link_speed = ETH_SPEED_NUM_NONE;
        link.link_duplex = ETH_LINK_HALF_DUPLEX;
        link.link_autoneg = ETH_LINK_AUTONEG;
 
index d1b71c8058d44ffff3665fc793883bb15be1170a..9a76670d8ee07860d44d19bdb9a7801c202877c1 100644 (file)
@@ -713,7 +713,7 @@ mlx4_link_update(struct rte_eth_dev *dev, int wait_to_complete)
        }
        link_speed = ethtool_cmd_speed(&edata);
        if (link_speed == -1)
-               dev_link.link_speed = 0;
+               dev_link.link_speed = ETH_SPEED_NUM_NONE;
        else
                dev_link.link_speed = link_speed;
        dev_link.link_duplex = ((edata.duplex == DUPLEX_HALF) ?
index ef44cc91fc1c7761cbc0aacd6e47335d2a921ed5..59d6a805fdadf84e13916689fef9703d86394613 100644 (file)
@@ -539,7 +539,7 @@ mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev,
        }
        link_speed = ethtool_cmd_speed(&edata);
        if (link_speed == -1)
-               dev_link.link_speed = 0;
+               dev_link.link_speed = ETH_SPEED_NUM_NONE;
        else
                dev_link.link_speed = link_speed;
        priv->link_speed_capa = 0;