diff options
| author | David S. Miller <davem@davemloft.net> | 2017-08-24 21:59:37 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-08-24 21:59:37 +0300 |
| commit | e7d12ce121aa474ea6984ea1255a7bd85c09454f (patch) | |
| tree | bda1e6b0dc4649bdc45162c59b6d1df6e2ecdf2f /include/linux/filter.h | |
| parent | fb3bbbda5f96512ee94fbc9c8712800087b63182 (diff) | |
| parent | 315ec3990efd71f87e556cf7827a1ac2d565d5e8 (diff) | |
| download | linux-e7d12ce121aa474ea6984ea1255a7bd85c09454f.tar.xz | |
Merge branch 'xdp-more-work-on-xdp-tracepoints'
Jesper Dangaard Brouer says:
====================
xdp: more work on xdp tracepoints
More work on streamlining and performance optimizing the tracepoints
for XDP.
I've created a simple xdp_monitor application that uses this
tracepoint, and prints statistics. Available at github:
https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/samples/bpf/xdp_monitor_kern.c
https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/samples/bpf/xdp_monitor_user.c
The improvement over tracepoint with strcpy: 9810372 - 8428762 = +1381610 pps faster
- (1/9810372 - 1/8428762)*10^9 = -16.7 nanosec
- 100-(8428762/9810372*100) = strcpy-trace is 14.08% slower
- 981037/8428762*100 = removing strcpy made it 11.64% faster
V3: Fix merge conflict with commit e4a8e817d3cb ("bpf: misc xdp redirect cleanups")
V2: Change trace_xdp_redirect() to align with args of trace_xdp_exception()
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/filter.h')
| -rw-r--r-- | include/linux/filter.h | 3 |
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); |
