From: Jesper Dangaard Brouer <brouer@redhat.com>
To: netdev@vger.kernel.org, Jesper Dangaard Brouer <brouer@redhat.com>
Cc: liu.song.a23@gmail.com, Daniel Borkmann <borkmann@iogearbox.net>,
yoel@kviknet.dk,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
John Fastabend <john.fastabend@gmail.com>
Subject: [bpf-next V2 PATCH 2/3] bpf: make TC vlan bpf_helpers avail to selftests
Date: Tue, 09 Oct 2018 12:04:48 +0200 [thread overview]
Message-ID: <153907948805.9484.11576286962165412186.stgit@firesoul> (raw)
In-Reply-To: <153907945478.9484.16223890803803124822.stgit@firesoul>
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>
---
tools/testing/selftests/bpf/bpf_helpers.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h
index 1d407b3494f9..fda8c162d0df 100644
--- a/tools/testing/selftests/bpf/bpf_helpers.h
+++ b/tools/testing/selftests/bpf/bpf_helpers.h
@@ -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
next prev parent reply other threads:[~2018-10-09 17:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 10:04 [bpf-next V2 PATCH 0/3] bpf/xdp: fix generic-XDP and demonstrate VLAN manipulation Jesper Dangaard Brouer
2018-10-09 10:04 ` [bpf-next V2 PATCH 1/3] net: fix generic XDP to handle if eth header was mangled Jesper Dangaard Brouer
2018-10-09 10:04 ` Jesper Dangaard Brouer [this message]
2018-10-09 10:04 ` [bpf-next V2 PATCH 3/3] selftests/bpf: add XDP selftests for modifying and popping VLAN headers Jesper Dangaard Brouer
2018-10-09 18:47 ` [bpf-next V2 PATCH 0/3] bpf/xdp: fix generic-XDP and demonstrate VLAN manipulation Song Liu
2018-10-10 5:02 ` Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=153907948805.9484.11576286962165412186.stgit@firesoul \
--to=brouer@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=borkmann@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=liu.song.a23@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=yoel@kviknet.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox