bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Print map ID on successful creation
@ 2025-10-30 21:06 Harshit Mogalapalli
  2025-10-30 21:06 ` [PATCH v2 1/2] bpftool: Print map ID upon creation and support JSON output Harshit Mogalapalli
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Harshit Mogalapalli @ 2025-10-30 21:06 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 RFC 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.

The github issue is not fully solved with these two patches, as there
are other bpf objects that might need similar additions. Would
appreciate any inputs on this.

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]

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 | 36 +++++++++++++++++++
 2 files changed, 53 insertions(+), 4 deletions(-)

-- 
2.50.1


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

end of thread, other threads:[~2025-11-01 19:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 21:06 [PATCH v2 0/2] Print map ID on successful creation Harshit Mogalapalli
2025-10-30 21:06 ` [PATCH v2 1/2] bpftool: Print map ID upon creation and support JSON output Harshit Mogalapalli
2025-10-31  5:21   ` Yonghong Song
2025-11-01 16:59   ` Quentin Monnet
2025-11-01 18:46     ` Harshit Mogalapalli
2025-10-30 21:06 ` [PATCH v2 2/2] selftests/bpf: Add test for bpftool map ID printing Harshit Mogalapalli
2025-11-01 16:59   ` Quentin Monnet
2025-11-01 16:59 ` [PATCH v2 0/2] Print map ID on successful creation Quentin Monnet
2025-11-01 19:20   ` Harshit Mogalapalli

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).