Re: [PATCH bpf-next v2 1/2] tools: bpftool: clean up function to dump map entry

2020-09-09 Thread Andrii Nakryiko
On Wed, Sep 9, 2020 at 9:59 AM Quentin Monnet wrote: > > On 09/09/2020 17:46, Andrii Nakryiko wrote: > > On Wed, Sep 9, 2020 at 9:38 AM Quentin Monnet wrote: > >> > >> On 09/09/2020 17:30, Andrii Nakryiko wrote: > >>> On Wed, Sep 9, 2020 at 1:19 AM Quentin Monnet > >>> wrote: > > On 0

Re: [PATCH bpf-next v2 1/2] tools: bpftool: clean up function to dump map entry

2020-09-09 Thread Quentin Monnet
On 09/09/2020 17:46, Andrii Nakryiko wrote: > On Wed, Sep 9, 2020 at 9:38 AM Quentin Monnet wrote: >> >> On 09/09/2020 17:30, Andrii Nakryiko wrote: >>> On Wed, Sep 9, 2020 at 1:19 AM Quentin Monnet wrote: On 09/09/2020 04:25, Andrii Nakryiko wrote: > On Mon, Sep 7, 2020 at 9:36 AM

Re: [PATCH bpf-next v2 1/2] tools: bpftool: clean up function to dump map entry

2020-09-09 Thread Andrii Nakryiko
On Wed, Sep 9, 2020 at 9:38 AM Quentin Monnet wrote: > > On 09/09/2020 17:30, Andrii Nakryiko wrote: > > On Wed, Sep 9, 2020 at 1:19 AM Quentin Monnet wrote: > >> > >> On 09/09/2020 04:25, Andrii Nakryiko wrote: > >>> On Mon, Sep 7, 2020 at 9:36 AM Quentin Monnet > >>> wrote: > > The

Re: [PATCH bpf-next v2 1/2] tools: bpftool: clean up function to dump map entry

2020-09-09 Thread Quentin Monnet
On 09/09/2020 17:30, Andrii Nakryiko wrote: > On Wed, Sep 9, 2020 at 1:19 AM Quentin Monnet wrote: >> >> On 09/09/2020 04:25, Andrii Nakryiko wrote: >>> On Mon, Sep 7, 2020 at 9:36 AM Quentin Monnet wrote: The function used to dump a map entry in bpftool is a bit difficult to follo

Re: [PATCH bpf-next v2 1/2] tools: bpftool: clean up function to dump map entry

2020-09-09 Thread Andrii Nakryiko
On Wed, Sep 9, 2020 at 1:19 AM Quentin Monnet wrote: > > On 09/09/2020 04:25, Andrii Nakryiko wrote: > > On Mon, Sep 7, 2020 at 9:36 AM Quentin Monnet wrote: > >> > >> The function used to dump a map entry in bpftool is a bit difficult to > >> follow, as a consequence to earlier refactorings. The

Re: [PATCH bpf-next v2 1/2] tools: bpftool: clean up function to dump map entry

2020-09-09 Thread Quentin Monnet
On 09/09/2020 04:25, Andrii Nakryiko wrote: > On Mon, Sep 7, 2020 at 9:36 AM Quentin Monnet wrote: >> >> The function used to dump a map entry in bpftool is a bit difficult to >> follow, as a consequence to earlier refactorings. There is a variable >> ("num_elems") which does not appear to be nece

Re: [PATCH bpf-next v2 1/2] tools: bpftool: clean up function to dump map entry

2020-09-08 Thread Andrii Nakryiko
On Mon, Sep 7, 2020 at 9:36 AM Quentin Monnet wrote: > > The function used to dump a map entry in bpftool is a bit difficult to > follow, as a consequence to earlier refactorings. There is a variable > ("num_elems") which does not appear to be necessary, and the error > handling would look cleaner

[PATCH bpf-next v2 1/2] tools: bpftool: clean up function to dump map entry

2020-09-07 Thread Quentin Monnet
The function used to dump a map entry in bpftool is a bit difficult to follow, as a consequence to earlier refactorings. There is a variable ("num_elems") which does not appear to be necessary, and the error handling would look cleaner if moved to its own function. Let's clean it up. No functional