Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: <netdev@vger.kernel.org>, <dsahern@kernel.org>,
	<stephen@networkplumber.org>
Cc: Parav Pandit <parav@nvidia.com>, Jiri Pirko <jiri@nvidia.com>
Subject: [PATCH iproute2-next] devlink: Show port state values in man page and in the help command
Date: Fri, 23 Jul 2021 17:53:59 +0300	[thread overview]
Message-ID: <20210723145359.282030-1-parav@nvidia.com> (raw)

Port function state can have either of the two values - active or
inactive. Update the documentation and help command for these two
values to tell user about it.

With the introduction of state, hw_addr and state are optional.
Hence mark them as optional in man page that also aligns with the help
command output.

Fixes: bdfb9f1bd61a ("devlink: Support set of port function state")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
---
 devlink/devlink.c       |  2 +-
 man/man8/devlink-port.8 | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index b294fcd8..cf723e1b 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -3988,7 +3988,7 @@ static void cmd_port_help(void)
 	pr_err("       devlink port set DEV/PORT_INDEX [ type { eth | ib | auto} ]\n");
 	pr_err("       devlink port split DEV/PORT_INDEX count COUNT\n");
 	pr_err("       devlink port unsplit DEV/PORT_INDEX\n");
-	pr_err("       devlink port function set DEV/PORT_INDEX [ hw_addr ADDR ] [ state STATE ]\n");
+	pr_err("       devlink port function set DEV/PORT_INDEX [ hw_addr ADDR ] [ state { active | inactive } ]\n");
 	pr_err("       devlink port function rate { help | show | add | del | set }\n");
 	pr_err("       devlink port param set DEV/PORT_INDEX name PARAMETER value VALUE cmode { permanent | driverinit | runtime }\n");
 	pr_err("       devlink port param show [DEV/PORT_INDEX name PARAMETER]\n");
diff --git a/man/man8/devlink-port.8 b/man/man8/devlink-port.8
index 053db7a1..12ccc47e 100644
--- a/man/man8/devlink-port.8
+++ b/man/man8/devlink-port.8
@@ -67,12 +67,12 @@ devlink-port \- devlink port configuration
 .ti -8
 .BR "devlink port function set "
 .IR DEV/PORT_INDEX
-.RI "{ "
+.RI "[ "
 .BR "hw_addr "
-.RI "ADDR }"
-.RI "{ "
-.BR "state"
-.RI "STATE }"
+.RI "ADDR ]"
+.RI "[ "
+.BR state " { " active " | " inactive " }"
+.RI "]"
 
 .ti -8
 .BR "devlink port function rate "
-- 
2.26.2


             reply	other threads:[~2021-07-23 14:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 14:53 Parav Pandit [this message]
2021-08-10 11:49 ` Parav Pandit
2021-08-10 13:18   ` David Ahern
2021-08-10 13:19     ` Parav Pandit

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=20210723145359.282030-1-parav@nvidia.com \
    --to=parav@nvidia.com \
    --cc=dsahern@kernel.org \
    --cc=jiri@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --subject='Re: [PATCH iproute2-next] devlink: Show port state values in man page and in the help command' \
    /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

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).