BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/7] bpf: Fixes for maybe_wait_bpf_programs()
@ 2023-12-08 10:23 Hou Tao
  2023-12-08 10:23 ` [PATCH bpf-next 1/7] bpf: Remove unnecessary wait from bpf_map_copy_value() Hou Tao
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Hou Tao @ 2023-12-08 10:23 UTC (permalink / raw)
  To: bpf
  Cc: Martin KaFai Lau, Alexei Starovoitov, Andrii Nakryiko, Song Liu,
	Hao Luo, Yonghong Song, Daniel Borkmann, KP Singh,
	Stanislav Fomichev, Jiri Olsa, John Fastabend, houtao1

From: Hou Tao <houtao1@huawei.com>

Hi,

The patch set aims to fix the problems found when inspecting the code
related with maybe_wait_bpf_programs().

Patch #1 removes unnecessary invocation of maybe_wait_bpf_programs().
Patch #2 calls maybe_wait_bpf_programs() only once for batched update.
Patch #3 adds the missed waiting when doing batched lookup_deletion on
htab of maps. Patch #4 does wait only if the update or deletion
operation succeeds. Patch #5 fixes the value of batch.count when memory
allocation fails. Patch #6 does the similar thing as patch #4, except it
fixes the problem for batched map operations. Patch #7 handles sleepable
BPF program in maybe_wait_bpf_programs(), but it doesn't handle the bpf
syscall from syscall program.

Please see individual patches for more details. Comments are always
welcome.

Hou Tao (7):
  bpf: Remove unnecessary wait from bpf_map_copy_value()
  bpf: Call maybe_wait_bpf_programs() only once for
    generic_map_update_batch()
  bpf: Add missed maybe_wait_bpf_programs() for htab of maps
  bpf: Only call maybe_wait_bpf_programs() when map operation succeeds
  bpf: Set uattr->batch.count as zero before batched update or deletion
  bpf: Only call maybe_wait_bpf_programs() when at least one map
    operation succeeds
  bpf: Wait for sleepable BPF program in maybe_wait_bpf_programs()

 include/linux/bpf.h  | 14 +++++------
 kernel/bpf/hashtab.c | 20 ++++++++-------
 kernel/bpf/syscall.c | 60 +++++++++++++++++++++++++++++++-------------
 3 files changed, 61 insertions(+), 33 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2023-12-11  3:03 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-08 10:23 [PATCH bpf-next 0/7] bpf: Fixes for maybe_wait_bpf_programs() Hou Tao
2023-12-08 10:23 ` [PATCH bpf-next 1/7] bpf: Remove unnecessary wait from bpf_map_copy_value() Hou Tao
2023-12-08 10:23 ` [PATCH bpf-next 2/7] bpf: Call maybe_wait_bpf_programs() only once for generic_map_update_batch() Hou Tao
2023-12-08 10:23 ` [PATCH bpf-next 3/7] bpf: Add missed maybe_wait_bpf_programs() for htab of maps Hou Tao
2023-12-08 10:23 ` [PATCH bpf-next 4/7] bpf: Only call maybe_wait_bpf_programs() when map operation succeeds Hou Tao
2023-12-08 10:23 ` [PATCH bpf-next 5/7] bpf: Set uattr->batch.count as zero before batched update or deletion Hou Tao
2023-12-08 10:23 ` [PATCH bpf-next 6/7] bpf: Only call maybe_wait_bpf_programs() when at least one map operation succeeds Hou Tao
2023-12-08 22:55   ` Yonghong Song
2023-12-10  2:11     ` Alexei Starovoitov
2023-12-11  1:11       ` Hou Tao
2023-12-08 10:23 ` [PATCH bpf-next 7/7] bpf: Wait for sleepable BPF program in maybe_wait_bpf_programs() Hou Tao
2023-12-08 22:30   ` Andrii Nakryiko
2023-12-11  1:17     ` Hou Tao
2023-12-10  2:11   ` Alexei Starovoitov
2023-12-11  2:07     ` Hou Tao
2023-12-11  2:56       ` Alexei Starovoitov
2023-12-11  3:03         ` Hou Tao
2023-12-10  2:40 ` [PATCH bpf-next 0/7] bpf: Fixes for maybe_wait_bpf_programs() patchwork-bot+netdevbpf

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