]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qede: Split PF/VF ndos.
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Tue, 9 May 2017 12:07:51 +0000 (15:07 +0300)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 19 Sep 2017 05:32:06 +0000 (22:32 -0700)
commit4db28d7fc6a7ae493c206ff35dd51852f6e90b22
treebd92d4ac053b07a3c2417d22846851cb18edc00e
parent9afe3628c5a5a1d4fb01f37a77007fc2ce2f0f9d
qede: Split PF/VF ndos.

Orabug: 26783820

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: 40b8c45492ef ("qede: Prevent VFs from using XDP")
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit be47c5555778fa3354950731023deb034a9e445e ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
drivers/net/ethernet/qlogic/qede/qede_main.c