public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Print map ID on successful creation
@ 2025-11-01 19:33 Harshit Mogalapalli
  2025-11-01 19:33 ` [PATCH v3 1/2] bpftool: Print map ID upon creation and support JSON output Harshit Mogalapalli
  2025-11-01 19:33 ` [PATCH v3 2/2] selftests/bpf: Add test for bpftool map ID printing Harshit Mogalapalli
  0 siblings, 2 replies; 11+ messages in thread
From: Harshit Mogalapalli @ 2025-11-01 19:33 UTC (permalink / raw)
  To: bpf
  Cc: alan.maguire, Harshit Mogalapalli, Quentin Monnet,
	Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Shuah Khan, linux-kernel, linux-kselftest

Hi all,

I have tried looking at an issue from the bpftool repository:
https://github.com/libbpf/bpftool/issues/121 and this patch series
tries to add that enhancement.

Summary: Currently when a map creation is successful there is no message
on the terminal, printing IDs on successful creation of maps can help
notify the user and can be used in CI/CD.

The first patch adds the logic for printing and the second patch adds a
simple selftest for the same.

Thank you very much.

V1 --> V2: PATCH 1 updated [Thanks Yonghong for suggesting better way of
error handling with a new label for close(fd); instead of calling
multiple times]

V2 --> V3: Thanks to Quentin.
	PATCH1: drop \n in p_err statement
	PATCH2: Remove messages in cases of successful ID printing. Also
	remove message with a "FAIL:" prefix to make it more consistent.

Regards,
Harshit


Harshit Mogalapalli (2):
  bpftool: Print map ID upon creation and support JSON output
  selftests/bpf: Add test for bpftool map ID printing

 tools/bpf/bpftool/map.c                       | 21 +++++++++---
 .../testing/selftests/bpf/test_bpftool_map.sh | 32 +++++++++++++++++++
 2 files changed, 49 insertions(+), 4 deletions(-)

-- 
2.50.1


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

end of thread, other threads:[~2025-11-06 13:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-01 19:33 [PATCH v3 0/2] Print map ID on successful creation Harshit Mogalapalli
2025-11-01 19:33 ` [PATCH v3 1/2] bpftool: Print map ID upon creation and support JSON output Harshit Mogalapalli
2025-11-04 17:54   ` Alexei Starovoitov
2025-11-05  9:37     ` Quentin Monnet
2025-11-06  1:29       ` Alexei Starovoitov
2025-11-06  2:05         ` Quentin Monnet
2025-11-06  2:14           ` Alexei Starovoitov
2025-11-06  2:25             ` Quentin Monnet
2025-11-06 13:12               ` Harshit Mogalapalli
2025-11-01 19:33 ` [PATCH v3 2/2] selftests/bpf: Add test for bpftool map ID printing Harshit Mogalapalli
2025-11-03 14:31   ` Quentin Monnet

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