[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251101193357.111186-1-harshit.m.mogalapalli@oracle.com>
Date: Sat, 1 Nov 2025 12:33:53 -0700
From: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
To: bpf@...r.kernel.org
Cc: alan.maguire@...cle.com,
Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>,
Quentin Monnet <qmo@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: [PATCH v3 0/2] Print map ID on successful creation
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
Powered by blists - more mailing lists