netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/3] bpf: btf: print bpftool map data with btf
@ 2018-07-08 20:30 Okash Khawaja
  2018-07-08 20:30 ` [PATCH bpf-next v3 2/3] bpf: btf: add btf print functionality Okash Khawaja
  2018-07-08 20:30 ` [PATCH bpf-next v3 3/3] bpf: btf: print map dump and lookup with btf info Okash Khawaja
  0 siblings, 2 replies; 6+ messages in thread
From: Okash Khawaja @ 2018-07-08 20:30 UTC (permalink / raw)
  To: Daniel Borkmann, Martin KaFai Lau, Alexei Starovoitov,
	Yonghong Song, Quentin Monnet, Jakub Kicinski, David S. Miller
  Cc: netdev, kernel-team, linux-kernel

Hi,

This v3 contains incorporates feedback from v2, including a fix for big endian
when extracting bitfields. Below is a summary of all changes.

patch 1:
- use kernel integer types instead of stdint

patch 2:
- change stdint types to kernel equivalents
- remove variable ret from btf_dumper_modifier()
- remove unnecessary parentheses in btf_dumper_enum()
- remove unnecessary parentheses in btf_dumper_array()
- change integer types from explicitly sized to int in btf_dumper_int_bits
- fix btf_dumper_int_bits() so it works for little and big endian
- remove double space in btf_dumper_int()
- print non-printable characters as string
- remove ret variable from btf_dumper_int()
- don't initialise variable with function which needs error check in
  btf_dumper_struct()
- use a temp variable to avoid multi-line statement in btf_dumper_struct()
- call jsonw_end_object before returning in error case in btf_dumper_struct()
- print something in case of BTF_KIND_FWD in btf_dumper_do_type()
- return directly from cases in switch-case and save 9 LOC in
  btf_dumper_do_type()
- remove check for null argument in btf_dumper_type()
- remove header file btf_dumper.h and move declarations to main.h

patch 3:
- change stdint types to kernel equivalents
- keep header includes in alphabetical order
- use goto in do_dump_btf() to ensure jsonw_end_object() in cases of error
- don't initialise variable with functions that can fail in get_btf()
- remove json-breaking printf in get_btf()
- refactor so that there isn't too much code in if (!err) case in do_lookup()

Thanks,
Okash

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

end of thread, other threads:[~2018-07-10 15:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-08 20:30 [PATCH bpf-next v3 0/3] bpf: btf: print bpftool map data with btf Okash Khawaja
2018-07-08 20:30 ` [PATCH bpf-next v3 2/3] bpf: btf: add btf print functionality Okash Khawaja
2018-07-10  3:56   ` Jakub Kicinski
2018-07-10 15:05     ` Okash Khawaja
2018-07-08 20:30 ` [PATCH bpf-next v3 3/3] bpf: btf: print map dump and lookup with btf info Okash Khawaja
2018-07-10  4:06   ` Jakub Kicinski

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