]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
bpf: make TC vlan bpf_helpers avail to selftests
authorJesper Dangaard Brouer <brouer@redhat.com>
Tue, 9 Oct 2018 10:04:48 +0000 (12:04 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 10 Oct 2018 04:59:09 +0000 (21:59 -0700)
The helper bpf_skb_vlan_push is needed by next patch, and the helper
bpf_skb_vlan_pop is added for completeness, regarding VLAN helpers.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/bpf_helpers.h

index 1d407b3494f949520c8c4cb8d0303c1d70dfba27..fda8c162d0dfadda08cb0f09f5e9ff61782fa7b7 100644 (file)
@@ -155,6 +155,10 @@ static struct bpf_sock *(*bpf_sk_lookup_udp)(void *ctx,
        (void *) BPF_FUNC_sk_lookup_udp;
 static int (*bpf_sk_release)(struct bpf_sock *sk) =
        (void *) BPF_FUNC_sk_release;
+static int (*bpf_skb_vlan_push)(void *ctx, __be16 vlan_proto, __u16 vlan_tci) =
+       (void *) BPF_FUNC_skb_vlan_push;
+static int (*bpf_skb_vlan_pop)(void *ctx) =
+       (void *) BPF_FUNC_skb_vlan_pop;
 
 /* llvm builtin functions that eBPF C program may use to
  * emit BPF_LD_ABS and BPF_LD_IND instructions