Hi all,

We noticed a problematic behavior when using DPDK in Azure with Mellanox CX4-Lx 
VFs on Ubuntu 18.04: the link status (link up or down) is never updated - and 
so for an application trusting the link state reported by DPDK, the link looks 
unavailable.
The root cause is mlx5_link_update_unlocked_gs() failing to get the link speed 
from the Linux driver and always returning EAGAIN because of this test at the 
end of the function:

    if (((dev_link.link_speed && !dev_link.link_status) ||
         (!dev_link.link_speed && dev_link.link_status)))

Here, dev_link.link_status is correctly set but not dev_link.link_speed.
The Linux kernel driver does not seem to be able to get the link speed because 
ethtool also fails to retrieve it from the kernel so the DPDK cannot do any 
miracle here, but I wonder whether this should prevent to update the other link 
status information to be correctly updated.

Any thoughts?

Thx
ben

Reply via email to