From: John Fastabend <john.fastabend@gmail.com>
To: Alexei Starovoitov <ast@kernel.org>, davem@davemloft.net
Cc: daniel@iogearbox.net, netdev@vger.kernel.org,
bpf@vger.kernel.org, kernel-team@fb.com
Subject: RE: [PATCH v2 bpf-next 3/3] selftests/bpf: Add tests for program extensions
Date: Tue, 21 Jan 2020 10:41:00 -0800 [thread overview]
Message-ID: <5e2745bccbf37_74b42ad14ee465c044@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <20200121005348.2769920-4-ast@kernel.org>
Alexei Starovoitov wrote:
> Add program extension tests that build on top of fexit_bpf2bpf tests.
> Replace three global functions in previously loaded test_pkt_access.c program
> with three new implementations:
> int get_skb_len(struct __sk_buff *skb);
> int get_constant(long val);
> int get_skb_ifindex(int val, struct __sk_buff *skb, int var);
> New function return the same results as original only if arguments match.
>
> new_get_skb_ifindex() demonstrates that 'skb' argument doesn't have to be first
> and only argument of BPF program. All normal skb based accesses are available.
>
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
> ---
> .../selftests/bpf/prog_tests/fexit_bpf2bpf.c | 20 ++++++-
> .../selftests/bpf/progs/fexit_bpf2bpf.c | 57 +++++++++++++++++++
> .../selftests/bpf/progs/test_pkt_access.c | 8 ++-
> 3 files changed, 83 insertions(+), 2 deletions(-)
Acked-by: John Fastabend <john.fastabend@gmail.com>
next prev parent reply other threads:[~2020-01-21 18:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 0:53 [PATCH v2 bpf-next 0/3] bpf: Program extensions or dynamic re-linking Alexei Starovoitov
2020-01-21 0:53 ` [PATCH v2 bpf-next 1/3] bpf: Introduce dynamic program extensions Alexei Starovoitov
2020-01-21 7:36 ` John Fastabend
2020-01-21 16:00 ` Alexei Starovoitov
2020-01-21 18:15 ` John Fastabend
2020-01-21 19:08 ` Alexei Starovoitov
2020-01-21 19:54 ` John Fastabend
2020-01-21 21:13 ` Yonghong Song
2020-01-21 0:53 ` [PATCH v2 bpf-next 2/3] libbpf: Add support for " Alexei Starovoitov
2020-01-21 18:38 ` John Fastabend
2020-01-21 0:53 ` [PATCH v2 bpf-next 3/3] selftests/bpf: Add tests " Alexei Starovoitov
2020-01-21 18:41 ` John Fastabend [this message]
2020-01-21 15:37 ` [PATCH v2 bpf-next 0/3] bpf: Program extensions or dynamic re-linking Toke Høiland-Jørgensen
2020-01-21 17:00 ` Alexei Starovoitov
2020-01-22 10:45 ` Toke Høiland-Jørgensen
2020-01-21 18:21 ` Andrii Nakryiko
2020-01-22 22:12 ` Daniel Borkmann
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=5e2745bccbf37_74b42ad14ee465c044@john-XPS-13-9370.notmuch \
--to=john.fastabend@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/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