]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit27dcdd68f69755d5f6d4c2137d5102a5cfbf70d1
tree869b7a1b7f551ea214b65822c3e0e7d6f168d9f2
parent3f71268b4c498a3d162a36d6ef39da6062cc3c21
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