Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] Small API fix for bpf_wq
@ 2024-07-05 13:44 Benjamin Tissoires
  2024-07-05 13:44 ` [PATCH bpf-next 1/2] bpf: helpers: fix bpf_wq_set_callback_impl signature Benjamin Tissoires
  2024-07-05 13:44 ` [PATCH bpf-next 2/2] selftests/bpf: amend for wrong " Benjamin Tissoires
  0 siblings, 2 replies; 7+ messages in thread
From: Benjamin Tissoires @ 2024-07-05 13:44 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Mykola Lysenko, Shuah Khan
  Cc: bpf, linux-kernel, linux-kselftest, Benjamin Tissoires

I realized this while having a map containing both a struct bpf_timer and
a struct bpf_wq: the third argument provided to the bpf_wq callback is
not the struct bpf_wq pointer itself, but the pointer to the value in
the map.

Which means that the users need to double cast the provided "value" as
this is not a struct bpf_wq *.

This is a change of API, but there doesn't seem to be much users of bpf_wq
right now, so we should be able to go with this right now.

Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
---
Benjamin Tissoires (2):
      bpf: helpers: fix bpf_wq_set_callback_impl signature
      selftests/bpf: amend for wrong bpf_wq_set_callback_impl signature

 kernel/bpf/helpers.c                            | 2 +-
 tools/testing/selftests/bpf/bpf_experimental.h  | 2 +-
 tools/testing/selftests/bpf/progs/wq.c          | 8 ++++----
 tools/testing/selftests/bpf/progs/wq_failures.c | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
---
base-commit: fd8db07705c55a995c42b1e71afc42faad675b0b
change-id: 20240705-fix-wq-f069c7fb36c3

Best regards,
-- 
Benjamin Tissoires <bentiss@kernel.org>


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

end of thread, other threads:[~2024-07-08  9:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-05 13:44 [PATCH bpf-next 0/2] Small API fix for bpf_wq Benjamin Tissoires
2024-07-05 13:44 ` [PATCH bpf-next 1/2] bpf: helpers: fix bpf_wq_set_callback_impl signature Benjamin Tissoires
2024-07-05 20:58   ` Eduard Zingerman
2024-07-05 13:44 ` [PATCH bpf-next 2/2] selftests/bpf: amend for wrong " Benjamin Tissoires
2024-07-05 20:54   ` Eduard Zingerman
2024-07-07  0:53     ` Alexei Starovoitov
2024-07-08  9:50       ` Benjamin Tissoires

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