From patchwork Wed Jan 6 13:10:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danielle Ratson X-Patchwork-Id: 358021 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=-15.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY, 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 7FD57C433E0 for ; Wed, 6 Jan 2021 13:12:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4998A23100 for ; Wed, 6 Jan 2021 13:12:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726919AbhAFNLp (ORCPT ); Wed, 6 Jan 2021 08:11:45 -0500 Received: from mail-am6eur05on2048.outbound.protection.outlook.com ([40.107.22.48]:48736 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726884AbhAFNLm (ORCPT ); Wed, 6 Jan 2021 08:11:42 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vt3ZmF59XlkNsYZ9taYc75vLt0LuEBYRHPHtdKb3Fyk19ujFy42ZqRmkPYlef4lcP4aby2M5dOorGafnovDqNXWCCj/gO4mi/zF59nqhzDvSEpN4LbBTrnX7v2LaDdacXjBoGzziPgYjyr9+YjKjtddVb6EnjK3/fbUtdx1kHMXwTo4ImIDVeelADfk7iZYn7W5GQCSL1+04edo9M/rpwJYULrIpA63jvAVXpnEC2nB1vuq87p+wHUF+thP6vGaYptK8ZRWDk/bWy10V74k43n9CUv+hVxLHzQldCbwnBJ4KOMjthGrx+9wXunsqOjmB1x3V+a8vLnTF7fflYNFgYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R8mp9zlcJSBBOZIgKzvbZxmMVKS1zaSvOR1lh/ptF+A=; b=HCVpD6WZXg0ZNBeAd5X5QgDtULZdexLixzVfI3cdHZDlwpIgejm009VXMV2swtUU7Tp651ySPErC0VR3OITnMB7rMpu0OLskirZzVwiINteAFY5SQRrvvkuXoG5Qo1UROPR4gCLqaTbS7rqtKThUvMX0XvPSH158G0jcfrPiTbYvvJgQGVuBXu5cuJ0J9NIeP15vwJHCoLdtYaCEt1vUEgvjjBUecBW3hgzspCZIPd3B3oUnD/1XTqasBWYqCfNx1/ZdsZR2fjvwRrZylsgGIRW0qmcXhikesBGvDE/kakRTnA5GnrgYexXOZrqjYnbTDzBs33sB0CGhPB7U0Is7fg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R8mp9zlcJSBBOZIgKzvbZxmMVKS1zaSvOR1lh/ptF+A=; b=KvVQRKXl/CZUPJrEkM2xcgjeG/br0+8LaQRb87mkjVKJo8UuO50gheGgcsz9yTAVW0OasMM5MiuCwKqMYtjKvzqhKdve87XNcttPU9/cgzu+9eO/dheZBJ7ctrAPVMO9S6obQg818iEZnaIyeUTPyDN0/jJTW+0+bczV6kHpZOc= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB5010.eurprd05.prod.outlook.com (2603:10a6:208:cd::23) by AM0PR05MB6418.eurprd05.prod.outlook.com (2603:10a6:208:13e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Wed, 6 Jan 2021 13:10:23 +0000 Received: from AM0PR05MB5010.eurprd05.prod.outlook.com ([fe80::f463:9a6:abe8:afec]) by AM0PR05MB5010.eurprd05.prod.outlook.com ([fe80::f463:9a6:abe8:afec%5]) with mapi id 15.20.3742.006; Wed, 6 Jan 2021 13:10:23 +0000 From: Danielle Ratson To: netdev@vger.kernel.org Cc: mkubecek@suse.cz, f.fainelli@gmail.com, kuba@kernel.org, andrew@lunn.ch, mlxsw@nvidia.com, Danielle Ratson Subject: [PATCH ethtool 1/5] ethtool: Extend ethtool link modes settings uAPI with lanes Date: Wed, 6 Jan 2021 15:10:02 +0200 Message-Id: <20210106131006.2110613-2-danieller@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210106131006.2110613-1-danieller@mellanox.com> References: <20210106131006.2110613-1-danieller@mellanox.com> X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR06CA0138.eurprd06.prod.outlook.com (2603:10a6:803:a0::31) To AM0PR05MB5010.eurprd05.prod.outlook.com (2603:10a6:208:cd::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dev-r-vrt-156.mtr.labs.mlnx (37.142.13.130) by VI1PR06CA0138.eurprd06.prod.outlook.com (2603:10a6:803:a0::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Wed, 6 Jan 2021 13:10:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8b05839c-517a-4160-c854-08d8b2446d34 X-MS-TrafficTypeDiagnostic: AM0PR05MB6418: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:549; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mgBd1KrjPpMYsbfbJa363vT7jutDxKPOkpbEHY3+25LhfSDZ/p/WkqFnVUoXq+iQB0FQfmnZJZdKwCdDfoZfRMTY0jbOJsCICmchg+uAqpELfURTJY1JDSPtj6iIpzSraZrRn0Oez0Zq6jWSU0YsVVjPR3MA5Ck76w6gKRhRXAnxeLocTYWSZgpX7JM2swErJPVn0ggIUYmd8hSU2Hpl29Rjn4SXh/6HGLwdSbHKIIB4Z2d+ls/Cf5525Q48LxNXeq2FwrgvKCUE4IQINVqmNsfJLfarRPwdt8iY1t2iRHCAXYRXbjo6XZhNh5Az+6+Pu2zkbH37h6y1ybX5lfi5GFabCi9ZgZ0M1uY51cA2VLSCUVOOMhYVY2TZd05SHOHxSuYsi1QQ6V8lgv1B30W2ug== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB5010.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(396003)(39860400002)(136003)(366004)(26005)(8936002)(16526019)(186003)(107886003)(6486002)(6512007)(316002)(6916009)(5660300002)(6666004)(4326008)(2906002)(6506007)(956004)(2616005)(86362001)(1076003)(8676002)(66946007)(478600001)(66556008)(66476007)(36756003)(52116002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: kAQgVe0aMkyhh7DX+fdtSH6cPrFJN6OHyDIzFHSfQBYp4ga+04LJ5CMmAu6kZLD+H7aJYlkflKjtp6wrBAIBMqsmjeb+0FfVrf1LrU1LVnSjpSXbYdfRc0ed/m6ksN3o2ntbxZ2mpgfesmZPvIRtrttyUo8hbto5nO3vBHoyxJmo+tHxPjY4NVSSsnAe5KgXZE6yLERBp0o/TC+0rjQHnN/1TVKl/89xl1YEfbDe/fCSEJ62KJJ74Il+/7pW9qpWaCy+Da6mawOJldwtJ4eCn3z/g7dDdNvUPaIdUPw9UrUst/nkJaexJSEPDjOo82HykccR+xV2nsNm2HwGFQ9f0SKSyX1cmC9QJUwSeJ+DduKPNUWoVVB+DB2Wn0vaBR4atmfHR/J6GcgOeqKML7Y7xqP0wnY1iIhRhpgBTy27/+mkB9l4hgbpR58r9O9M0RHP5wJYzmu4oGMro+MLK+bpR0WfGu9vl7Sah/NKbk1fotsONjrxJ9HQRzNeyNd0V12oI3k65dq4dff61D4Zzo/HmjEIVFy2HjF4YPeqM5PZBKlAkA3PA3JnRIf/Bemm4wkYOpauG19RIxtOePv0LhKGrMe2JjAm+kqnFrP2oZ0Tk4oRp4EMXptQD91HRgHpcosLMMq8WOnv4Z5HtPCsPa/TOlyRfhgd9Q4jZAud4OqsjgTxCXE79Z34LKWg8taHbXAdJ5cfKeq/9oBlkYG8h5W4iopZLQb/bIr/eq2Or7kOLjBUG1IR0dJfihpqXxS87zIcNhnwgHOFD5a+QLU+5ipttrhdBV+x7ock1XzkShiFOdeY7FvkxhKMZDt6p8MguFEN1TcYSDDSRI5W9WVDe5rwHq18ET1dk7Wrl0Cn1AD22l2r5H+LbNxQXcB+/s4jKJgSAARu9JC9uMCQNZaDeB3Av1X7C8QwFSIsHH0riDxSTmDbVi6Dxkw4SYBfqL1RDJ+Sr2dnDwj2FHrdy66U6cDlsqDUEyMAJezP1rfWP4icIiIT3/ZWmrxF4w8bvrayMs97 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB5010.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2021 13:10:23.2091 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-Network-Message-Id: 8b05839c-517a-4160-c854-08d8b2446d34 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xeEROej8L/fR3eNDTI5o/HbPysrNA04HQbL2GWm6B0zI6Z/2EnnOioRRLfx5/6eKnADNixpwz3xYqf6uVLpYWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6418 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add ETHTOOL_A_LINKMODES_LANES, expand ethtool_link_settings with lanes attribute and define valid lanes in order to support a new lanes-selector. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- netlink/desc-ethtool.c | 1 + uapi/linux/ethtool.h | 8 ++++++++ uapi/linux/ethtool_netlink.h | 1 + 3 files changed, 10 insertions(+) diff --git a/netlink/desc-ethtool.c b/netlink/desc-ethtool.c index 96291b9..fe5d7ba 100644 --- a/netlink/desc-ethtool.c +++ b/netlink/desc-ethtool.c @@ -87,6 +87,7 @@ static const struct pretty_nla_desc __linkmodes_desc[] = { NLATTR_DESC_U8(ETHTOOL_A_LINKMODES_DUPLEX), NLATTR_DESC_U8(ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG), NLATTR_DESC_U8(ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE), + NLATTR_DESC_U32(ETHTOOL_A_LINKMODES_LANES), }; static const struct pretty_nla_desc __linkstate_desc[] = { diff --git a/uapi/linux/ethtool.h b/uapi/linux/ethtool.h index 052689b..85ec9c8 100644 --- a/uapi/linux/ethtool.h +++ b/uapi/linux/ethtool.h @@ -1736,6 +1736,14 @@ static __inline__ int ethtool_validate_speed(__u32 speed) return speed <= INT_MAX || speed == (__u32)SPEED_UNKNOWN; } +/* Lanes, 1, 2, 4 or 8. */ +#define ETHTOOL_LANES_1 1 +#define ETHTOOL_LANES_2 2 +#define ETHTOOL_LANES_4 4 +#define ETHTOOL_LANES_8 8 + +#define ETHTOOL_LANES_UNKNOWN 0 + /* Duplex, half or full. */ #define DUPLEX_HALF 0x00 #define DUPLEX_FULL 0x01 diff --git a/uapi/linux/ethtool_netlink.h b/uapi/linux/ethtool_netlink.h index c022883..0cd6906 100644 --- a/uapi/linux/ethtool_netlink.h +++ b/uapi/linux/ethtool_netlink.h @@ -227,6 +227,7 @@ enum { ETHTOOL_A_LINKMODES_DUPLEX, /* u8 */ ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG, /* u8 */ ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE, /* u8 */ + ETHTOOL_A_LINKMODES_LANES, /* u32 */ /* add new constants above here */ __ETHTOOL_A_LINKMODES_CNT, From patchwork Wed Jan 6 13:10:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danielle Ratson X-Patchwork-Id: 358020 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 C7754C433E9 for ; Wed, 6 Jan 2021 13:12:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CC9023129 for ; Wed, 6 Jan 2021 13:12:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727048AbhAFNMI (ORCPT ); Wed, 6 Jan 2021 08:12:08 -0500 Received: from mail-am6eur05on2048.outbound.protection.outlook.com ([40.107.22.48]:48736 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727021AbhAFNMH (ORCPT ); Wed, 6 Jan 2021 08:12:07 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T1SjZEcn66/ojufPv6iAHRPE/VlCYRtHZnCemJT+Cs3q6NV7HFuDOne6SSJdzsR/n6JXDJil2Dw6DU4NF4xgQHlY7+ADjYHrSgx0FQbWngQlfrgT0n20x4E7PQ27B3CztaYKwNXkIxBfV5e5ROkEj3HxZliPfrET6il+ACSJGdcqaA54dSG9ccgyFFetJ5A05SQQorbhZ+DkFsdOZEuV2at0tQbP+VxtaOkdy7TNnEHJqNcGyPJauc8KTFZyJ8lbhAc9H9QzWulbg3+y4t2hTc7iTcSkxEeDKnK5/fsguKJ6jLHFf1lJ3dxzIITxmwABrBFx+FizSMCBglFDy+p1zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dPIZ+gK2HhX0CnY/Wbars+Enryzwai+AM2LXSnSlQ9c=; b=F2g92dS0mMWtp9+frLIAmzSvFaJc8a2i3QjO6ZL5to+d2hPsgjUm5rOW+UVKMTsIHRUhJMGO/OfcnwZplVQRVOaxmRKHFDzXXRsbQWMyoaK+hgJDrjACWiMUO7kOCSNiHKWhv0yWCCQ4h0xtPm/wnmA+O7z7XCNSE5xOmfeJd3tZBvQwkPHzsLJJ/xriYhzCWwOwrhnsQgKCBGSpi0vd/pVp3Z8exuSAdbU5c3hK+ePf8lzMg3E928TI8OcAPhJ+/lKY/DldzYW+IZrW7d0A8yCdERgsmbGTTRO178RHPAGCn4LHkrFRbi6g+SfwFGzYGZpDt/8GhXy8E7qr9TlPmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dPIZ+gK2HhX0CnY/Wbars+Enryzwai+AM2LXSnSlQ9c=; b=pJzzg9b/PiVnDRH/Kd9cgQfU9iQfwMhWQ657VIHBD2uiuuV2OraSAhB80pog1l9DS48HPGIJGvdhdpWjAt1ykNq2XLJuq1tgFKCsEEPRR+2gSQpsXKHnxf325/BFCtUcvBpxpMFHIo9e6AezlRsuCoTSkVCccvf1fuz0IeKc25s= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB5010.eurprd05.prod.outlook.com (2603:10a6:208:cd::23) by AM0PR05MB6418.eurprd05.prod.outlook.com (2603:10a6:208:13e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Wed, 6 Jan 2021 13:10:26 +0000 Received: from AM0PR05MB5010.eurprd05.prod.outlook.com ([fe80::f463:9a6:abe8:afec]) by AM0PR05MB5010.eurprd05.prod.outlook.com ([fe80::f463:9a6:abe8:afec%5]) with mapi id 15.20.3742.006; Wed, 6 Jan 2021 13:10:26 +0000 From: Danielle Ratson To: netdev@vger.kernel.org Cc: mkubecek@suse.cz, f.fainelli@gmail.com, kuba@kernel.org, andrew@lunn.ch, mlxsw@nvidia.com, Danielle Ratson Subject: [PATCH ethtool 4/5] shell-completion: Add completion for lanes Date: Wed, 6 Jan 2021 15:10:05 +0200 Message-Id: <20210106131006.2110613-5-danieller@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210106131006.2110613-1-danieller@mellanox.com> References: <20210106131006.2110613-1-danieller@mellanox.com> X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR06CA0138.eurprd06.prod.outlook.com (2603:10a6:803:a0::31) To AM0PR05MB5010.eurprd05.prod.outlook.com (2603:10a6:208:cd::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dev-r-vrt-156.mtr.labs.mlnx (37.142.13.130) by VI1PR06CA0138.eurprd06.prod.outlook.com (2603:10a6:803:a0::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Wed, 6 Jan 2021 13:10:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f66ff544-8409-4271-e6ad-08d8b2446f5d X-MS-TrafficTypeDiagnostic: AM0PR05MB6418: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:619; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P2vNsZOMTIlXNFILkqRMwZ7JrnqAI6iw2BJ0vFa/s+JmRHDTTenv8rfScNKkfGPkWoVuSo4kbtb5suYYlBQGyegOzzvJ/Ct68MYD5hOaE1oHtl34n4ECMwLI+CKBfY6b9Nx7j32Uw4FUhpSew0YV5ATOS7ETj/mj0hCSWiyvoiSF+RloMZvwz0gfe710gJQeT7CRlwJV5TKo58LPCy8JIEQQKq01VghDDDAIs2vLtsIzVtTBvwqjex6GteV/yz1N7zKkfXu4VPL6fXlZ/cXcWosDLECXXn2Bki9R+aKS4mIFjPZt4ycRz7HRvVKTUjv9PmcFvahbBABBrU4+vAI6OeEN5rqNe79z0/d6wIYbkOHJgWbTXWQu5I4K3uImmax+rpQG1jjtLCXQ1G4p4PzMOA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB5010.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(396003)(39860400002)(136003)(366004)(4744005)(26005)(8936002)(16526019)(186003)(107886003)(6486002)(6512007)(316002)(6916009)(5660300002)(6666004)(4326008)(2906002)(6506007)(956004)(2616005)(86362001)(1076003)(8676002)(66946007)(478600001)(66556008)(66476007)(36756003)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Cb65zsABIXwsvMB7QPerYkSUUw0Ws0SFHLGkB+ZI79WBjydBCDLASYMCbdZ+jroIwlG0i0B9TQkSCu6z5yZWtrmpL1EcH71ophpSX5OnP8DUI8juCPFGk7Y8zB6XspNli0xVGnK4T0nUFdKfuVB+V53WKOtjsyv0kIRxlUBNDqBJOotr1xXis3LIJJjz10g53li0UXCHMpltaW6is9peLzcqWpZjae8kV0hJH2SIcq41JK7IrhJ4dxvqiPA1R2Tz8HzBA1dRXJU5N3WkH+zxbqqAKHbBQfC9xHW3S5zP3bKYl4FtVuA5QtS7ERxRG1yOKaOUCqCb+9SIcbygIEWyGJR9v9SSHE727S/GurBzNXjMeRM3Ee65QqzOPUXza1Kk2AGSbOEHAbx99JAdu9cmxI7COmeN0TWJlkJAcFDINZ1HD0SnsunirUY9UGmNAsBFv+PrbNrpxDmAYrtVfaT5hC9EgbQ4kW0TQixSUKT243Ahn8O92vNaq8t0hRHAtuTGMkhzsUffDCgWjOiGCVrVJuzXavOGGSSUsj2ibU83KWJef9pm8TJPPiQum8bEmRil77hmifml2jlQgYyRxOFzpOdonicH/3xHREx819Kj0AQoWj3/NngrJe0mxe6HQpvGbwiUDB+oPSU9DLJPbecyGpykUzriopQgi5oU8LtSN3hQrVXyG8HzvFbT5bXP/atMMuBes0FKOmCPa0+wMmUt6gez9dEpLzfMvNLVMwgaMq1ZVC720+3iiMm4qN/outkta9iqd5Oua2FgzcTdCR0qkZqSBsdrm2vIuenYEGN5l7MDhg+lZKOeBj2eQigeaTpVcgimeZN80jreGLqbdW0pQKv97x7zm/B+E+RcdFYmMO9UHcGmFtxO4DkmY1CXBm/r8XKkZBYn9pMSrpdOEKxjO81x15hlhfhpwWgZW3pRTA1QZ3m/KFEmTzSabKHpO6LUsUnI+jY7VvBqC/gvVQAyik8U9rsDkZK500AsWuhjTUI0AAcUoZPbgZ2KYiHhLHmR X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB5010.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2021 13:10:26.8630 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-Network-Message-Id: f66ff544-8409-4271-e6ad-08d8b2446f5d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 48HQhft4Ejy/5s3rKIodd5rM1qQNjvFlyL5FSVrjwRYq7c2WX3ikknqNxviNFPvep9QONu+omTXkCQy9YoFPbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6418 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Lanes was added as a new link mode setting in ethtool. Support completion for lanes when setting parameters. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- shell-completion/bash/ethtool | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell-completion/bash/ethtool b/shell-completion/bash/ethtool index 5305559..4557341 100644 --- a/shell-completion/bash/ethtool +++ b/shell-completion/bash/ethtool @@ -97,6 +97,7 @@ _ethtool_change() [speed]=notseen [wol]=notseen [xcvr]=notseen + [lanes]=notseen ) local -A msgtypes=( @@ -175,6 +176,9 @@ _ethtool_change() xcvr) COMPREPLY=( $( compgen -W 'internal external' -- "$cur" ) ) return ;; + lanes) + # Number + return ;; esac local -a comp_words=() From patchwork Wed Jan 6 13:10:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danielle Ratson X-Patchwork-Id: 358025 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 2CAF7C433E9 for ; Wed, 6 Jan 2021 13:11:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE76323102 for ; Wed, 6 Jan 2021 13:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726806AbhAFNLU (ORCPT ); Wed, 6 Jan 2021 08:11:20 -0500 Received: from mail-eopbgr150083.outbound.protection.outlook.com ([40.107.15.83]:6405 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726701AbhAFNLR (ORCPT ); Wed, 6 Jan 2021 08:11:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=InsAQxvlnRUn5xIyKhjaDfJ+aQuhlS3mU/uVMFJ2poTni2SY90uQjV74P0AN5smE/Evu8Amh8naHPGYfSMR9LWtmelgUVAnTWjabGyj2FnQRqsuwQDjsyM/kXArESn2uu0qIB2Gn5hwGNLQIQ2QcwT/NuF8+CFrEEu/wqWpoSMK71TcVKGfAFXWhCONK0ydmPH36yrHd8787vBUDJkxjDam1xsaMf6QoSm5Xj887c0Cd32km7eU2DQWTePf/JZlXf+NQtWm3eW3qnuvE1iVHTH+sfUDp/7IZq4nZ/8lC7P0kDocz7cOXhSrsS1jtxhjDDfPURCn91or303o5jcsloQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DXvp3Qq0Z1jTd4IAfVLxEytoIeM5v4HA3aAI0e7zPpE=; b=Dwj+z2ExJW+VclJWH89r5jBPFo1P6N6wfFUTi0VUyNczg5bN42UpQZip46AQho3Z1nvP+eiEtj0md+89z9PjROS+9qESlCX/rUCFAqQ0xDc0aC6RajeLkXP/+guDCtMcEWArfLbko2MzcOWMMnXzi0pVcanrAP6pmrgOS9PnX+KoH41bzXos+8KWEbq4jK5itTOPyHeU+KVc74AzIb76kATA2v7jL2oRRcHY9zpUMJ69Xva8wu37EsQZlPs6ZSphYeFphM42uIsvPMw3mzo0+rh7aCcb1bldMZDuYRqM5nr2/APdFVwtEaBIqFQch0eely5MiTBzOBSnn4vZexNS/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DXvp3Qq0Z1jTd4IAfVLxEytoIeM5v4HA3aAI0e7zPpE=; b=lA/6eZs8UOCHqOD1QRxF/x56xMI/KQSVvDaibE3D39rCNFd2347v9V2E9WodueJNz1lADR3eCFhZiouezJZgtHyr6hp/LuYKOFIfdjtkFPp/Yx22l/kBUD5FNJv7lLsRG+uWFqM2wujYq2EYl16YWEmY/e3mh7FI/iy5lSgOb+k= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB5010.eurprd05.prod.outlook.com (2603:10a6:208:cd::23) by AM9PR05MB7858.eurprd05.prod.outlook.com (2603:10a6:20b:2c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.21; Wed, 6 Jan 2021 13:10:28 +0000 Received: from AM0PR05MB5010.eurprd05.prod.outlook.com ([fe80::f463:9a6:abe8:afec]) by AM0PR05MB5010.eurprd05.prod.outlook.com ([fe80::f463:9a6:abe8:afec%5]) with mapi id 15.20.3742.006; Wed, 6 Jan 2021 13:10:28 +0000 From: Danielle Ratson To: netdev@vger.kernel.org Cc: mkubecek@suse.cz, f.fainelli@gmail.com, kuba@kernel.org, andrew@lunn.ch, mlxsw@nvidia.com, Danielle Ratson Subject: [PATCH ethtool 5/5] man: Add man page for setting lanes parameter Date: Wed, 6 Jan 2021 15:10:06 +0200 Message-Id: <20210106131006.2110613-6-danieller@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210106131006.2110613-1-danieller@mellanox.com> References: <20210106131006.2110613-1-danieller@mellanox.com> X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR06CA0138.eurprd06.prod.outlook.com (2603:10a6:803:a0::31) To AM0PR05MB5010.eurprd05.prod.outlook.com (2603:10a6:208:cd::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dev-r-vrt-156.mtr.labs.mlnx (37.142.13.130) by VI1PR06CA0138.eurprd06.prod.outlook.com (2603:10a6:803:a0::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Wed, 6 Jan 2021 13:10:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5371c4ee-b03c-40c9-19ff-08d8b2447021 X-MS-TrafficTypeDiagnostic: AM9PR05MB7858: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:519; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ieq6qNDTKh8XHMANcZPoE5JfCMYfZhjps3UxxMUh1z8pGSzICFMJfzAnH0hJz5pYKyp4AkwnR9JHke9whevXkS8dybN3XkrxxpnpG64q1nABpjMViuaqn9js+pO9hOqWLcb9EfMJ25hObu/PzSeO9OPhr2gKvxpQ+Md12PswOcOLvuV710vS6vbD8/IlKp1DvM3IeuaIvrLIZrcnrjH4l/5U9mQfbuWCRJldw0vVQbddSJXBuvNAjLj5XvnkcLus4Fivt2mBRrXO8Hfh9H9yTkHob1N2C7CWGzfFIaSUrKTlcsD+frPXrUXKT9AYoq2eXoiQsdnE8sg4dYFdPgxzBUqCjgY5QUXdGqkjyf0kukf4oK0uZPO0/Xc3WjHYBEvQnAQhi4FQnJQ0IqLRMpRHTQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB5010.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(39860400002)(346002)(136003)(396003)(8936002)(8676002)(4744005)(4326008)(66946007)(478600001)(1076003)(36756003)(6506007)(26005)(66556008)(956004)(5660300002)(6916009)(6666004)(16526019)(52116002)(316002)(6512007)(6486002)(83380400001)(2616005)(86362001)(66476007)(186003)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: kF4TP1onVOjkPUAGllmZCQ22yn7swdSyzmnoZs+zFyxdTk3aECMbFHC4M+JNGaKSLEUIpFn7LzbK8ihj/BAJsuUNVrOA7fcn3zSP7ewEUtnCyj3zrJISNoU9X0pw2RbrvlQLOyQWOKQRTU8prkkiU6EFCE3+unz4dAe4l8wZQc3kLv1B6XwA3NZNNO5VRekqDXhWoxoSqGevr2SNgRgbT1rfO4KeP8jiwaZRxVZVv9COnitf1JIVU20vXssagmi7tsEceDAqO9T34C6SwdKy4icPLDsgNxy3gJmwRsqjLtYsoEPKIYqshgp1wCjNgLrT9in8IelYN82Qc1ROyR5jiabgMqMA12O45cCtbl+mVSv1vjybZ3mCXcB3r1bq/FcO511ubwJ+Cgmo8uOeFXflOl4Dhnq35mT8g6LQl3hC+Epw8Irky5/OCMaU9R2uw5sTmRmPQ8zjLkyZi1gCu1vhcPQG2t+Mpb57bEXwk05IB0b5CGXyHOnY3+BFfdyHBeHFXoYN09L0wrfXdYABUlJv8IZTDmzeO77616wzZu9vDUr+F5gXb98aaEjyCE4APpNfAY6yilFAvlPUfZLi0CGY5NdJf3ZP+mIpcTFW+8Okd75EJVHaQLg7eLJiW8sx3b5s0mcvO7N/rClvF5nDxS0pJX6JU8TwL/EdLj9iAJqcv4K7wmRNUfl18yFlJYqTtMn5bZ5PtZKkvrTQQo0gIpYppKT4t5I7z+sHW/0iw/BmOnZLruOzC/dolho1qLq70bc4NAHpTJRc0oOqPDbhF4Ai+OUccK/DNKwO8c9EeeW8FLI3wvCMdUUGTdW2XCv5WnbfVVkEHChlQ7sVeAhYLI/MVLDDiUY+bt4zbofvMhksJ2JppRJ4vAq31eLREc5qrM57PmRcG3+m5SolBe9jtAM1Ukprcxxy4jlys2Gr0n7Fym/ElWgeNXx//A7Mcsc08qaD0HgsV6lMSFAyhlwvMoz9yW2ylCblRmKI9YjDLMuAapTOx3+Nkh9UgHtQc6gey2By X-MS-Exchange-Transport-Forked: True X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB5010.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2021 13:10:28.1173 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-Network-Message-Id: 5371c4ee-b03c-40c9-19ff-08d8b2447021 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8CVtGy90ldHsvZg8FQTk1fyd6jWF5mNgAqcSJ3/27e1Chk9W1NfRbWFHChXS926RwhKS1L9Q7InA7RyApBjKVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR05MB7858 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Danielle Ratson Lanes parameter was added for setting using ethtool. Update the man page to include the new parameter. Signed-off-by: Danielle Ratson --- ethtool.8.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index ba4e245..fe49b66 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -251,6 +251,7 @@ ethtool \- query or control network driver and hardware settings .B ethtool \-s .I devname .BN speed +.BN lanes .B2 duplex half full .B4 port tp aui bnc mii fibre da .B3 mdix auto on off @@ -685,6 +686,9 @@ Set speed in Mb/s. .B ethtool with just the device name as an argument will show you the supported device speeds. .TP +.BI lanes \ N +Set number of lanes. +.TP .A2 duplex half full Sets full or half duplex mode. .TP