netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@nvidia.com>
To: Vikas Gupta <vikas.gupta@broadcom.com>
Cc: dsahern@kernel.org, stephen@networkplumber.org, kuba@kernel.org,
	netdev@vger.kernel.org, edumazet@google.com,
	michael.chan@broadcom.com, andrew.gospodarek@broadcom.com
Subject: Re: [PATCH iproute2-next v4 3/3] devlink : update man page and bash-completion for new commands
Date: Sat, 30 Jul 2022 14:28:48 +0200	[thread overview]
Message-ID: <YuUkAEJrAZeE9PNJ@nanopsycho> (raw)
In-Reply-To: <20220729101821.48180-4-vikas.gupta@broadcom.com>

Fri, Jul 29, 2022 at 12:18:21PM CEST, vikas.gupta@broadcom.com wrote:
>Update the man page for newly added selftests commands.
>Examples:
> devlink dev selftests run pci/0000:03:00.0 id flash
> devlink dev selftests show pci/0000:03:00.0
>
>Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
>---
> bash-completion/devlink | 21 +++++++++++++++++-
> man/man8/devlink-dev.8  | 48 +++++++++++++++++++++++++++++++++++++++++

I don't think there is a separate patchset needed for this. Just squash
to the previous one.


> 2 files changed, 68 insertions(+), 1 deletion(-)
>
>diff --git a/bash-completion/devlink b/bash-completion/devlink
>index 361be9fe..608a60d0 100644
>--- a/bash-completion/devlink
>+++ b/bash-completion/devlink
>@@ -262,6 +262,25 @@ _devlink_dev_flash()
>      esac
> }
> 
>+# Completion for devlink dev selftests
>+_devlink_dev_selftests()
>+{
>+    case "$cword" in
>+        3)
>+            COMPREPLY=( $( compgen -W "show run" -- "$cur" ) )
>+            return
>+            ;;
>+        4)
>+            _devlink_direct_complete "dev"
>+            return
>+            ;;
>+        5)
>+            COMPREPLY=( $( compgen -W "id" -- "$cur" ) )
>+            return
>+            ;;

Another tab should list available selftests for device.



>+    esac
>+}
>+
> # Completion for devlink dev
> _devlink_dev()
> {
>@@ -274,7 +293,7 @@ _devlink_dev()
>             fi
>             return
>             ;;
>-        eswitch|param)
>+        eswitch|param|selftests)
>             _devlink_dev_$command
>             return
>             ;;
>diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8
>index 6906e509..5a06682a 100644
>--- a/man/man8/devlink-dev.8
>+++ b/man/man8/devlink-dev.8
>@@ -85,6 +85,20 @@ devlink-dev \- devlink device configuration
> .I ID
> ]
> 
>+.ti -8
>+.B devlink dev selftests show
>+[
>+.I DEV
>+]
>+
>+.ti -8
>+.B devlink dev selftests run
>+.I DEV
>+[
>+.B id
>+.RI "{ " TESTNAME " }"
>+]
>+
> .SH "DESCRIPTION"
> .SS devlink dev show - display devlink device attributes
> 
>@@ -249,6 +263,30 @@ should match the component names from
> .B "devlink dev info"
> and may be driver-dependent.
> 
>+.SS devlink dev selftests show - shows supported selftests on devlink device.
>+
>+.PP
>+.I "DEV"
>+- specifies the devlink device.
>+If this argument is omitted all selftests for devlink devices are listed.
>+
>+.SS devlink dev selftests run - runs selftests on devlink device.
>+
>+.PP
>+.I "DEV"
>+- specifies the devlink device to execute selftests.
>+
>+.B id
>+{
>+.RI { " ID " }
>+}
>+- The value of
>+.I ID
>+should match the selftests shown in

You can specify multiple ids, can't you? If not, you should and you
should describe it here.


>+.B "devlink dev selftests show".
>+to execute a selftest on the devlink device.
>+If this argument is omitted all selftets supported by devlink devices are executed.

s/selftets/selftests/


>+
> .SH "EXAMPLES"
> .PP
> devlink dev show
>@@ -296,6 +334,16 @@ Flashing 100%
> .br
> Flashing done
> .RE
>+.PP
>+devlink dev selftests show pci/0000:01:00.0
>+.RS 4
>+Shows the supported selftests by the devlink device.
>+.RE
>+.PP
>+devlink dev selftests run pci/0000:01:00.0 id flash
>+.RS 4
>+Perform a flash test on the devlink device.
>+.RE
> 
> .SH SEE ALSO
> .BR devlink (8),
>-- 
>2.31.1
>




      reply	other threads:[~2022-07-30 12:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 10:18 [PATCH iproute2-next v4 0/3] devlink: add support to run selftest Vikas Gupta
2022-07-29 10:18 ` [PATCH iproute2-next v4 1/3] devlink: update the devlink.h Vikas Gupta
2022-07-29 10:18 ` [PATCH iproute2-next v4 2/3] devlink: add support for running selftestst Vikas Gupta
2022-07-30  9:35   ` Jiri Pirko
2022-07-29 10:18 ` [PATCH iproute2-next v4 3/3] devlink : update man page and bash-completion for new commands Vikas Gupta
2022-07-30 12:28   ` Jiri Pirko [this message]

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=YuUkAEJrAZeE9PNJ@nanopsycho \
    --to=jiri@nvidia.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vikas.gupta@broadcom.com \
    /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).