Using DPDK 21.11.1 on FreeBSD 13.1, calling rte_eth_link_get_nowait() appears to hang waiting for the link to come up on an XL710 or 82599 based NIC.
This call eventually makes its way to ixgbe_dev_link_update_share() with wait_to_complete set to false. Inside that function, there is this code: /* BSD has no interrupt mechanism, so force NIC status synchronization. */ #ifdef RTE_EXEC_ENV_FREEBSD wait = 1; #endif This then calls ixgbe_check_link() with wait == true, which then calls ixgbe_check_mac_link_generic(), but the parameter is now called "link_up_wait_to_complete", and it loops forever waiting for the link to be up, with a 100ms delay between polls. Perhaps our understanding is incorrect, but we're using rte_eth_link_get_nowait() because we can't tolerate any significant delay in the function call, but we certainly don't want to wait for the link to be up. We're just trying to find out if it's up or down. Empirically, removing the "wait = 1" restores normal operation. Thanks, lew