From: Eduard Zingerman <eddyz87@gmail.com>
To: bpf@vger.kernel.org, ast@kernel.org
Cc: andrii@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev,
kernel-team@fb.com, yonghong.song@linux.dev,
arnaldo.melo@gmail.com, Eduard Zingerman <eddyz87@gmail.com>
Subject: [PATCH bpf-next v1 2/4] bpf: __bpf_fastcall for bpf_get_smp_processor_id in uapi
Date: Mon, 16 Sep 2024 02:17:10 -0700 [thread overview]
Message-ID: <20240916091712.2929279-3-eddyz87@gmail.com> (raw)
In-Reply-To: <20240916091712.2929279-1-eddyz87@gmail.com>
Since [1] kernel supports __bpf_fastcall attribute for helper function
bpf_get_smp_processor_id(). Update uapi definition for this helper in
order to have this attribute in the generated bpf_helper_defs.h
[1] commit 91b7fbf3936f ("bpf, x86, riscv, arm: no_caller_saved_registers for bpf_get_smp_processor_id()")
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
---
include/uapi/linux/bpf.h | 2 ++
tools/include/uapi/linux/bpf.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index c3a5728db115..fd1f59c6d1de 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1970,6 +1970,8 @@ union bpf_attr {
* program.
* Return
* The SMP id of the processor running the program.
+ * Attributes
+ * __bpf_fastcall
*
* long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags)
* Description
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index f329ee44627a..22b041c81276 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1970,6 +1970,8 @@ union bpf_attr {
* program.
* Return
* The SMP id of the processor running the program.
+ * Attributes
+ * __bpf_fastcall
*
* long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags)
* Description
--
2.46.0
next prev parent reply other threads:[~2024-09-16 9:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 9:17 [PATCH bpf-next v1 0/4] 'bpf_fastcall' attribute in vmlinux.h and bpf_helper_defs.h Eduard Zingerman
2024-09-16 9:17 ` [PATCH bpf-next v1 1/4] bpf: allow specifying bpf_fastcall attribute for BPF helpers Eduard Zingerman
2024-09-27 22:31 ` Andrii Nakryiko
2024-09-27 22:39 ` Eduard Zingerman
2024-09-16 9:17 ` Eduard Zingerman [this message]
2024-09-16 9:17 ` [PATCH bpf-next v1 3/4] bpf: use KF_FASTCALL to mark kfuncs supporting fastcall contract Eduard Zingerman
2024-09-16 9:17 ` [PATCH bpf-next v1 4/4] bpftool: __bpf_fastcall for kfuncs marked with special decl_tag Eduard Zingerman
2024-09-16 9:22 ` [PATCH bpf-next v1 0/4] 'bpf_fastcall' attribute in vmlinux.h and bpf_helper_defs.h Eduard Zingerman
2024-09-27 22:40 ` patchwork-bot+netdevbpf
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=20240916091712.2929279-3-eddyz87@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=arnaldo.melo@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=martin.lau@linux.dev \
--cc=yonghong.song@linux.dev \
/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