BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] selftests/bpf: Fixes for map_percpu_stats test
@ 2023-11-01  3:24 Hou Tao
  2023-11-01  3:24 ` [PATCH bpf-next 1/3] selftests/bpf: Use value with enough-size when updating per-cpu map Hou Tao
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hou Tao @ 2023-11-01  3:24 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, Anton Protopopov,
	houtao1

From: Hou Tao <houtao1@huawei.com>

Hi,

BPF CI failed due to map_percpu_stats_percpu_hash from time to time [1].
It seems that the failure reason is per-cpu bpf memory allocator may not
be able to allocate per-cpu pointer successfully and it can not refill
free llist timely, and bpf_map_update_elem() will return -ENOMEM.

Patch #1 fixes the size of value passed to per-cpu map update API. The
problem was found when fixing the ENOMEM problem, so also post it in
this patchset. Patch #2 & #3 mitigates the ENOMEM problem by retrying
the update operation for non-preallocated per-cpu map.

Please see individual patches for more details. And comments are always
welcome.

Regards,
Tao

[1]: https://github.com/kernel-patches/bpf/actions/runs/6713177520/job/18244865326?pr=5909

Hou Tao (3):
  selftests/bpf: Use value with enough-size when updating per-cpu map
  selftests/bpf: Export map_update_retriable()
  selftsets/bpf: Retry map update for non-preallocated per-cpu map

 .../bpf/map_tests/map_percpu_stats.c          | 39 +++++++++++++++++--
 tools/testing/selftests/bpf/test_maps.c       | 17 +++++---
 tools/testing/selftests/bpf/test_maps.h       |  5 +++
 3 files changed, 53 insertions(+), 8 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2023-11-02 16:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01  3:24 [PATCH bpf-next 0/3] selftests/bpf: Fixes for map_percpu_stats test Hou Tao
2023-11-01  3:24 ` [PATCH bpf-next 1/3] selftests/bpf: Use value with enough-size when updating per-cpu map Hou Tao
2023-11-01  3:24 ` [PATCH bpf-next 2/3] selftests/bpf: Export map_update_retriable() Hou Tao
2023-11-01  3:24 ` [PATCH bpf-next 3/3] selftsets/bpf: Retry map update for non-preallocated per-cpu map Hou Tao
2023-11-02 16:50 ` [PATCH bpf-next 0/3] selftests/bpf: Fixes for map_percpu_stats test 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