In 2 modes (802.3ad and TLB) of the link bonding driver, monitoring of
link status is used to determine the active slaves to use. These
functions are currently using the rte_link_link_get which could block
for up to 9 seconds, depending on the slave device.
In the 802.3ad periodic callback and in the TLB slave callback the
link status of slaves are checked using rte_eth_link_get function.
This patch changes to the no-wait version of the link get function to
avoid the possible issues which could be introduced if this call was
to block for an extended period of time.
Fixes:
46fb43683679 ("bond: add mode 4")
Fixes:
7c76a747e68c ("bond: add mode 5")
Cc: stable@dpdk.org
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
uint16_t key;
slave_id = internals->active_slaves[i];
- rte_eth_link_get(slave_id, &link_info);
+ rte_eth_link_get_nowait(slave_id, &link_info);
rte_eth_macaddr_get(slave_id, &slave_addr);
if (link_info.link_status != 0) {
{
struct rte_eth_link link_status;
- rte_eth_link_get(port_id, &link_status);
+ rte_eth_link_get_nowait(port_id, &link_status);
uint64_t link_bwg = link_status.link_speed * 1000000ULL / 8;
if (link_bwg == 0)
return;