From: Roi Dayan <roid@mellanox.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
Roi Dayan <roid@mellanox.com>
Subject: [PATCH iproute2 1/2] devlink: Add usage help for eswitch subcommand
Date: Sun, 27 Nov 2016 13:21:02 +0200 [thread overview]
Message-ID: <1480245663-814-2-git-send-email-roid@mellanox.com> (raw)
In-Reply-To: <1480245663-814-1-git-send-email-roid@mellanox.com>
Add missing usage help for devlink dev eswitch subcommand.
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
---
devlink/devlink.c | 7 ++++++-
man/man8/devlink-dev.8 | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index ccca0fb..673234f 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -963,6 +963,8 @@ static bool dl_dump_filter(struct dl *dl, struct nlattr **tb)
static void cmd_dev_help(void)
{
pr_err("Usage: devlink dev show [ DEV ]\n");
+ pr_err(" devlink dev eswitch set DEV [ mode { legacy | switchdev } ]\n");
+ pr_err(" devlink dev eswitch show DEV\n");
}
static bool cmp_arr_last_handle(struct dl *dl, const char *bus_name,
@@ -1259,7 +1261,10 @@ static int cmd_dev_eswitch_set(struct dl *dl)
static int cmd_dev_eswitch(struct dl *dl)
{
- if (dl_argv_match(dl, "set")) {
+ if (dl_argv_match(dl, "help") || dl_no_arg(dl)) {
+ cmd_dev_help();
+ return 0;
+ } else if (dl_argv_match(dl, "set")) {
dl_arg_inc(dl);
return cmd_dev_eswitch_set(dl);
} else if (dl_argv_match(dl, "show")) {
diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8
index 9ce3193..931e334 100644
--- a/man/man8/devlink-dev.8
+++ b/man/man8/devlink-dev.8
@@ -54,7 +54,7 @@ BUS_NAME/BUS_ADDRESS
.TP
.BR mode " { " legacy " | " switchdev " } "
-set eswitch mode
+Set eswitch mode
.I legacy
- Legacy SRIOV
--
1.7.1
next prev parent reply other threads:[~2016-11-27 11:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-27 11:21 [PATCH iproute2 0/2] Adding help and inline mode control to eswitch Roi Dayan
2016-11-27 11:21 ` Roi Dayan [this message]
2016-11-30 3:19 ` [PATCH iproute2 1/2] devlink: Add usage help for eswitch subcommand Stephen Hemminger
2016-11-27 11:21 ` [PATCH iproute2 2/2] devlink: Add option to set and show eswitch inline mode Roi Dayan
2016-11-27 11:30 ` [PATCH iproute2 0/2] Adding help and inline mode control to eswitch Roi Dayan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480245663-814-2-git-send-email-roid@mellanox.com \
--to=roid@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).