BPF List
 help / color / mirror / Atom feed
* [PATCH] docs: bpf: document BPF_RB_OVERWRITE_POS in bpf_ringbuf_query
@ 2026-07-13  1:38 Jianlin Shi
  2026-07-13  1:47 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Jianlin Shi @ 2026-07-13  1:38 UTC (permalink / raw)
  To: bpf; +Cc: ast, daniel, andrii, linux-kernel

BPF_RB_OVERWRITE_POS is supported by bpf_ringbuf_query() but was missing
from the helper documentation. Add it to the flags list.

Signed-off-by: Jianlin Shi <shijianlin11@foxmail.com>
---
 include/uapi/linux/bpf.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index c8d400b76..fe2873f6c 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -4664,6 +4664,7 @@ union bpf_attr {
  *		* **BPF_RB_RING_SIZE**: The size of ring buffer.
  *		* **BPF_RB_CONS_POS**: Consumer position (can wrap around).
  *		* **BPF_RB_PROD_POS**: Producer(s) position (can wrap around).
+ *		* **BPF_RB_OVERWRITE_POS**: Overwrite position (can wrap around).
  *
  *		Data returned is just a momentary snapshot of actual values
  *		and could be inaccurate, so this facility should be used to
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] docs: bpf: document BPF_RB_OVERWRITE_POS in bpf_ringbuf_query
  2026-07-13  1:38 [PATCH] docs: bpf: document BPF_RB_OVERWRITE_POS in bpf_ringbuf_query Jianlin Shi
@ 2026-07-13  1:47 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-07-13  1:47 UTC (permalink / raw)
  To: Jianlin Shi; +Cc: bpf

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch updates the UAPI documentation in `include/uapi/linux/bpf.h` but fails to synchronize the changes with its mirror at `tools/include/uapi/linux/bpf.h`.
--

--- Patch [1]: [PATCH] docs: bpf: document BPF_RB_OVERWRITE_POS in bpf_ringbuf_query ---
commit 9f79b54782767de257ac85a74f7e4fd0e2c3a774
Author: Jianlin Shi <shijianlin11@foxmail.com>

docs: bpf: document BPF_RB_OVERWRITE_POS in bpf_ringbuf_query

This commit updates the bpf_ringbuf_query() helper documentation in
include/uapi/linux/bpf.h by adding the missing BPF_RB_OVERWRITE_POS flag.

> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index 2f1d24fef8573..f1b650b3addbd 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> @@ -4694,6 +4694,7 @@ union bpf_attr {
>   *		* **BPF_RB_RING_SIZE**: The size of ring buffer.
>   *		* **BPF_RB_CONS_POS**: Consumer position (can wrap around).
>   *		* **BPF_RB_PROD_POS**: Producer(s) position (can wrap around).
> + *		* **BPF_RB_OVERWRITE_POS**: Overwrite position (can wrap around).

[Severity: Low]
Is this change missing the corresponding update to the mirrored header at
tools/include/uapi/linux/bpf.h?

Since the tools copy isn't updated in this patch, building in tools/lib/bpf/
will emit a warning about the kernel ABI header differing from the tools
version. 

Additionally, scripts/bpf_doc.py parses the tools copy of this header, so the
newly added documentation for BPF_RB_OVERWRITE_POS won't be included in the
generated bpf_helper_defs.h used by userspace BPF applications.

>   *
>   *		Data returned is just a momentary snapshot of actual values
>   *		and could be inaccurate, so this facility should be used to

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_38F9B572430A53ED62FA69944E7448970A05@qq.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-13  1:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13  1:38 [PATCH] docs: bpf: document BPF_RB_OVERWRITE_POS in bpf_ringbuf_query Jianlin Shi
2026-07-13  1:47 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox