net/thunderx: add device speed capability info
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Mon, 4 Sep 2017 15:10:06 +0000 (20:40 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:48 +0000 (02:49 +0200)
updated nicvf feature file to mark support.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
doc/guides/nics/features/thunderx.ini
drivers/net/thunderx/nicvf_ethdev.c

index b9720be..6268589 100644 (file)
@@ -4,6 +4,7 @@
 ; Refer to default.ini for the full list of available PMD features.
 ;
 [Features]
+Speed capabilities   = Y
 Link status          = Y
 Link status event    = Y
 Queue start/stop     = Y
index edc17f1..4654a4c 100644 (file)
@@ -1380,6 +1380,13 @@ nicvf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 
        dev_info->pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 
+       /* Autonegotiation may be disabled */
+       dev_info->speed_capa = ETH_LINK_SPEED_FIXED;
+       dev_info->speed_capa |= ETH_LINK_SPEED_10M | ETH_LINK_SPEED_100M |
+                                ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G;
+       if (nicvf_hw_version(nic) != PCI_SUB_DEVICE_ID_CN81XX_NICVF)
+               dev_info->speed_capa |= ETH_LINK_SPEED_40G;
+
        dev_info->min_rx_bufsize = ETHER_MIN_MTU;
        dev_info->max_rx_pktlen = NIC_HW_MAX_FRS;
        dev_info->max_rx_queues =