aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/amazon/ena/ena_netdev.h
diff options
context:
space:
mode:
authorShay Agroskin <shayagr@amazon.com>2020-12-08 20:02:06 +0200
committerJakub Kicinski <kuba@kernel.org>2020-12-09 15:26:40 -0800
commita318c70ad152b24f92870dfe5d93b7675498c68f (patch)
treefdb57a1414a09c49fcb780e773c28c62d24104d7 /drivers/net/ethernet/amazon/ena/ena_netdev.h
parentnet: ena: use xdp_frame in XDP TX flow (diff)
downloadwireguard-linux-a318c70ad152b24f92870dfe5d93b7675498c68f.tar.xz
wireguard-linux-a318c70ad152b24f92870dfe5d93b7675498c68f.zip
net: ena: introduce XDP redirect implementation
This patch adds a partial support for the XDP_REDIRECT directive which instructs the driver to pass the packet to an interface specified by the program. The directive is passed to the driver by calling bpf_redirect() or bpf_redirect_map() functions from the eBPF program. To lay the ground for integration with the existing XDP TX implementation the patch removes the redundant page ref count increase in ena_xdp_xmit_frame() and then decrease in ena_clean_rx_irq(). Instead it only DMA unmaps descriptors for which XDP TX or REDIRECT directive was received. The XDP Redirect support is still missing .ndo_xdp_xmit function implementation, which allows to redirect packet to an ENA interface, which would be added in a later patch. Signed-off-by: Shay Agroskin <shayagr@amazon.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/amazon/ena/ena_netdev.h')
-rw-r--r--drivers/net/ethernet/amazon/ena/ena_netdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h
index c39f41711c31..0fef876c23eb 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.h
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h
@@ -239,6 +239,7 @@ struct ena_stats_rx {
u64 xdp_pass;
u64 xdp_tx;
u64 xdp_invalid;
+ u64 xdp_redirect;
};
struct ena_ring {