summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2017-08-29 16:37:40 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-29 10:51:28 -0700
commitc31e5a4876cdfbfcc28c4fb201ad872c65671067 (patch)
tree2796a7c5b638c813aaed663acb6a0d79b6b9855d /net
parentd0fcece7704c935a9c8740bddff21575048f27ba (diff)
xdp: remove redundant argument to trace_xdp_redirect
Supplying the action argument XDP_REDIRECT to the tracepoint xdp_redirect is redundant as it is only called in-case this action was specified. Remove the argument, but keep "act" member of the tracepoint struct and populate it with XDP_REDIRECT. This makes it easier to write a common bpf_prog processing events. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/filter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 4bcd6baa80c9..de31fb684ad4 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2524,7 +2524,7 @@ static int xdp_do_redirect_map(struct net_device *dev, struct xdp_buff *xdp,
if (likely(!err))
ri->map_to_flush = map;
out:
- trace_xdp_redirect(dev, xdp_prog, XDP_REDIRECT, index, err);
+ trace_xdp_redirect(dev, xdp_prog, index, err);
return err;
}
@@ -2548,7 +2548,7 @@ int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp,
err = __bpf_tx_xdp(fwd, NULL, xdp, 0);
out:
- trace_xdp_redirect(dev, xdp_prog, XDP_REDIRECT, index, err);
+ trace_xdp_redirect(dev, xdp_prog, index, err);
return err;
}
EXPORT_SYMBOL_GPL(xdp_do_redirect);
@@ -2582,7 +2582,7 @@ int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb,
skb->dev = fwd;
out:
- trace_xdp_redirect(dev, xdp_prog, XDP_REDIRECT, index, err);
+ trace_xdp_redirect(dev, xdp_prog, index, err);
return err;
}
EXPORT_SYMBOL_GPL(xdp_do_generic_redirect);