Subject: Re: [PATCH 1/1] bpftool: Allow referring to maps by its name

From: Arnaldo Carvalho de Melo <[email-masked]>
Date: Fri, 15 Mar 2019 16:51:42 -0300

Em Fri, Mar 15, 2019 at 12:16:32PM -0700, Jakub Kicinski escreveu:
> Please do keep the current model of name val, IOW dump map *name* pids..

I don't have a problem with that, but what would be the problem with
supporting both:

  bpftool map dump name pids_filtered

and:

  bpftool map dump pids_filtered

And for that matter, even:

  bpftool map dump id 30

And

  bpftool map dump 30

Ditto for 'pinned'?

I.e. less typing, the tool can be smart enough to figure out what is
that is being asked, i.e. is it a number? Try first it as an 'id', etc.

- Arnaldo
 
> >   [{
> >           "key": 26554,
> >           "value": true
> >       },{
> >           "key": 2592,
> >           "value": true
> >       }
> >   ]
> >   #
> > 
> > Cc: Alexei Starovoitov <[email-masked]>
> > Cc: Daniel Borkmann <[email-masked]>
> > Cc: Jakub Kicinski <[email-masked]>
> > cc: Jiri Olsa <[email-masked]>
> > Cc: Martin KaFai Lau <[email-masked]>
> > Cc: Namhyung Kim <[email-masked]>
> > Cc: Peter Zijlstra <[email-masked]>
> > Cc: Quentin Monnet <[email-masked]>
> > Cc: Song Liu <[email-masked]>
> > Cc: Stanislav Fomichev <[email-masked]>
> > Cc: Yonghong Song <[email-masked]>
> > Link: https://lkml.kernel.org/n/[email-masked]
> > Signed-off-by: Arnaldo Carvalho de Melo <[email-masked]>
> 
> Please also update the bash completions and all the help/mans/docs.

-- 

- Arnaldo