[dpdk-users] CX4-Lx VF link status in Azure

Stephen Hemminger stephen at networkplumber.org
Wed Mar 25 23:48:15 CET 2020


On Wed, 25 Mar 2020 19:07:09 +0000
"Benoit Ganne (bganne)" <bganne at cisco.com> wrote:

> 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

You maybe missing this patch, which is only in current development branch.
Since it is tagged for stable, it should end up in later LTS versions as well 18.11.X and 19.11.X.

commit 047ad3787a2f5d99277e0d8d756580a1d5ea2891
Author: Stephen Hemminger <stephen at networkplumber.org>
Date:   Fri Feb 7 10:08:16 2020 -0800

    net/netvsc: initialize link state
    
    If application is using link state interrupt, the correct link state
    needs to be filled in when device is started. This is similar to
    how virtio updates link information.
    
    Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
    Cc: stable at dpdk.org
    
    Reported-by: Mohammed Gamal <mgamal at redhat.com>
    Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
    Tested-by: Mohammed Gamal <mgamal at redhat.com>


More information about the users mailing list