OSDN Git Service

net: ena: introduce ndo_xdp_xmit() function for XDP_REDIRECT
authorShay Agroskin <shayagr@amazon.com>
Tue, 8 Dec 2020 18:02:08 +0000 (20:02 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Dec 2020 23:26:40 +0000 (15:26 -0800)
commitf1a25589130366a96a2a0d165e9f4d9289336e9f
tree869b7a1b7f551ea214b65822c3e0e7d6f168d9f2
parentf8b91f255a05c4734ab093eb93b5826499a35328
net: ena: introduce ndo_xdp_xmit() function for XDP_REDIRECT

This patch implements the ndo_xdp_xmit() net_device function which is
called when a packet is redirected to this driver using an
XDP_REDIRECT directive.

The function receives an array of xdp frames that it needs to xmit.
The TX queues that are used to xmit these frames are the XDP
queues used by the XDP_TX flow. Therefore a lock is added to synchronize
both flows (XDP_TX and XDP_REDIRECT).

Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amazon/ena/ena_netdev.h