From: Eduard Zingerman <eddyz87@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Ihor Solodrai" <ihor.solodrai@linux.dev>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
"Martin KaFai Lau" <martin.lau@linux.dev>,
"Song Liu" <song@kernel.org>,
"Yonghong Song" <yonghong.song@linux.dev>,
"Jiri Olsa" <jolsa@kernel.org>,
"Emil Tsalapatis" <emil@etsalapatis.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 1/4] libbpf: Add bpf_program__add_flags() and bpf_program__clear_flags()
Date: Thu, 10 Sep 2026 15:43:13 -0700 [thread overview]
Message-ID: <9f28bead21b014edf092ca07c03de7380bfe5390.camel@gmail.com> (raw)
In-Reply-To: <20260910183222.307208-1-toke@redhat.com>
On Thu, 2026-09-10 at 20:32 +0200, Toke Høiland-Jørgensen wrote:
> When changing BPF program flags, applications often need to just add or
> remove a single flag, without touching the existing ones. When using the
> bpf_program__set_flags() function, this requires reading the existing
> flags and doing bitwise manipulations before resetting the result, which
> is slightly awkward to do, and easy to forget.
>
> Add two new convenience helpers, bpf_program__add_flags() and
> bpf_program__clear_flags(), which wraps bpf_program__set_flags() in the
> bitwise operations required to modify flags without clobbering the
> existing ones.
>
> Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev>
> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
> ---
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
...
next prev parent reply other threads:[~2026-09-10 22:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 18:32 [PATCH bpf-next v2 1/4] libbpf: Add bpf_program__add_flags() and bpf_program__clear_flags() Toke Høiland-Jørgensen
2026-09-10 18:32 ` [PATCH bpf-next v2 2/4] selftests/bpf: Add assertions for bpf_program__{add,clear}_flags() Toke Høiland-Jørgensen
2026-09-10 18:42 ` sashiko-bot
2026-09-10 18:32 ` [PATCH bpf-next v2 3/4] selftests/bpf: Adopt bpf_program__add_flags() helper Toke Høiland-Jørgensen
2026-09-10 18:45 ` sashiko-bot
2026-09-11 3:18 ` Jiayuan Chen
2026-09-11 9:53 ` Toke Høiland-Jørgensen
2026-09-11 19:27 ` Andrii Nakryiko
2026-09-12 8:24 ` Toke Høiland-Jørgensen
2026-09-10 18:32 ` [PATCH bpf-next v2 4/4] bpftool: " Toke Høiland-Jørgensen
2026-09-10 18:40 ` [PATCH bpf-next v2 1/4] libbpf: Add bpf_program__add_flags() and bpf_program__clear_flags() sashiko-bot
2026-09-10 22:43 ` Eduard Zingerman [this message]
2026-09-11 3:07 ` Jiayuan Chen
2026-09-11 19:27 ` Andrii Nakryiko
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=9f28bead21b014edf092ca07c03de7380bfe5390.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=song@kernel.org \
--cc=toke@redhat.com \
--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 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.