From patchwork Fri Jul 29 10:18:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vikas Gupta X-Patchwork-Id: 12932295 X-Patchwork-Delegate: dsahern@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33054C19F29 for ; Fri, 29 Jul 2022 10:18:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235867AbiG2KSw (ORCPT ); Fri, 29 Jul 2022 06:18:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235854AbiG2KSr (ORCPT ); Fri, 29 Jul 2022 06:18:47 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 224A88245F for ; Fri, 29 Jul 2022 03:18:46 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id ha11so4448612pjb.2 for ; Fri, 29 Jul 2022 03:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SL2jinXZKbV1heGV3LoHvbJ/s1ECD4f257qw4IZhXSQ=; b=DWZApZwku1Vul+IukJXtSW/X2WeWqhE7U/jSAqyVYYtucxf/KAlHuDWYVGxQEVctVP 8XQnUmCeAm90fwClAHhUymF6c3MQ/6FoyS3LTEriHF9OwVNvqfGQaMYvQ2OppKSAX8pe Y0nEw4S+t3aOVTJ48cp87W/1TiB6t/fQh6ljA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SL2jinXZKbV1heGV3LoHvbJ/s1ECD4f257qw4IZhXSQ=; b=6Vd0ATuOOwhTfbtwxncE/apCn0o3L46vyrT/N/XoKzn+iMcXXG/r3FO/SIRXVwuGKr jSsRdVWUP5v3Hq345JhFlx+ZyCkfdn7EefkLKoe4gluCWWT9VmacMOI0kkKN6zK5vFED TN0CcNHUmQw4k5OTu+htw48L3E9umAC4ALfEAM8EpTNw74u2pAVzDr+QMWfsELRS6RtN vBZwOkcBwDrHKYQ0sezylaTe37baW24KRibMmcb9UHlF8E1xsHqHetoT564ZxMCFe69O 4Ajkp0iiiGyV033d8Q0mmH5WxIQdpMh6u+ygj6BDXgMABTFjTmOnR6PO2WwSu2LMIopE ZCGg== X-Gm-Message-State: ACgBeo3UDHHjTr72iAj/sSV6Ou+kntUl/KO97dgoabQyp06Tvh1my/SD saqRmRXmj6tcTcbb/Grunf8+mw== X-Google-Smtp-Source: AA6agR4syoJ7QdmOAXiNTotd63h7Z0qtEx3XQzvUS42Xu0+vptP3z5Ds+qegv0vpuzAMyz1/3Ii4Lw== X-Received: by 2002:a17:902:7c88:b0:16c:5301:8a52 with SMTP id y8-20020a1709027c8800b0016c53018a52mr3250756pll.95.1659089925260; Fri, 29 Jul 2022 03:18:45 -0700 (PDT) Received: from rahul_yocto_ubuntu18.ibn.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id ik24-20020a170902ab1800b0016dc6243bb2sm3141727plb.143.2022.07.29.03.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 03:18:44 -0700 (PDT) From: Vikas Gupta To: jiri@nvidia.com, dsahern@kernel.org, stephen@networkplumber.org Cc: kuba@kernel.org, netdev@vger.kernel.org, edumazet@google.com, michael.chan@broadcom.com, andrew.gospodarek@broadcom.com, Vikas Gupta Subject: [PATCH iproute2-next v4 3/3] devlink : update man page and bash-completion for new commands Date: Fri, 29 Jul 2022 15:48:21 +0530 Message-Id: <20220729101821.48180-4-vikas.gupta@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220729101821.48180-1-vikas.gupta@broadcom.com> References: <20220729101821.48180-1-vikas.gupta@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com 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 --- bash-completion/devlink | 21 +++++++++++++++++- man/man8/devlink-dev.8 | 48 +++++++++++++++++++++++++++++++++++++++++ 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 + ;; + 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 +.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. + .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),