* [PATCH bpf-next] bpf: Add cmd alias BPF_PROG_RUN
@ 2021-05-19 1:40 Alexei Starovoitov
2021-05-19 7:41 ` Song Liu
2021-05-19 13:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2021-05-19 1:40 UTC (permalink / raw)
To: davem; +Cc: daniel, andrii, john.fastabend, bpf, kernel-team
From: Alexei Starovoitov <ast@kernel.org>
Add BPF_PROG_RUN command as an alias to BPF_RPOG_TEST_RUN to better
indicate the full range of use cases done by the command.
Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
---
include/uapi/linux/bpf.h | 1 +
tools/include/uapi/linux/bpf.h | 1 +
tools/lib/bpf/skel_internal.h | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 4cd9a0181f27..418b9b813d65 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -837,6 +837,7 @@ enum bpf_cmd {
BPF_PROG_ATTACH,
BPF_PROG_DETACH,
BPF_PROG_TEST_RUN,
+ BPF_PROG_RUN = BPF_PROG_TEST_RUN,
BPF_PROG_GET_NEXT_ID,
BPF_MAP_GET_NEXT_ID,
BPF_PROG_GET_FD_BY_ID,
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 4cd9a0181f27..418b9b813d65 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -837,6 +837,7 @@ enum bpf_cmd {
BPF_PROG_ATTACH,
BPF_PROG_DETACH,
BPF_PROG_TEST_RUN,
+ BPF_PROG_RUN = BPF_PROG_TEST_RUN,
BPF_PROG_GET_NEXT_ID,
BPF_MAP_GET_NEXT_ID,
BPF_PROG_GET_FD_BY_ID,
diff --git a/tools/lib/bpf/skel_internal.h b/tools/lib/bpf/skel_internal.h
index 12a126b452c1..b22b50c1b173 100644
--- a/tools/lib/bpf/skel_internal.h
+++ b/tools/lib/bpf/skel_internal.h
@@ -102,7 +102,7 @@ static inline int bpf_load_and_run(struct bpf_load_and_run_opts *opts)
attr.test.prog_fd = prog_fd;
attr.test.ctx_in = (long) opts->ctx;
attr.test.ctx_size_in = opts->ctx->sz;
- err = skel_sys_bpf(BPF_PROG_TEST_RUN, &attr, sizeof(attr));
+ err = skel_sys_bpf(BPF_PROG_RUN, &attr, sizeof(attr));
if (err < 0 || (int)attr.test.retval < 0) {
opts->errstr = "failed to execute loader prog";
if (err < 0)
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpf: Add cmd alias BPF_PROG_RUN
2021-05-19 1:40 [PATCH bpf-next] bpf: Add cmd alias BPF_PROG_RUN Alexei Starovoitov
@ 2021-05-19 7:41 ` Song Liu
2021-05-19 13:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Song Liu @ 2021-05-19 7:41 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: davem, daniel, andrii, john.fastabend, bpf, Kernel Team
> On May 18, 2021, at 6:40 PM, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
>
> From: Alexei Starovoitov <ast@kernel.org>
>
> Add BPF_PROG_RUN command as an alias to BPF_RPOG_TEST_RUN to better
> indicate the full range of use cases done by the command.
>
> Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpf: Add cmd alias BPF_PROG_RUN
2021-05-19 1:40 [PATCH bpf-next] bpf: Add cmd alias BPF_PROG_RUN Alexei Starovoitov
2021-05-19 7:41 ` Song Liu
@ 2021-05-19 13:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-19 13:40 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: davem, daniel, andrii, john.fastabend, bpf, kernel-team
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Tue, 18 May 2021 18:40:32 -0700 you wrote:
> From: Alexei Starovoitov <ast@kernel.org>
>
> Add BPF_PROG_RUN command as an alias to BPF_RPOG_TEST_RUN to better
> indicate the full range of use cases done by the command.
>
> Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
>
> [...]
Here is the summary with links:
- [bpf-next] bpf: Add cmd alias BPF_PROG_RUN
https://git.kernel.org/bpf/bpf-next/c/5d67f349590d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-19 13:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 1:40 [PATCH bpf-next] bpf: Add cmd alias BPF_PROG_RUN Alexei Starovoitov
2021-05-19 7:41 ` Song Liu
2021-05-19 13:40 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.