diff options
author | David S. Miller <davem@davemloft.net> | 2015-09-18 06:09:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-18 06:09:07 +0200 |
commit | 41a9802fd87316ac736182e2debc579e987c8311 (patch) | |
tree | 4a74088c6a959041fd267fcf03466ca7eea355e1 /samples/bpf/bpf_helpers.h | |
parent | net: only check perm protocol when register proto (diff) | |
parent | bpf: add bpf_redirect() helper (diff) | |
download | linux-41a9802fd87316ac736182e2debc579e987c8311.tar.xz linux-41a9802fd87316ac736182e2debc579e987c8311.zip |
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 |