Skip to content

bpf: cpumap: improve error propagation in cpu_map_update_elem()

Kohei Enju bpf linux-kselftest netdev 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesApplied 2/2
  2. v12 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- send to bpf-next, not to bpf
- drop Fixes: tag
v1: https://lore.kernel.org/bpf/[email protected]/

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: cpumap: propagate underlying error in cpu_map_update_elem()kernel/bpf/cpumap.c+13 -81 replyApplied
2/2selftests/bpf: add tests for attaching invalid fdtools/testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c+17 -21 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchToke Høiland-Jørgensen
1/2R-b
2/2R-b

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

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/2] bpf: cpumap: improve error propagation in cpu_map_update_elem()

This series improves error propagation in cpumap and adds selftests that cover the failure cases.

Currently, failures returned from __cpu_map_entry_alloc() are ignored and always converted to -ENOMEM by cpu_map_update_elem(). This series ensures the correct error propagation and adds selftests.

Changes:
v2:
- send to bpf-next, not to bpf
- drop Fixes: tag
v1: https://lore.kernel.org/bpf/[email protected]/

Kohei Enju (2):
bpf: cpumap: propagate underlying error in cpu_map_update_elem() selftests/bpf: add tests for attaching invalid fd

 kernel/bpf/cpumap.c                           | 21 ++++++++++++-------
 .../bpf/prog_tests/xdp_cpumap_attach.c        | 19 +++++++++++++++--
 2 files changed, 30 insertions(+), 10 deletions(-)
Signature · 1 line
2.51.0