bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] fix setting return values for htab batch ops and docs
@ 2023-07-17 11:43 Anton Protopopov
  2023-07-17 11:43 ` [PATCH bpf-next 1/2] bpf: fix setting return values for htab batch ops Anton Protopopov
  2023-07-17 11:43 ` [PATCH bpf-next 2/2] bpf: update uapi/linux/bpf.h docs on the batch map ops Anton Protopopov
  0 siblings, 2 replies; 7+ messages in thread
From: Anton Protopopov @ 2023-07-17 11:43 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Brian Vazquez,
	Hou Tao, Joe Stringer, bpf, linux-kernel
  Cc: Anton Protopopov

This is a small follow up to the conversation with Hou in the following
thread:

  https://lore.kernel.org/bpf/20230705160139.19967-1-aspsk@isovalent.com/T/#u

Namely, the conversation was about that comments in <linux/bpf.h>
describing the return values from the batch operations are not 100%
obvious. I tried to make comments more clear. While doing this I also
found that this is better to patch how __htab_map_lookup_and_delete_batch
sets return values: the output parameter count could be set to non-zero in
case of error, which may confuse some userspace apps (as errno && non-zero
counter is considered a partially successful operation for batch ops).

Anton Protopopov (2):
  bpf: fix setting return values for htab batch ops
  bpf: update uapi/linux/bpf.h docs on the batch map ops

 include/uapi/linux/bpf.h | 22 ++++++++++++----------
 kernel/bpf/hashtab.c     | 14 +++++++-------
 2 files changed, 19 insertions(+), 17 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2023-07-26  9:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 11:43 [PATCH bpf-next 0/2] fix setting return values for htab batch ops and docs Anton Protopopov
2023-07-17 11:43 ` [PATCH bpf-next 1/2] bpf: fix setting return values for htab batch ops Anton Protopopov
2023-07-19  0:52   ` Alexei Starovoitov
2023-07-19  7:09     ` Anton Protopopov
2023-07-19 16:28       ` Alexei Starovoitov
2023-07-17 11:43 ` [PATCH bpf-next 2/2] bpf: update uapi/linux/bpf.h docs on the batch map ops Anton Protopopov
2023-07-26  9:12   ` Hou Tao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).