Skip to content

fix setting return values for htab batch ops and docs

Anton Protopopov bpf lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: fix setting return values for htab batch opskernel/bpf/hashtab.c+7 -73 replies
2/2bpf: update uapi/linux/bpf.h docs on the batch map opsinclude/uapi/linux/bpf.h+12 -101 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchHou Tao
1/2
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf-next 0/2] fix setting return values for htab batch ops and docs

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

https://lore.kernel.org/bpf/[email protected]/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(-)
Signature · 1 line
2.34.1