From patchwork Wed Feb 10 13:48:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danielle Ratson X-Patchwork-Id: 12080881 X-Patchwork-Delegate: mkubecek+ethtool@suse.cz 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=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 71EC2C433E0 for ; Wed, 10 Feb 2021 13:50:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FA4E64E16 for ; Wed, 10 Feb 2021 13:50:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230346AbhBJNuE (ORCPT ); Wed, 10 Feb 2021 08:50:04 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:15459 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbhBJNt6 (ORCPT ); Wed, 10 Feb 2021 08:49:58 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 10 Feb 2021 05:49:17 -0800 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:17 +0000 Received: from dev-r-vrt-156.mtr.labs.mlnx (172.20.145.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:15 +0000 From: Danielle Ratson To: CC: , , , , , Danielle Ratson Subject: [PATCH ethtool v3 1/5] update UAPI header copies Date: Wed, 10 Feb 2021 15:48:36 +0200 Message-ID: <20210210134840.2187696-2-danieller@nvidia.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210134840.2187696-1-danieller@nvidia.com> References: <20210210134840.2187696-1-danieller@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612964958; bh=3dpW9XEF/ErmQSbOgUxqP2CbeCf8m425iZ/8wLPok+s=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=lTU8fv0LtDARdlZ1UwdAivlfrfWVI7dAG35h/zdAoOntgtGFQGIroFYHGpocqpkXp cbIE20LBjiOqXqDJd3y+B7wM35wMU/8FR+J7nFZfMfKxEEWVxionMltgoVQvLka7Ay iordRjh1Sk0E7IdfI3J/+xWVVzVcizsfpNkyYCYbD7pH7rRcB+mvzFluCrzlCtXAT7 Zs8VQwu3RFtviWNLp2X3oaFywEIrKQHIgefTiLvsMx5WQqxsd8MKcZgnZAvd4Oj+FF PH9tikrmttydW0/7bdzL2Ip27qrawq7d5jBEOFcF0+tDcsoGc9pG95oAKNCLw5mE/e iKmKhzelW+nFQ== Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: mkubecek+ethtool@suse.cz Update to kernel commit 012ce4dd3102. Signed-off-by: Danielle Ratson --- uapi/linux/ethtool.h | 2 +- uapi/linux/ethtool_netlink.h | 1 + uapi/linux/if_link.h | 10 ++++++++-- uapi/linux/netlink.h | 2 +- uapi/linux/rtnetlink.h | 20 +++++++++++++++----- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/uapi/linux/ethtool.h b/uapi/linux/ethtool.h index 052689b..a951137 100644 --- a/uapi/linux/ethtool.h +++ b/uapi/linux/ethtool.h @@ -14,7 +14,7 @@ #ifndef _LINUX_ETHTOOL_H #define _LINUX_ETHTOOL_H -#include +#include #include #include 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, diff --git a/uapi/linux/if_link.h b/uapi/linux/if_link.h index 307e5c2..c96880c 100644 --- a/uapi/linux/if_link.h +++ b/uapi/linux/if_link.h @@ -75,8 +75,9 @@ struct rtnl_link_stats { * * @rx_dropped: Number of packets received but not processed, * e.g. due to lack of resources or unsupported protocol. - * For hardware interfaces this counter should not include packets - * dropped by the device which are counted separately in + * For hardware interfaces this counter may include packets discarded + * due to L2 address filtering but should not include packets dropped + * by the device due to buffer exhaustion which are counted separately in * @rx_missed_errors (since procfs folds those two counters together). * * @tx_dropped: Number of packets dropped on their way to transmission, @@ -522,6 +523,8 @@ enum { IFLA_BRPORT_BACKUP_PORT, IFLA_BRPORT_MRP_RING_OPEN, IFLA_BRPORT_MRP_IN_OPEN, + IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT, + IFLA_BRPORT_MCAST_EHT_HOSTS_CNT, __IFLA_BRPORT_MAX }; #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) @@ -586,6 +589,8 @@ enum { IFLA_MACVLAN_MACADDR, IFLA_MACVLAN_MACADDR_DATA, IFLA_MACVLAN_MACADDR_COUNT, + IFLA_MACVLAN_BC_QUEUE_LEN, + IFLA_MACVLAN_BC_QUEUE_LEN_USED, __IFLA_MACVLAN_MAX, }; @@ -804,6 +809,7 @@ enum { IFLA_GTP_FD1, IFLA_GTP_PDP_HASHSIZE, IFLA_GTP_ROLE, + IFLA_GTP_COLLECT_METADATA, __IFLA_GTP_MAX, }; #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) diff --git a/uapi/linux/netlink.h b/uapi/linux/netlink.h index dfef006..5024c54 100644 --- a/uapi/linux/netlink.h +++ b/uapi/linux/netlink.h @@ -2,7 +2,7 @@ #ifndef __LINUX_NETLINK_H #define __LINUX_NETLINK_H -#include +#include #include /* for __kernel_sa_family_t */ #include diff --git a/uapi/linux/rtnetlink.h b/uapi/linux/rtnetlink.h index 5ad84e6..c66fd24 100644 --- a/uapi/linux/rtnetlink.h +++ b/uapi/linux/rtnetlink.h @@ -396,11 +396,13 @@ struct rtnexthop { #define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */ #define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */ #define RTNH_F_ONLINK 4 /* Gateway is forced on link */ -#define RTNH_F_OFFLOAD 8 /* offloaded route */ +#define RTNH_F_OFFLOAD 8 /* Nexthop is offloaded */ #define RTNH_F_LINKDOWN 16 /* carrier-down on nexthop */ #define RTNH_F_UNRESOLVED 32 /* The entry is unresolved (ipmr) */ +#define RTNH_F_TRAP 64 /* Nexthop is trapping packets */ -#define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD) +#define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | \ + RTNH_F_OFFLOAD | RTNH_F_TRAP) /* Macros to handle hexthops */ @@ -764,12 +766,18 @@ enum { #define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg)) /* tcamsg flags stored in attribute TCA_ROOT_FLAGS * - * TCA_FLAG_LARGE_DUMP_ON user->kernel to request for larger than TCA_ACT_MAX_PRIO - * actions in a dump. All dump responses will contain the number of actions - * being dumped stored in for user app's consumption in TCA_ROOT_COUNT + * TCA_ACT_FLAG_LARGE_DUMP_ON user->kernel to request for larger than + * TCA_ACT_MAX_PRIO actions in a dump. All dump responses will contain the + * number of actions being dumped stored in for user app's consumption in + * TCA_ROOT_COUNT + * + * TCA_ACT_FLAG_TERSE_DUMP user->kernel to request terse (brief) dump that only + * includes essential action info (kind, index, etc.) * */ #define TCA_FLAG_LARGE_DUMP_ON (1 << 0) +#define TCA_ACT_FLAG_LARGE_DUMP_ON TCA_FLAG_LARGE_DUMP_ON +#define TCA_ACT_FLAG_TERSE_DUMP (1 << 1) /* New extended info filters for IFLA_EXT_MASK */ #define RTEXT_FILTER_VF (1 << 0) @@ -777,6 +785,8 @@ enum { #define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2) #define RTEXT_FILTER_SKIP_STATS (1 << 3) #define RTEXT_FILTER_MRP (1 << 4) +#define RTEXT_FILTER_CFM_CONFIG (1 << 5) +#define RTEXT_FILTER_CFM_STATUS (1 << 6) /* End of information exported to user level */ From patchwork Wed Feb 10 13:48:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danielle Ratson X-Patchwork-Id: 12080883 X-Patchwork-Delegate: mkubecek+ethtool@suse.cz 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=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 8BF7FC433DB for ; Wed, 10 Feb 2021 13:50:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53B4664E77 for ; Wed, 10 Feb 2021 13:50:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbhBJNuV (ORCPT ); Wed, 10 Feb 2021 08:50:21 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:15462 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230184AbhBJNuB (ORCPT ); Wed, 10 Feb 2021 08:50:01 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 10 Feb 2021 05:49:20 -0800 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:19 +0000 Received: from dev-r-vrt-156.mtr.labs.mlnx (172.20.145.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:17 +0000 From: Danielle Ratson To: CC: , , , , , Danielle Ratson Subject: [PATCH ethtool v3 2/5] netlink: settings: Add netlink support for lanes parameter Date: Wed, 10 Feb 2021 15:48:37 +0200 Message-ID: <20210210134840.2187696-3-danieller@nvidia.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210134840.2187696-1-danieller@nvidia.com> References: <20210210134840.2187696-1-danieller@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612964960; bh=o3097n6D5EINUTBOgkzGiaYjcMwEHJdZnEKSiAyDcMM=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=cQqm7JX94aPXmuuDLkXhbkvf5yvkIx8v4J0hrW1bXlKUDAJL9UrijMyFp7DPGtKZz zoDNaSctubVAVaXQrgnTvwh6+FSOi1KwoZI9alW6xW5nK5IMZm1yWJMRUCCEBGyut8 UTrsYcTugGx4DRvSoaj7IB6YPm0nC592zSoqcktT5U2lpNdEPtDgYWLKUeBkTogLPC Z+Gi2/zeZ7ZRA+sokwhbB9cGW27pkndZO0bUzXCICRh6bLIFYs1D/RZSVB2RB4vkN7 KbSYeok8wfOpuC12LLMAju0oEyTfOUOJuhZcLJ0hkdbgJI8mdub9+sYPJryBlFNc2E 9jfjr/PigONng== Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: mkubecek+ethtool@suse.cz From: Danielle Ratson Add support for "ethtool -s lanes N ..." for setting a specific number of lanes. Signed-off-by: Danielle Ratson --- Notes: v3: * Remove a leftover. * After adding a seperated patch for uapi headers, squash rest of the first patch. ethtool.c | 1 + netlink/desc-ethtool.c | 1 + netlink/settings.c | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/ethtool.c b/ethtool.c index fb90e9e..a8339c8 100644 --- a/ethtool.c +++ b/ethtool.c @@ -5620,6 +5620,7 @@ static const struct option args[] = { .nlfunc = nl_sset, .help = "Change generic options", .xhelp = " [ speed %d ]\n" + " [ lanes %d ]\n" " [ duplex half|full ]\n" " [ port tp|aui|bnc|mii|fibre|da ]\n" " [ mdix auto|on|off ]\n" 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/netlink/settings.c b/netlink/settings.c index 90c28b1..c54fe56 100644 --- a/netlink/settings.c +++ b/netlink/settings.c @@ -1067,6 +1067,13 @@ static const struct param_parser sset_params[] = { .handler = nl_parse_direct_u32, .min_argc = 1, }, + { + .arg = "lanes", + .group = ETHTOOL_MSG_LINKMODES_SET, + .type = ETHTOOL_A_LINKMODES_LANES, + .handler = nl_parse_direct_u32, + .min_argc = 1, + }, { .arg = "duplex", .group = ETHTOOL_MSG_LINKMODES_SET, From patchwork Wed Feb 10 13:48:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danielle Ratson X-Patchwork-Id: 12080887 X-Patchwork-Delegate: mkubecek+ethtool@suse.cz 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=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 3361DC433DB for ; Wed, 10 Feb 2021 13:51:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EEF2264E16 for ; Wed, 10 Feb 2021 13:51:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231425AbhBJNut (ORCPT ); Wed, 10 Feb 2021 08:50:49 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:15533 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230376AbhBJNuj (ORCPT ); Wed, 10 Feb 2021 08:50:39 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 10 Feb 2021 05:49:22 -0800 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:22 +0000 Received: from dev-r-vrt-156.mtr.labs.mlnx (172.20.145.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:20 +0000 From: Danielle Ratson To: CC: , , , , , Danielle Ratson Subject: [PATCH ethtool v3 3/5] netlink: settings: Expose the number of lanes in use Date: Wed, 10 Feb 2021 15:48:38 +0200 Message-ID: <20210210134840.2187696-4-danieller@nvidia.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210134840.2187696-1-danieller@nvidia.com> References: <20210210134840.2187696-1-danieller@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612964962; bh=zO/7Ow2N5qOqLq/7Pqs3P1b1ygTD0xz9CPJyoSVKLis=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=JVDZ55bMhO6N+vG3QClT/TuUmAc+zKJR0PyVu+As5+EEA3Gx5atzKCttk3GVP8Pu7 eiyHJdPC0UkwWscWMMKwuEwuSVS13xrC7ryBdjg8v44fih/BhI2kYN3LRXvazH5w9z XxV3Ta951IW2B4BlUz8LrjsFcOlhWQUpVKxV1pSv6UvGqSQQYlfWQnAWCSjBbl945i 8tsz/YJaHuqENQKBhga7Gy8Hg871S/L7gWIh6xbd+uJl5ql1F/M5uNFazTuduIFeLp sxnJUrsAyP1ykAxtyUWhqwLMxdeoEHA1UcwpmLya15n4fduYem2rZz5KjvqD8mffu6 KUlv0Y6M1VPcw== Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: mkubecek+ethtool@suse.cz Currently, the user does not have the information regarding how many lanes are used when the link is up. After adding a possibility to advertise or force a specific number of lanes this information becomes helpful. Expose the number of lanes in use if the information is passed from kernel. Signed-off-by: Danielle Ratson --- Notes: v2: * Remove possibility for printing unknown lanes, as now unknown lanes attribute doesn't pass to netlink. netlink/settings.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netlink/settings.c b/netlink/settings.c index c54fe56..e47a38f 100644 --- a/netlink/settings.c +++ b/netlink/settings.c @@ -473,6 +473,12 @@ int linkmodes_reply_cb(const struct nlmsghdr *nlhdr, void *data) else printf("\tSpeed: %uMb/s\n", val); } + if (tb[ETHTOOL_A_LINKMODES_LANES]) { + uint32_t val = mnl_attr_get_u32(tb[ETHTOOL_A_LINKMODES_LANES]); + + print_banner(nlctx); + printf("\tLanes: %u\n", val); + } if (tb[ETHTOOL_A_LINKMODES_DUPLEX]) { uint8_t val = mnl_attr_get_u8(tb[ETHTOOL_A_LINKMODES_DUPLEX]); From patchwork Wed Feb 10 13:48:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danielle Ratson X-Patchwork-Id: 12080889 X-Patchwork-Delegate: mkubecek+ethtool@suse.cz 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=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 731DDC433DB for ; Wed, 10 Feb 2021 13:51:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3625D64E6F for ; Wed, 10 Feb 2021 13:51:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231499AbhBJNvF (ORCPT ); Wed, 10 Feb 2021 08:51:05 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:15534 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231148AbhBJNuk (ORCPT ); Wed, 10 Feb 2021 08:50:40 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 10 Feb 2021 05:49:25 -0800 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:24 +0000 Received: from dev-r-vrt-156.mtr.labs.mlnx (172.20.145.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:22 +0000 From: Danielle Ratson To: CC: , , , , , Danielle Ratson Subject: [PATCH ethtool v3 4/5] shell-completion: Add completion for lanes Date: Wed, 10 Feb 2021 15:48:39 +0200 Message-ID: <20210210134840.2187696-5-danieller@nvidia.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210134840.2187696-1-danieller@nvidia.com> References: <20210210134840.2187696-1-danieller@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612964965; bh=hsBr97skxaxGgtopj9RDwAb0KvONnOCtmcDRL+W1NJk=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=XKZtnr8MgGBydGvw9VsZYJAuYDoCsmfYRXdidJnhIpqO0XaxHht0tpPW4S8+R72mn KeBy/HEmQrub38+r5xvh1pjZWH+wyvTf+dV9A/PpnORYAaUr52m0P7O+JFtsw0m77m TvNeNo32vL1vOZTO9izV7kINOHf5uKGiwDvZ4EkWsupXhQf0ZCSXRQbgbEVrGxbWEM AUGQHhNynY0cx3ypwgFjx0lU97nGQS7TMh1zhoQJtkLsbQl8iadFhqYHWDZtAKwsQb oYMS3oyjpV/Q3NhamnP5L3EsgNuEynL2eduBB8RRv9+EOInIV+aian6SHeGCRufO/6 Frt0xCGAqLLhA== Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: mkubecek+ethtool@suse.cz From: Danielle Ratson 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 Feb 10 13:48:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danielle Ratson X-Patchwork-Id: 12080885 X-Patchwork-Delegate: mkubecek+ethtool@suse.cz 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=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,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 1CF72C433E0 for ; Wed, 10 Feb 2021 13:50:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0A0564E77 for ; Wed, 10 Feb 2021 13:50:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231326AbhBJNud (ORCPT ); Wed, 10 Feb 2021 08:50:33 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:6470 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230394AbhBJNuH (ORCPT ); Wed, 10 Feb 2021 08:50:07 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 10 Feb 2021 05:49:27 -0800 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:27 +0000 Received: from dev-r-vrt-156.mtr.labs.mlnx (172.20.145.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 13:49:24 +0000 From: Danielle Ratson To: CC: , , , , , Danielle Ratson Subject: [PATCH ethtool v3 5/5] man: Add man page for setting lanes parameter Date: Wed, 10 Feb 2021 15:48:40 +0200 Message-ID: <20210210134840.2187696-6-danieller@nvidia.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210210134840.2187696-1-danieller@nvidia.com> References: <20210210134840.2187696-1-danieller@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612964967; bh=lJN+XR69IOEVB/YZ4idOOmkI3khbeamZqAvWYp4mJn4=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=i5yz7Jkxx80+JboZplqLgkmUgTMP/hwRoU5Al4l64Q29W8w0cW3yAwErO0xiHvmJm TPh1dTlcTBq/Ujw9v/nqHRbpVYZ9pewP3rRrnMB+fbB9VtPYAf9MSsXMv+bKh8rXIb biJOvm01Sl0+4zaE6zQ1SCUpJFX/FuZYhRzTHu+tj9lVXh22OsLo1hyW3zffUObpoi 3aVOGdwJM7TOZJAvcqNNjX7fZbce4zIipaYXCbhwsAZ273C4X/Pki1pLG4Eni6zuhU NZNtDZAgShP+T1HRir6BpOgDUsejt3p683ZrPVxQnKlgZZMzASisFHCzDfT3QDOF/I 8YTs5nQJtZ31Q== Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: mkubecek+ethtool@suse.cz 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