From ba2d05ab78b5617237684b85cc3add4f2670f230 Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Mon, 4 Sep 2017 20:40:06 +0530 Subject: [PATCH] net/thunderx: add device speed capability info updated nicvf feature file to mark support. Signed-off-by: Jerin Jacob --- doc/guides/nics/features/thunderx.ini | 1 + drivers/net/thunderx/nicvf_ethdev.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/doc/guides/nics/features/thunderx.ini b/doc/guides/nics/features/thunderx.ini index b9720be6bb..6268589716 100644 --- a/doc/guides/nics/features/thunderx.ini +++ b/doc/guides/nics/features/thunderx.ini @@ -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 diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index edc17f1d40..4654a4cedc 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -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 = -- 2.20.1