• Mintz, Yuval's avatar
    qede: Split PF/VF ndos. · be47c555
    Mintz, Yuval authored
    PFs and VFs share the same structure of NDOs today,
    and the VFs explicitly fails the ndo_xdp() callback stating
    it doesn't support XDP.
    
    This results in lots of:
    
      [qede_xdp:1032(enp131s2)]VFs don't support XDP
      ------------[ cut here ]------------
      WARNING: CPU: 4 PID: 1426 at net/core/rtnetlink.c:1637 rtnl_dump_ifinfo+0x354/0x3c0
      ...
      Call Trace:
        ? __alloc_skb+0x9b/0x1d0
        netlink_dump+0x122/0x290
        netlink_recvmsg+0x27d/0x430
        sock_recvmsg+0x3d/0x50
      ...
    
    As every dump request for the VF interface info would fail due to
    rtnl_xdp_fill() returning an error code.
    
    To resolve this, introduce a subset of the NDOs meant for the VF
    in a seperate structure and register that one instead for VFs,
    and omit the ndo_xdp initialization.
    
    Fixes: 40b8c454 ("qede: Prevent VFs from using XDP")
    Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    be47c555
qede_main.c 54.5 KB