bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] bpftool: Fix some json formatting for struct_ops
@ 2023-10-18 23:01 Manu Bretelle
  2023-10-18 23:01 ` [PATCH bpf-next 1/2] bpftool: fix printing of pointer value Manu Bretelle
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Manu Bretelle @ 2023-10-18 23:01 UTC (permalink / raw)
  To: bpf, quentin, andrii, daniel, ast, martin.lau, song,
	john.fastabend, kpsingh, sdf, haoluo, jolsa

When dumping struct_ops with bpftool, the json produced was invalid.
1) pointer values where not printed with surrounding quotes, causing an
invalid json integer to be emitted
2) when bpftool struct_ops dump id <id>, the 2 dictionaries were not
wrapped in a array, here also causing an invalid json payload to be
emitted. 

Manu Bretelle (2):
  bpftool: fix printing of pointer value
  bpftool: wrap struct_ops dump in an array

 tools/bpf/bpftool/btf_dumper.c | 2 +-
 tools/bpf/bpftool/struct_ops.c | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

-- 
2.39.3


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

end of thread, other threads:[~2023-10-19 14:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18 23:01 [PATCH bpf-next 0/2] bpftool: Fix some json formatting for struct_ops Manu Bretelle
2023-10-18 23:01 ` [PATCH bpf-next 1/2] bpftool: fix printing of pointer value Manu Bretelle
2023-10-18 23:01 ` [PATCH bpf-next 2/2] bpftool: wrap struct_ops dump in an array Manu Bretelle
2023-10-19 12:56 ` [PATCH bpf-next 0/2] bpftool: Fix some json formatting for struct_ops Eduard Zingerman
2023-10-19 14:28 ` Quentin Monnet
2023-10-19 14:40 ` 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;
as well as URLs for NNTP newsgroup(s).