mbox series

[v2,bpf-next,0/3] libbpf: BTF typed dump cleanups

Message ID 1626475617-25984-1-git-send-email-alan.maguire@oracle.com (mailing list archive)
Headers show
Series libbpf: BTF typed dump cleanups | expand

Message

Alan Maguire July 16, 2021, 10:46 p.m. UTC
Fix issues with libbpf BTF typed dump code.  Patch 1 addresses handling
of unaligned data. Patch 2 fixes issues Andrii noticed when compiling
on ppc64le.  Patch 3 simplifies typed dump by getting rid of allocation
of dump data structure which tracks dump state etc.

Changes since v1:

 - Andrii suggested using a function instead of a macro for checking
   alignment of data, and pointed out that we need to consider dump
   ptr size versus native pointer size (patch 1)

Alan Maguire (3):
  libbpf: clarify/fix unaligned data issues for btf typed dump
  libbpf: fix compilation errors on ppc64le for btf dump typed data
  libbpf: btf typed dump does not need to allocate dump data

 tools/lib/bpf/btf_dump.c | 39 ++++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)

Comments

Andrii Nakryiko July 17, 2021, 12:32 a.m. UTC | #1
On Fri, Jul 16, 2021 at 3:47 PM Alan Maguire <alan.maguire@oracle.com> wrote:
>
> Fix issues with libbpf BTF typed dump code.  Patch 1 addresses handling
> of unaligned data. Patch 2 fixes issues Andrii noticed when compiling
> on ppc64le.  Patch 3 simplifies typed dump by getting rid of allocation
> of dump data structure which tracks dump state etc.
>
> Changes since v1:
>
>  - Andrii suggested using a function instead of a macro for checking
>    alignment of data, and pointed out that we need to consider dump
>    ptr size versus native pointer size (patch 1)
>
> Alan Maguire (3):
>   libbpf: clarify/fix unaligned data issues for btf typed dump
>   libbpf: fix compilation errors on ppc64le for btf dump typed data
>   libbpf: btf typed dump does not need to allocate dump data
>
>  tools/lib/bpf/btf_dump.c | 39 ++++++++++++++++++++++++++++++---------
>  1 file changed, 30 insertions(+), 9 deletions(-)
>
> --
> 1.8.3.1
>

Thank you for the quick follow up. But see all the comments I left and
the fix ups I had to do. Just because the changes are small doesn't
mean you should get sloppy about making them. Please be a bit more
thorough in future patches.

Applied to bpf-next.
Andrii Nakryiko July 17, 2021, 12:38 a.m. UTC | #2
On Fri, Jul 16, 2021 at 5:32 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Fri, Jul 16, 2021 at 3:47 PM Alan Maguire <alan.maguire@oracle.com> wrote:
> >
> > Fix issues with libbpf BTF typed dump code.  Patch 1 addresses handling
> > of unaligned data. Patch 2 fixes issues Andrii noticed when compiling
> > on ppc64le.  Patch 3 simplifies typed dump by getting rid of allocation
> > of dump data structure which tracks dump state etc.
> >
> > Changes since v1:
> >
> >  - Andrii suggested using a function instead of a macro for checking
> >    alignment of data, and pointed out that we need to consider dump
> >    ptr size versus native pointer size (patch 1)
> >
> > Alan Maguire (3):
> >   libbpf: clarify/fix unaligned data issues for btf typed dump
> >   libbpf: fix compilation errors on ppc64le for btf dump typed data
> >   libbpf: btf typed dump does not need to allocate dump data
> >
> >  tools/lib/bpf/btf_dump.c | 39 ++++++++++++++++++++++++++++++---------
> >  1 file changed, 30 insertions(+), 9 deletions(-)
> >
> > --
> > 1.8.3.1
> >
>
> Thank you for the quick follow up. But see all the comments I left and

One more thing. Please do reply to the rest of my questions and
concerns on the original patch set. You tend to just address most of
the feedback in the next revision, but I'd appreciate it if you could
reply at least with a simple "ok" or more elaborate answer where
warranted. It makes the code reviewing process a bit easier.

There are still big-endian concerns and an error propagation question
at least that you haven't addressed neither in the follow up patches
nor in an email reply. Please do so, preferably both.

> the fix ups I had to do. Just because the changes are small doesn't
> mean you should get sloppy about making them. Please be a bit more
> thorough in future patches.
>
> Applied to bpf-next.