From patchwork Sat Apr 4 16:16:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 221436 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14AD7C2BA15 for ; Sat, 4 Apr 2020 16:16:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0D8D2051A for ; Sat, 4 Apr 2020 16:16:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="y0sOPaN2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbgDDQQ2 (ORCPT ); Sat, 4 Apr 2020 12:16:28 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:52708 "EHLO mail-wm1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbgDDQQ2 (ORCPT ); Sat, 4 Apr 2020 12:16:28 -0400 Received: by mail-wm1-f47.google.com with SMTP id t203so1822708wmt.2 for ; Sat, 04 Apr 2020 09:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YjiBNyKgfLHiKSO6d+c0hBMZBKWqIYLBDHPl0PufnuQ=; b=y0sOPaN2aaHoKiP1SqrADEJwmEudrjYF1P3fLrk1kToi81sHTgSEQdjm5aUm0TlqWA A6QKL/d0cBPXvvj40IifKIA7BqwWEnDsJVxNdJ124qSIhyDKC9JGcIPTl24iPoVc/jor selN/WkXt2zD+Hbd9xZIAMI/kAyJ+haShXVGN2Rfkzq39BoPWCYAvUwgNTUQkzYd9Ywn Bd8rHXNL9rSHN3B5GGDXuHqU7Y8+cOCTa0uq5uoOCuu0uLzxQ7rnh8QdQI0yVZb7RUhK I06GbA0JZbB0wNe3Psyjy8loIj5wEB21KB5txRg/UDe5j6YWs6e/6jwi/CJ/NtYIb9n3 wpEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YjiBNyKgfLHiKSO6d+c0hBMZBKWqIYLBDHPl0PufnuQ=; b=fkIfXOr61vClihftBeFNsCBYcs8Vti8ZWY3cu0Mo5SmYhO6MlM83EAli9+6kW6zTy/ J3ObKpnEh8oPPDGBduV9DIcNfraN39JhfjLGF6pHBu/NBr0qMoMBA7pZB70YC8ujJTxy 1JO4tTEnhXP/6EcfrobQxiO4qMa1bFjxi+GWzQYRgsitJQiDtf4Nbacx88XwR7NCAmt3 fJuaaf6KRJaLivCoYJbAvqfnAlh33icdfCbdg0PKjzhpZU9a+oYB1LVXg/e/8bHBGg+3 ZT/jcBGQm8NyofrC9EAgtAK9bn6mHDzbqBqseCBMQ+E9qAM4GpqsNKH/RILUQBrKw9Hw Etog== X-Gm-Message-State: AGi0PuZdMf9Ohv/q5Klng/8z2p8JeXH+8t0qu7uBTJe0MA+jaA/IlqUR 6EROPr+7voiv2ROGPr3Q+i6LhH/AjAE= X-Google-Smtp-Source: APiQypK/JO0Hzdzt9lPXKK3jTY2+/+ym4kwXIypX/lbvMGVsjXm2qMZTqyA7XoNPMKpJLwWe+VDK8A== X-Received: by 2002:a7b:cb59:: with SMTP id v25mr14836628wmj.13.1586016985489; Sat, 04 Apr 2020 09:16:25 -0700 (PDT) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id b12sm3384118wmi.43.2020.04.04.09.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 09:16:25 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: dsahern@gmail.com, stephen@networkplumber.org, mlxsw@mellanox.com Subject: [patch iproute2/net-next 2/8] devlink: Fix help and man of "devlink health set" command Date: Sat, 4 Apr 2020 18:16:15 +0200 Message-Id: <20200404161621.3452-3-jiri@resnulli.us> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200404161621.3452-1-jiri@resnulli.us> References: <20200404161621.3452-1-jiri@resnulli.us> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jiri Pirko Fix the help and man page of "devlink health set" command to be aligned with the rest of helps and man pages. Signed-off-by: Jiri Pirko --- devlink/devlink.c | 4 +++- man/man8/devlink-health.8 | 30 ++++++++++++++++-------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index 0109d30cba41..559b6cec2fae 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -6901,7 +6901,9 @@ static void cmd_health_help(void) pr_err(" devlink health diagnose DEV reporter REPORTER_NAME\n"); pr_err(" devlink health dump show DEV reporter REPORTER_NAME\n"); pr_err(" devlink health dump clear DEV reporter REPORTER_NAME\n"); - pr_err(" devlink health set DEV reporter REPORTER_NAME { grace_period | auto_recover } { msec | boolean }\n"); + pr_err(" devlink health set DEV reporter REPORTER_NAME\n"); + pr_err(" [ grace_period MSEC ]\n"); + pr_err(" [ auto_recover { true | false } ]\n"); } static int cmd_health(struct dl *dl) diff --git a/man/man8/devlink-health.8 b/man/man8/devlink-health.8 index 7ed0ae4534dc..70a86cf0acdc 100644 --- a/man/man8/devlink-health.8 +++ b/man/man8/devlink-health.8 @@ -52,13 +52,13 @@ devlink-health \- devlink health reporting and recovery .RI "" DEV "" .B reporter .RI "" REPORTER "" -.RI " { " -.B grace_period | auto_recover -.RI " } { " -.RI "" msec "" -.RI "|" -.RI "" boolean "" -.RI " } " +.RI "[ " +.BI "grace_period " MSEC " +.RI "]" +.RI "[ " +.BR auto_recover " { " true " | " false " } " +.RI "]" + .ti -8 .B devlink health help @@ -130,15 +130,9 @@ the next "devlink health dump show" command. .I "REPORTER" - specifies the reporter's name registered on the devlink device. -.SS devlink health set - Enable the user to configure: -.PD 0 -1) grace_period [msec] - Time interval between consecutive auto recoveries. -.P -2) auto_recover [true/false] - Indicates whether the devlink should execute automatic recover on error. -.P +.SS devlink health set - Configure health reporter. Please note that this command is not supported on a reporter which doesn't support a recovery method. -.PD .PP .I "DEV" @@ -148,6 +142,14 @@ doesn't support a recovery method. .I "REPORTER" - specifies the reporter's name registered on the devlink device. +.TP +.BI grace_period " MSEC " +Time interval between consecutive auto recoveries. + +.TP +.BR auto_recover " { " true " | " false " } " +Indicates whether the devlink should execute automatic recover on error. + .SH "EXAMPLES" .PP devlink health show From patchwork Sat Apr 4 16:16:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 221435 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84863C4332B for ; Sat, 4 Apr 2020 16:16:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C5522051A for ; Sat, 4 Apr 2020 16:16:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="omXe+Dri" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726466AbgDDQQc (ORCPT ); Sat, 4 Apr 2020 12:16:32 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46879 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbgDDQQ3 (ORCPT ); Sat, 4 Apr 2020 12:16:29 -0400 Received: by mail-wr1-f68.google.com with SMTP id j17so12186712wru.13 for ; Sat, 04 Apr 2020 09:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NoqR3QYg1lQmdCWyL9woGNuc0FCwR2wbM0Q85ifDMFw=; b=omXe+Dri45PlbiptErmbLzs5neiexhDM7FstvqCoTvA2AcHdDDYcCE7pzgxiqqI5L0 vBA6N7uo+9S3zqJXuGW0FB3N+CVH6d+sLP9lHFCvXvRxkrEGFmBqrA6/SatLJlGmdDBK WJoHTaD0+qc4uCn1Mc2gj3uZKyc7YVgxqA24QqAhPVM5cZMV6JhQIl7RWHitHSt49WbM V0GJDebdbmF5O534n+Tzn5fO9ayDOB9mAr7/tui6397Wmg0LoKR3pstyaTiNSzsw49Br ASWzkfZPJVmIApyRX6A2u9prAl5vYp+32lc39kpYvcHGUzwXDOQN43Fl/M3E0Y72l8aQ tL3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NoqR3QYg1lQmdCWyL9woGNuc0FCwR2wbM0Q85ifDMFw=; b=PPn/4R6LsAaGMnvs6nTWpszFdbB479/f+Vg6BsPSUe/cvx00cCuFdLxIsawcPKYnnE UkEppdPvMGN0CY+N36BB1RrZ1ZY0Nlk9BSNnRRUKtlO0wbGbayhWuWRSPy4LrJvAfaXw EqYQ72wV8N7PHJIB8u3P/PMuLHTml7CJ5WU9DXghZpNKDddOBe3Quho7SeDSPzabCwtp ksWY67JIJVtYbuUMEywb7PDVyQk05M/NpotvX8tOQB5bcWrQgBtg5Tjiz8G+KfncB9JY M9NaowK+1Cfz7TBIxHIqJgCaSMDfMG6aqBNrnqavmb2dAT8hGXhwvfcF44c7n+RfIalm 2X8A== X-Gm-Message-State: AGi0Pua6k/sggjK8k4pr0YwjsiZuWIGEiDkMzv51DSPGbibyYK+MzypZ h4uTxry4XPJVKpGN9+q3ApRVZ6lQ3iw= X-Google-Smtp-Source: APiQypKO6LG/LhUq6fz3NwYgkl4ybOI3quvd11TX+7vvaabjj6DPRtlA0tA7fDg0s2Nhkvr9Ajg00w== X-Received: by 2002:adf:ed4a:: with SMTP id u10mr14613672wro.399.1586016987890; Sat, 04 Apr 2020 09:16:27 -0700 (PDT) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id h2sm727966wrp.50.2020.04.04.09.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 09:16:27 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: dsahern@gmail.com, stephen@networkplumber.org, mlxsw@mellanox.com Subject: [patch iproute2/net-next 4/8] devlink: Add alias "counters_enabled" for "counters" option Date: Sat, 4 Apr 2020 18:16:17 +0200 Message-Id: <20200404161621.3452-5-jiri@resnulli.us> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200404161621.3452-1-jiri@resnulli.us> References: <20200404161621.3452-1-jiri@resnulli.us> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jiri Pirko To be consistent with netlink attribute name and also with the "dpipe table show" output, add "counters_enabled" for "counters" in "dpipe table set" command. Signed-off-by: Jiri Pirko --- devlink/devlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index 79a1c3829c31..d40991d52cf6 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -1345,7 +1345,8 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required, if (err) return err; o_found |= DL_OPT_DPIPE_TABLE_NAME; - } else if (dl_argv_match(dl, "counters") && + } else if ((dl_argv_match(dl, "counters") || + dl_argv_match(dl, "counters_enabled")) && (o_all & DL_OPT_DPIPE_TABLE_COUNTERS)) { dl_arg_inc(dl); err = dl_argv_bool(dl, &opts->dpipe_counters_enable); From patchwork Sat Apr 4 16:16:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 221433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D0E4C4332B for ; Sat, 4 Apr 2020 16:16:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 315B62051A for ; Sat, 4 Apr 2020 16:16:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="e1miN34x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726498AbgDDQQj (ORCPT ); Sat, 4 Apr 2020 12:16:39 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39846 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726410AbgDDQQc (ORCPT ); Sat, 4 Apr 2020 12:16:32 -0400 Received: by mail-wr1-f66.google.com with SMTP id p10so12263814wrt.6 for ; Sat, 04 Apr 2020 09:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r6RcQ0D3q+mp04TlRs1vLXwtVfdubi4L7nlj47ubmjk=; b=e1miN34xxQwyyXHV2R7lbzNW9uIr8R3oOkfoTWFDrtZK78gh991Xfok1Cm03Rlzm3J W+8c+vC/15Mj0yE58+TeyZtAdlNBSgOswBrVLUIvosxb6mHL5vp2MW6FNoOIQ95LSila gDecRfIY/lSsMLzhgbPjIgqBy9rCTi/HWVQhFHtY5S0CWB2NkROvc+l59EYaEGz0RCLy 1x1bkUb4ZeqnBgGMdbM3Msl8P6JFg6/yEFh1CQuEa8tV09vj1ek1/lf4BagvYsOts/mS 0OpYQwXa9tmynbNNaoMU1TM4FU8pNna84UBA8mtIKJNtu13ucJnTq3Ag/fmMzCLl01T2 WYTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r6RcQ0D3q+mp04TlRs1vLXwtVfdubi4L7nlj47ubmjk=; b=lkkdviu4GvVqamWop8DtfNlIch4phQjjrukUZZIfEyLdaSj1kJh7xllfvTMNu/FzWt nnE64GFBjwrvKcE142rAa3e/DWV5QFoEXqlMlSi72fC1llkV6C5pPe4HWbYwdsL9uSWy XkeeGMs80fV/J4BgcMwTHz93bwbnue+niRzeUnZoY20ue1YZuiD9/ZR3hDAGyo6cfbkV Jgk9xbTvI+YQ/H/vQ+KgKggpbQ4mwcReK0HMehIqf15LwZHRizpRW02oIcF3YKQqOel8 JbxkmcBprhStv1lv2d0jezieRBQb3vJNXqAF/lahefrglcE6sCGkV+QRM6IUWRsBO5JV FZ7A== X-Gm-Message-State: AGi0PuYVtjW8f8lfCyZjUtF/MuGY+wtKUUqYB+bCFBnyiBnHNg27hM4S qyfdSf1wMoRJzr3vAu9MZ6p4mCtaL1g= X-Google-Smtp-Source: APiQypIEjzOQQusLIQiMFiG8OB6gfGcpiQliBWcuT7fApVNUHQJN1qSzq1VRJDTWlM8rzOCAl2gi+Q== X-Received: by 2002:a5d:4305:: with SMTP id h5mr14305939wrq.69.1586016990016; Sat, 04 Apr 2020 09:16:30 -0700 (PDT) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id w67sm16631957wmb.41.2020.04.04.09.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 09:16:29 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: dsahern@gmail.com, stephen@networkplumber.org, mlxsw@mellanox.com Subject: [patch iproute2/net-next 6/8] devlink: Fix help message for dpipe Date: Sat, 4 Apr 2020 18:16:19 +0200 Message-Id: <20200404161621.3452-7-jiri@resnulli.us> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200404161621.3452-1-jiri@resnulli.us> References: <20200404161621.3452-1-jiri@resnulli.us> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jiri Pirko 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 --- devlink/devlink.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index 575737fff985..14ea91726892 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -4953,15 +4953,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); @@ -5777,16 +5781,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); @@ -5802,12 +5800,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)) { From patchwork Sat Apr 4 16:16:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 221434 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14556C4332B for ; Sat, 4 Apr 2020 16:16:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF2542051A for ; Sat, 4 Apr 2020 16:16:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="IaCFVISa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726481AbgDDQQf (ORCPT ); Sat, 4 Apr 2020 12:16:35 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45460 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726474AbgDDQQe (ORCPT ); Sat, 4 Apr 2020 12:16:34 -0400 Received: by mail-wr1-f65.google.com with SMTP id v5so1308503wrp.12 for ; Sat, 04 Apr 2020 09:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eLvmp6A3nGOQm6VmOzL+HZWrPUPixMgr6EG8rA6Q21c=; b=IaCFVISaNF7r8Ev2Oy+JsBBfmUcPfi0qdEXPe+m64hRvF0rsNyWq2jqyOeHBCQ8rHu erImGtCXUME/AFuB8vo1PhrZKvR0D2v3DJSa9LVakin0jeeDT3fcpqzid6tmdkFC334w 8eyXs9iKf6dllq/1Rh2hQSNps2GqZ2zqK4kfb5lS9dzhb7KWI3En7/dXZFV77QeJkVJq Ndit3zz33G8Qb2Ed86a8uoyFQDsmQonLPDOvZeyorrSC1bm2NqXLEQyPA/fGQe36ezMD /P29bC3Pbq46mikoPp0gkG65jOo5V+KtSPX1ifofjpqmJWl4dpY/rv1m1h2KXWkJxk/F /8TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eLvmp6A3nGOQm6VmOzL+HZWrPUPixMgr6EG8rA6Q21c=; b=CoLxtP1kZa65z4WPDOLxBfRlEM+ZhfI0sm5rAMJaqO5sdqP1iKqDw+RxiSfO+r+a5U qG0zU6WYsHAAjic7q9LepCzTsL8x26kPdW2XvZ963fN5pbx9Q6YQoT8St/Eq7yOEAd7l HUSCZlZD43FCPeDICygLH7CHhCHB0lQn2dZPFGghK0BpWXbxY9nxV0Kzyjyh26kd9vL5 B5x/TstHkVCuB53AWbRY5KcsnjIH0bqfhoMvxaDq1JWdeP9v6tEFbIVm7cOZt3evO1Fh 9fFWOPULRwV+X9zoLQdnC1TiIO8NBvZLxBY5OGxE1Tm3GdLCxIRvScgWh7GRu8tA0LuE acAw== X-Gm-Message-State: AGi0PuYKcSZf7m6eexEf1pXVtCX0tnZcRlWWm6YNGEpQL24T9Q+c3175 EEqI7yMQZlWRAuRgfYaGzd66Kddb1VM= X-Google-Smtp-Source: APiQypJbRoSIV5ii2944rn1K3Opf3M8QEa3feNv7UQMp09j7B9G2k4mxDTwMG74IppXid3pa37qT5g== X-Received: by 2002:a5d:6588:: with SMTP id q8mr12298630wru.189.1586016991111; Sat, 04 Apr 2020 09:16:31 -0700 (PDT) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id r5sm16240323wmr.15.2020.04.04.09.16.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 09:16:30 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: dsahern@gmail.com, stephen@networkplumber.org, mlxsw@mellanox.com Subject: [patch iproute2/net-next 7/8] devlink: remove "dev" object sub help messages Date: Sat, 4 Apr 2020 18:16:20 +0200 Message-Id: <20200404161621.3452-8-jiri@resnulli.us> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200404161621.3452-1-jiri@resnulli.us> References: <20200404161621.3452-1-jiri@resnulli.us> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jiri Pirko Remove duplicate sub help messages for "dev" object and have them all show help message for "dev". Signed-off-by: Jiri Pirko --- devlink/devlink.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index 14ea91726892..efc5591d5ebf 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -2740,18 +2740,13 @@ static int cmd_dev_show(struct dl *dl) return err; } -static void cmd_dev_reload_help(void) -{ - pr_err("Usage: devlink dev reload DEV [ netns { PID | NAME | ID } ]\n"); -} - static int cmd_dev_reload(struct dl *dl) { struct nlmsghdr *nlh; int err; if (dl_argv_match(dl, "help") || dl_no_arg(dl)) { - cmd_dev_reload_help(); + cmd_dev_help(); return 0; } @@ -2873,11 +2868,6 @@ static int cmd_versions_show_cb(const struct nlmsghdr *nlh, void *data) return MNL_CB_OK; } -static void cmd_dev_info_help(void) -{ - pr_err("Usage: devlink dev info [ DEV ]\n"); -} - static int cmd_dev_info(struct dl *dl) { struct nlmsghdr *nlh; @@ -2885,7 +2875,7 @@ static int cmd_dev_info(struct dl *dl) int err; if (dl_argv_match(dl, "help")) { - cmd_dev_info_help(); + cmd_dev_help(); return 0; } @@ -2906,12 +2896,6 @@ static int cmd_dev_info(struct dl *dl) return err; } -static void cmd_dev_flash_help(void) -{ - pr_err("Usage: devlink dev flash DEV file PATH [ component NAME ]\n"); -} - - struct cmd_dev_flash_status_ctx { struct dl *dl; char *last_msg; @@ -3059,7 +3043,7 @@ static int cmd_dev_flash(struct dl *dl) int err; if (dl_argv_match(dl, "help") || dl_no_arg(dl)) { - cmd_dev_flash_help(); + cmd_dev_help(); return 0; }