veth: check for NAPI instead of xdp_prog before xmit of XDP frame
authorToke Høiland-Jørgensen <toke@redhat.com>
Fri, 16 Apr 2021 15:47:45 +0000 (17:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Apr 2021 22:42:07 +0000 (15:42 -0700)
commit0e672f306a28ddd55d2fb2ab89afdc615b5324a4
tree3798d1e05fcaaf8bcaab798189c4bb76f60b0bdd
parentaa8caa767e319bad34a82bfce7da1ed2b9c0ed6f
veth: check for NAPI instead of xdp_prog before xmit of XDP frame

The recent patch that tied enabling of veth NAPI to the GRO flag also has
the nice side effect that a veth device can be the target of an
XDP_REDIRECT without an XDP program needing to be loaded on the peer
device. However, the patch adding this extra NAPI mode didn't actually
change the check in veth_xdp_xmit() to also look at the new NAPI pointer,
so let's fix that.

Fixes: 6788fa154546 ("veth: allow enabling NAPI even without XDP")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/veth.c