From: bot+bpf-ci@kernel.org
To: tamird@kernel.org,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,eddyz87@gmail.com,memxor@gmail.com,martin.lau@linux.dev,song@kernel.org,yonghong.song@linux.dev,jolsa@kernel.org,emil@etsalapatis.com,shuah@kernel.org,arighi@nvidia.com,xukuohai@huawei.com,andrea.righi@canonical.com,billy@starlabs.sg,void@manifault.com,ihor.solodrai@linux.dev
Cc: bpf@vger.kernel.org,linux-kselftest@vger.kernel.org,linux-kernel@vger.kernel.org,awerner32@gmail.com,zeffron@riotgames.com,andriin@fb.com,tamird@kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v3 4/8] libbpf: ringbuf: Add a caller-owned iterator
Date: Fri, 20 Nov 2026 21:34:39 +0000 (UTC) [thread overview]
Message-ID: <879cbd5d4fae85a5ccdb53e5e89ec64f6039e1017b62e548daecbee9bc05e900@mail.kernel.org> (raw)
In-Reply-To: <20261120-bpf-ringbuf-fixes-v3-4-ff7ca15d6c37@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]
> libbpf: ringbuf: Add a caller-owned iterator
TL;DR: The new ring_buffer_iter_new/next/destroy exports in libbpf.map may not
follow libbpf's double-underscore naming convention; they become ABI once
released, so should they be renamed?
> diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map
> --- a/tools/lib/bpf/libbpf.map
> +++ b/tools/lib/bpf/libbpf.map
[ ... ]
> @@ -479,4 +479,7 @@ LIBBPF_1.9.0 {
> bpf_program__load;
> bpf_program__load_strategy;
> bpf_program__set_load_strategy;
> + ring_buffer_iter_destroy;
> + ring_buffer_iter_new;
> + ring_buffer_iter_next;
> } LIBBPF_1.8.0;
Should these three names follow the libbpf naming convention for object
methods?
Documentation/bpf/libbpf/libbpf_naming_convention.rst says functions that
work with an object are built from the object name, a double underscore and
a part describing the purpose, as in bpf_object__open and ring_buffer__new.
The other ring buffer exports all use the separator:
ring_buffer__new, ring_buffer__poll, ring_buffer__consume,
ring_buffer__consume_n, ring_buffer__ring
ring__consume, ring__consume_n, ring__consumer_pos, ring__producer_pos,
ring__avail_data_size, ring__size, ring__map_fd
user_ring_buffer__new, user_ring_buffer__reserve, user_ring_buffer__submit
ring_buffer_iter_new(), ring_buffer_iter_next() and ring_buffer_iter_destroy()
look like the only ring buffer symbols without it, and the iterator is
created from a struct ring * while the existing per-ring operations use the
ring__ prefix.
Once a libbpf release ships these names in libbpf.map they become ABI.
Would ring_buffer_iter__new()/__next()/__destroy() or ring__iter_*() be a
better fit?
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/44815895103
next prev parent reply other threads:[~2026-11-20 21:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 20:33 [PATCH bpf-next v3 0/8] bpf: Fix ring buffers and add a libbpf iterator Tamir Duberstein
2026-11-20 20:33 ` [PATCH bpf-next v3 1/8] bpf: user_ringbuf: Handle position wrap Tamir Duberstein
2026-11-20 20:33 ` [PATCH bpf-next v3 2/8] libbpf: ringbuf: Use compiler atomics Tamir Duberstein
2026-11-20 21:34 ` bot+bpf-ci
2026-11-20 20:33 ` [PATCH bpf-next v3 3/8] libbpf: ringbuf: Prevent missed wakeups Tamir Duberstein
2026-11-20 20:33 ` [PATCH bpf-next v3 4/8] libbpf: ringbuf: Add a caller-owned iterator Tamir Duberstein
2026-11-20 21:34 ` bot+bpf-ci [this message]
2026-11-20 20:33 ` [PATCH bpf-next v3 5/8] libbpf: ringbuf: Simplify iterator implementation Tamir Duberstein
2026-11-20 20:33 ` [PATCH bpf-next v3 6/8] selftests/bpf: Refactor lifetimes and test wakeups Tamir Duberstein
2026-11-20 21:34 ` bot+bpf-ci
2026-11-20 20:33 ` [PATCH bpf-next v3 7/8] selftests/bpf: Verify ringbuf callback semantics Tamir Duberstein
2026-11-20 20:33 ` [PATCH bpf-next v3 8/8] selftests/bpf: Test caller-owned ring iterators Tamir Duberstein
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=879cbd5d4fae85a5ccdb53e5e89ec64f6039e1017b62e548daecbee9bc05e900@mail.kernel.org \
--to=bot+bpf-ci@kernel.org \
--cc=andrea.righi@canonical.com \
--cc=andrii@kernel.org \
--cc=andriin@fb.com \
--cc=arighi@nvidia.com \
--cc=ast@kernel.org \
--cc=awerner32@gmail.com \
--cc=billy@starlabs.sg \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=mason@kernel.org \
--cc=memxor@gmail.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=tamird@kernel.org \
--cc=void@manifault.com \
--cc=xukuohai@huawei.com \
--cc=yonghong.song@linux.dev \
--cc=zeffron@riotgames.com \
/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
all inboxes | Powered by JetHome®