aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2020-04-04 18:16:19 +0200
committerStephen Hemminger <stephen@networkplumber.org>2020-04-06 10:00:32 -0700
commitb2522187d85fcf75533bb123c9574df282286db6 (patch)
treeb8578a2a99f1a9f911d761f4add31f32333db711
parent342f462efa9f51966c4e92ad5d3e487680ba16d4 (diff)
downloadiproute2-b2522187d85fcf75533bb123c9574df282286db6.tar.gz
devlink: Fix help message for dpipe
Have one help message for all dpipe commands, as it is done for the rest of the devlink object. Possible and required options to the help. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-rw-r--r--devlink/devlink.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/devlink/devlink.c b/devlink/devlink.c
index 02339ec0b..2df7ad472 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -4976,15 +4976,19 @@ static int cmd_dpipe_headers_show(struct dl *dl)
return err;
}
-static void cmd_dpipe_header_help(void)
+static void cmd_dpipe_help(void)
{
- pr_err("Usage: devlink dpipe headers show DEV\n");
+ pr_err("Usage: devlink dpipe table show DEV [ name TABLE_NAME ]\n");
+ pr_err(" devlink dpipe table set DEV name TABLE_NAME\n");
+ pr_err(" [ counters_enabled { true | false } ]\n");
+ pr_err(" devlink dpipe table dump DEV name TABLE_NAME\n");
+ pr_err(" devlink dpipe header show DEV\n");
}
static int cmd_dpipe_header(struct dl *dl)
{
if (dl_argv_match(dl, "help") || dl_no_arg(dl)) {
- cmd_dpipe_header_help();
+ cmd_dpipe_help();
return 0;
} else if (dl_argv_match(dl, "show")) {
dl_arg_inc(dl);
@@ -5800,16 +5804,10 @@ out:
return err;
}
-static void cmd_dpipe_table_help(void)
-{
- pr_err("Usage: devlink dpipe table [ OBJECT-LIST ]\n"
- "where OBJECT-LIST := { show | set | dump }\n");
-}
-
static int cmd_dpipe_table(struct dl *dl)
{
if (dl_argv_match(dl, "help") || dl_no_arg(dl)) {
- cmd_dpipe_table_help();
+ cmd_dpipe_help();
return 0;
} else if (dl_argv_match(dl, "show")) {
dl_arg_inc(dl);
@@ -5825,12 +5823,6 @@ static int cmd_dpipe_table(struct dl *dl)
return -ENOENT;
}
-static void cmd_dpipe_help(void)
-{
- pr_err("Usage: devlink dpipe [ OBJECT-LIST ]\n"
- "where OBJECT-LIST := { header | table }\n");
-}
-
static int cmd_dpipe(struct dl *dl)
{
if (dl_argv_match(dl, "help") || dl_no_arg(dl)) {