* [PATCH bpf-next] bpftool: feature probing, change default action
@ 2019-01-24 2:51 Prashant Bhole
2019-01-24 9:05 ` Quentin Monnet
2019-01-24 11:29 ` Daniel Borkmann
0 siblings, 2 replies; 3+ messages in thread
From: Prashant Bhole @ 2019-01-24 2:51 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann
Cc: Prashant Bhole, netdev, Quentin Monnet, Jakub Kicinski
When 'bpftool feature' is executed it shows incorrect help string.
test# bpftool feature
Usage: bpftool bpftool probe [COMPONENT] [macros [prefix PREFIX]]
bpftool bpftool help
COMPONENT := { kernel | dev NAME }
Instead of fixing the help text by tweaking argv[] indices, this
patch changes the default action to 'probe'. It makes the behavior
consistent with other subcommands, where first subcommand without
extra parameter results in 'show' action.
Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
---
tools/bpf/bpftool/feature.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
index 993c6f1e5473..d672d9086fff 100644
--- a/tools/bpf/bpftool/feature.c
+++ b/tools/bpf/bpftool/feature.c
@@ -753,8 +753,8 @@ static int do_help(int argc, char **argv)
}
static const struct cmd cmds[] = {
- { "help", do_help },
{ "probe", do_probe },
+ { "help", do_help },
{ 0 }
};
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpftool: feature probing, change default action
2019-01-24 2:51 [PATCH bpf-next] bpftool: feature probing, change default action Prashant Bhole
@ 2019-01-24 9:05 ` Quentin Monnet
2019-01-24 11:29 ` Daniel Borkmann
1 sibling, 0 replies; 3+ messages in thread
From: Quentin Monnet @ 2019-01-24 9:05 UTC (permalink / raw)
To: Prashant Bhole, Alexei Starovoitov, Daniel Borkmann
Cc: netdev, Jakub Kicinski
2019-01-24 11:51 UTC+0900 ~ Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
> When 'bpftool feature' is executed it shows incorrect help string.
>
> test# bpftool feature
> Usage: bpftool bpftool probe [COMPONENT] [macros [prefix PREFIX]]
> bpftool bpftool help
>
> COMPONENT := { kernel | dev NAME }
>
> Instead of fixing the help text by tweaking argv[] indices, this
> patch changes the default action to 'probe'. It makes the behavior
> consistent with other subcommands, where first subcommand without
> extra parameter results in 'show' action.
>
> Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
> ---
> tools/bpf/bpftool/feature.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
> index 993c6f1e5473..d672d9086fff 100644
> --- a/tools/bpf/bpftool/feature.c
> +++ b/tools/bpf/bpftool/feature.c
> @@ -753,8 +753,8 @@ static int do_help(int argc, char **argv)
> }
>
> static const struct cmd cmds[] = {
> - { "help", do_help },
> { "probe", do_probe },
> + { "help", do_help },
> { 0 }
> };
>
>
Oh, thanks! This seems to be the correct thing to do indeed.
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpftool: feature probing, change default action
2019-01-24 2:51 [PATCH bpf-next] bpftool: feature probing, change default action Prashant Bhole
2019-01-24 9:05 ` Quentin Monnet
@ 2019-01-24 11:29 ` Daniel Borkmann
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2019-01-24 11:29 UTC (permalink / raw)
To: Prashant Bhole, Alexei Starovoitov; +Cc: netdev, Quentin Monnet, Jakub Kicinski
On 01/24/2019 03:51 AM, Prashant Bhole wrote:
> When 'bpftool feature' is executed it shows incorrect help string.
>
> test# bpftool feature
> Usage: bpftool bpftool probe [COMPONENT] [macros [prefix PREFIX]]
> bpftool bpftool help
>
> COMPONENT := { kernel | dev NAME }
>
> Instead of fixing the help text by tweaking argv[] indices, this
> patch changes the default action to 'probe'. It makes the behavior
> consistent with other subcommands, where first subcommand without
> extra parameter results in 'show' action.
>
> Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-24 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 2:51 [PATCH bpf-next] bpftool: feature probing, change default action Prashant Bhole
2019-01-24 9:05 ` Quentin Monnet
2019-01-24 11:29 ` Daniel Borkmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.