diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2017-08-24 12:33:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-24 20:59:36 +0200 |
commit | 2facaad6000f2322eb40ca379aced31c957f0a41 (patch) | |
tree | 5e22bca4b0faec1d75f38dfa3ed6025969839cd4 /net/core/dev.c | |
parent | xdp: remove bpf_warn_invalid_xdp_redirect (diff) | |
download | linux-2facaad6000f2322eb40ca379aced31c957f0a41.tar.xz linux-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 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 40b28e417072..270b54754821 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3953,7 +3953,8 @@ int do_xdp_generic(struct bpf_prog *xdp_prog, struct sk_buff *skb) if (act != XDP_PASS) { switch (act) { case XDP_REDIRECT: - err = xdp_do_generic_redirect(skb->dev, skb); + err = xdp_do_generic_redirect(skb->dev, skb, + xdp_prog); if (err) goto out_redir; /* fallthru to submit skb */ @@ -3966,7 +3967,6 @@ int do_xdp_generic(struct bpf_prog *xdp_prog, struct sk_buff *skb) } return XDP_PASS; out_redir: - trace_xdp_exception(skb->dev, xdp_prog, XDP_REDIRECT); kfree_skb(skb); return XDP_DROP; } |