diff options
| author | David S. Miller <davem@davemloft.net> | 2015-09-17 21:09:07 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-09-17 21:09:07 -0700 |
| commit | 41a9802fd87316ac736182e2debc579e987c8311 (patch) | |
| tree | 4a74088c6a959041fd267fcf03466ca7eea355e1 /samples/bpf/bpf_helpers.h | |
| parent | f6c53334d6c6ac7088c2e7e70ff2941bfb33f52e (diff) | |
| parent | 27b29f63058d26c6c1742f1993338280d5a41dc6 (diff) | |
Merge branch 'bpf_avoid_clone'
Alexei Starovoitov says:
====================
bpf: performance improvements
v1->v2: dropped redundant iff_up check in patch 2
At plumbers we discussed different options on how to get rid of skb_clone
from bpf_clone_redirect(), the patch 2 implements the best option.
Patch 1 adds 'integrated exts' to cls_bpf to improve performance by
combining simple actions into bpf classifier.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/bpf_helpers.h')
| -rw-r--r-- | samples/bpf/bpf_helpers.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h index 3a44d3a272af..21aa1b44c30c 100644 --- a/samples/bpf/bpf_helpers.h +++ b/samples/bpf/bpf_helpers.h @@ -33,6 +33,10 @@ static int (*bpf_get_current_comm)(void *buf, int buf_size) = (void *) BPF_FUNC_get_current_comm; static int (*bpf_perf_event_read)(void *map, int index) = (void *) BPF_FUNC_perf_event_read; +static int (*bpf_clone_redirect)(void *ctx, int ifindex, int flags) = + (void *) BPF_FUNC_clone_redirect; +static int (*bpf_redirect)(int ifindex, int flags) = + (void *) BPF_FUNC_redirect; /* llvm builtin functions that eBPF C program may use to * emit BPF_LD_ABS and BPF_LD_IND instructions |
