From: KP Singh <kpsingh@chromium.org>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: davem@davemloft.net, daniel@iogearbox.net,
netdev@vger.kernel.org, bpf@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH bpf-next 3/3] selftests/bpf: basic sleepable tests
Date: Fri, 29 May 2020 00:15:21 +0200 [thread overview]
Message-ID: <20200528221521.GC217782@google.com> (raw)
In-Reply-To: <20200528053334.89293-4-alexei.starovoitov@gmail.com>
On 27-May 22:33, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@kernel.org>
>
> Modify few tests to sanity test sleepable bpf functionality.
>
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: KP Singh <kpsingh@google.com>
> ---
> tools/testing/selftests/bpf/bench.c | 2 ++
> .../selftests/bpf/benchs/bench_trigger.c | 17 +++++++++++++++++
> tools/testing/selftests/bpf/progs/lsm.c | 4 ++--
> .../testing/selftests/bpf/progs/trigger_bench.c | 7 +++++++
> 4 files changed, 28 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/bench.c b/tools/testing/selftests/bpf/bench.c
>
[...]
> -SEC("lsm/bprm_committed_creds")
> +SEC("lsm.s/bprm_committed_creds")
> int BPF_PROG(test_void_hook, struct linux_binprm *bprm)
> {
> __u32 pid = bpf_get_current_pid_tgid() >> 32;
> diff --git a/tools/testing/selftests/bpf/progs/trigger_bench.c b/tools/testing/selftests/bpf/progs/trigger_bench.c
> index 8b36b6640e7e..9a4d09590b3d 100644
> --- a/tools/testing/selftests/bpf/progs/trigger_bench.c
> +++ b/tools/testing/selftests/bpf/progs/trigger_bench.c
> @@ -39,6 +39,13 @@ int bench_trigger_fentry(void *ctx)
> return 0;
> }
>
> +SEC("fentry.s/__x64_sys_getpgid")
> +int bench_trigger_fentry_sleep(void *ctx)
> +{
> + __sync_add_and_fetch(&hits, 1);
> + return 0;
> +}
> +
> SEC("fmod_ret/__x64_sys_getpgid")
> int bench_trigger_fmodret(void *ctx)
> {
> --
> 2.23.0
>
prev parent reply other threads:[~2020-05-28 22:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 5:33 [PATCH bpf-next 0/3] bpf: Introduce minimal support for sleepable progs Alexei Starovoitov
2020-05-28 5:33 ` [PATCH bpf-next 1/3] bpf: Introduce sleepable BPF programs Alexei Starovoitov
2020-05-28 22:12 ` KP Singh
2020-05-29 4:26 ` Alexei Starovoitov
2020-05-28 5:33 ` [PATCH bpf-next 2/3] libbpf: support sleepable progs Alexei Starovoitov
2020-05-28 22:13 ` KP Singh
2020-05-28 5:33 ` [PATCH bpf-next 3/3] selftests/bpf: basic sleepable tests Alexei Starovoitov
2020-05-28 22:15 ` KP Singh [this message]
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=20200528221521.GC217782@google.com \
--to=kpsingh@chromium.org \
--cc=alexei.starovoitov@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).