aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/filter.h
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2017-08-24 12:33:08 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-24 11:59:36 -0700
commit2facaad6000f2322eb40ca379aced31c957f0a41 (patch)
tree5e22bca4b0faec1d75f38dfa3ed6025969839cd4 /include/linux/filter.h
parentxdp: remove bpf_warn_invalid_xdp_redirect (diff)
downloadlinux-dev-2facaad6000f2322eb40ca379aced31c957f0a41.tar.xz
linux-dev-2facaad6000f2322eb40ca379aced31c957f0a41.zip
xdp: make generic xdp redirect use tracepoint trace_xdp_redirect
If the xdp_do_generic_redirect() call fails, it trigger the trace_xdp_exception tracepoint. It seems better to use the same tracepoint trace_xdp_redirect, as the native xdp_do_redirect{,_map} does. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/filter.h')
-rw-r--r--include/linux/filter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 7015116331af..d29e58fde364 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -718,7 +718,8 @@ struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
* because we only track one map and force a flush when the map changes.
* This does not appear to be a real limitation for existing software.
*/
-int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb);
+int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb,
+ struct bpf_prog *prog);
int xdp_do_redirect(struct net_device *dev,
struct xdp_buff *xdp,
struct bpf_prog *prog);