When port_type_from_speed_capa() is called before the port link update isn't completed,
xd->port_type becomes VNET_DPDK_PORT_TYPE_UNKNOWN. This happens with Mellanox NIC
without lsc interrupt. Calling rte_eth_link_get before getting dev_info will ensure
the link state is up-to-date.
Change-Id: I83a59654778eb4bf0c65a4a4e225a326227b9641
Signed-off-by: Steve Shin <jonshin@cisco.com>
vlib_pci_addr_t pci_addr;
uword *p = 0;
+ rte_eth_link_get_nowait (i, &l);
rte_eth_dev_info_get (i, &dev_info);
if (dev_info.pci_dev) /* bonded interface has no pci info */
{
/* Cisco VIC */
case VNET_DPDK_PMD_ENIC:
- rte_eth_link_get_nowait (i, &l);
if (l.link_speed == 40000)
xd->port_type = VNET_DPDK_PORT_TYPE_ETH_40G;
else