lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 23 Nov 2019 08:12:23 +0100 From: Björn Töpel <bjorn.topel@...il.com> To: netdev@...r.kernel.org, ast@...nel.org, daniel@...earbox.net Cc: Björn Töpel <bjorn.topel@...el.com>, bpf@...r.kernel.org, magnus.karlsson@...il.com, magnus.karlsson@...el.com, jonathan.lemon@...il.com, ecree@...arflare.com, thoiland@...hat.com, andrii.nakryiko@...il.com, tariqt@...lanox.com, saeedm@...lanox.com, maximmi@...lanox.com Subject: [PATCH bpf-next v2 4/6] ixgbe: start using xdp_call.h From: Björn Töpel <bjorn.topel@...el.com> This commit starts using xdp_call.h and the BPF dispatcher to avoid the retpoline overhead. Signed-off-by: Björn Töpel <bjorn.topel@...el.com> --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 25c097cd8100..9c5cea239258 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -37,6 +37,7 @@ #include <net/mpls.h> #include <net/xdp_sock.h> #include <net/xfrm.h> +#include <linux/xdp_call.h> #include "ixgbe.h" #include "ixgbe_common.h" @@ -2193,6 +2194,8 @@ static struct sk_buff *ixgbe_build_skb(struct ixgbe_ring *rx_ring, return skb; } +DEFINE_XDP_CALL(ixgbe_xdp_call); + static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter, struct ixgbe_ring *rx_ring, struct xdp_buff *xdp) @@ -2210,7 +2213,7 @@ static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter, prefetchw(xdp->data_hard_start); /* xdp_frame write */ - act = bpf_prog_run_xdp(xdp_prog, xdp); + act = xdp_call_run(ixgbe_xdp_call, xdp_prog, xdp); switch (act) { case XDP_PASS: break; @@ -10273,6 +10276,8 @@ static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog) adapter->xdp_prog); } + xdp_call_update(ixgbe_xdp_call, old_prog, prog); + if (old_prog) bpf_prog_put(old_prog); -- 2.20.1
Powered by blists - more mailing lists