From patchwork Mon Sep 28 14:44:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 289481 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=-13.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 9950AC2D0A8 for ; Mon, 28 Sep 2020 14:44:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F4FA21974 for ; Mon, 28 Sep 2020 14:44:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="eiDj92NQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726630AbgI1Ooo (ORCPT ); Mon, 28 Sep 2020 10:44:44 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:42758 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgI1Oon (ORCPT ); Mon, 28 Sep 2020 10:44:43 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 08SEievR051794; Mon, 28 Sep 2020 09:44:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1601304280; bh=hTbtMNy8Tou5IPtxmFl85d6SkHKUMcm3ml1cJkzweeY=; h=From:To:CC:Subject:Date; b=eiDj92NQnlKgBKacbHmqKBdTEdJ1FQfzeNe5r8bHevC6CEosCizwO7gX8Em/6RKyk swXvJvAHRLd8DaA7DhccTIiv4JQd2AgNK1KwUh31EekGoet0K4xFtpPBHtpA1Vw2G+ 9GkJeOpTpq1g+zZSYVL42VMr5Dlm1CvHFkVdcvKQ= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 08SEiexV025164 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 28 Sep 2020 09:44:40 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 28 Sep 2020 09:44:39 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 28 Sep 2020 09:44:39 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08SEidSL093173; Mon, 28 Sep 2020 09:44:39 -0500 From: Dan Murphy To: CC: , Dan Murphy Subject: [PATCH ethtool v3 1/3] Add missing 400000base modes for dump_link_caps Date: Mon, 28 Sep 2020 09:44:01 -0500 Message-ID: <20200928144403.19484-1-dmurphy@ti.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Commit 63130d0b00040 ("update link mode tables") missed adding in the 400000base link_caps to the array. Signed-off-by: Dan Murphy --- ethtool.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ethtool.c b/ethtool.c index 4f93c0f96985..974b14063de2 100644 --- a/ethtool.c +++ b/ethtool.c @@ -659,6 +659,16 @@ static void dump_link_caps(const char *prefix, const char *an_prefix, "200000baseDR4/Full" }, { 0, ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT, "200000baseCR4/Full" }, + { 0, ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT, + "400000baseKR4/Full" }, + { 0, ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT, + "400000baseSR4/Full" }, + { 0, ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT, + "400000baseLR4_ER4_FR4/Full" }, + { 0, ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT, + "400000baseDR4/Full" }, + { 0, ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT, + "400000baseCR4/Full" }, }; int indent; int did1, new_line_pend; From patchwork Mon Sep 28 14:44:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 260023 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=-13.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 1594BC2D0A8 for ; Mon, 28 Sep 2020 14:44:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD88420774 for ; Mon, 28 Sep 2020 14:44:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Hn0qTFnN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbgI1Oot (ORCPT ); Mon, 28 Sep 2020 10:44:49 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:42772 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgI1Oor (ORCPT ); Mon, 28 Sep 2020 10:44:47 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 08SEijx2051840; Mon, 28 Sep 2020 09:44:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1601304285; bh=4PDDHe8YAddwmsgT2I2nO59jg0/pGqD5FvTJwjbJtIU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Hn0qTFnN0cfTOSFznRbztDwLMp2NmQagsghepLgcTHVzuXFqAAIHH3+ftyUy4DcFU lLYzxFCaDKfdHdYHgc80jv7zaRR1Nk5dffXivbZC4hgUm3pIWzm9l+9+Xne6DX12Xw UEyVtxQohOz+RLasf6l3qeEJ/+vYj4czJygoaKOY= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 08SEij8E033260 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 28 Sep 2020 09:44:45 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 28 Sep 2020 09:44:44 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 28 Sep 2020 09:44:44 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08SEiiV1097400; Mon, 28 Sep 2020 09:44:44 -0500 From: Dan Murphy To: CC: , Dan Murphy Subject: [PATCH ethtool v3 2/3] update UAPI header copies Date: Mon, 28 Sep 2020 09:44:02 -0500 Message-ID: <20200928144403.19484-2-dmurphy@ti.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200928144403.19484-1-dmurphy@ti.com> References: <20200928144403.19484-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Update to kernel commit 55f13311785c Signed-off-by: Dan Murphy --- uapi/linux/ethtool.h | 2 ++ uapi/linux/ethtool_netlink.h | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/uapi/linux/ethtool.h b/uapi/linux/ethtool.h index 847ccd0b1fce..052689bcc90c 100644 --- a/uapi/linux/ethtool.h +++ b/uapi/linux/ethtool.h @@ -1615,6 +1615,8 @@ enum ethtool_link_mode_bit_indices { ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 87, ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 88, ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 89, + ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 90, + ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 91, /* must be last entry */ __ETHTOOL_LINK_MODE_MASK_NBITS }; diff --git a/uapi/linux/ethtool_netlink.h b/uapi/linux/ethtool_netlink.h index cebdb52e6a05..c022883cdb22 100644 --- a/uapi/linux/ethtool_netlink.h +++ b/uapi/linux/ethtool_netlink.h @@ -79,6 +79,7 @@ enum { ETHTOOL_MSG_TSINFO_GET_REPLY, ETHTOOL_MSG_CABLE_TEST_NTF, ETHTOOL_MSG_CABLE_TEST_TDR_NTF, + ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY, /* add new constants above here */ __ETHTOOL_MSG_KERNEL_CNT, @@ -91,9 +92,12 @@ enum { #define ETHTOOL_FLAG_COMPACT_BITSETS (1 << 0) /* provide optional reply for SET or ACT requests */ #define ETHTOOL_FLAG_OMIT_REPLY (1 << 1) +/* request statistics, if supported by the driver */ +#define ETHTOOL_FLAG_STATS (1 << 2) #define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \ - ETHTOOL_FLAG_OMIT_REPLY) + ETHTOOL_FLAG_OMIT_REPLY | \ + ETHTOOL_FLAG_STATS) enum { ETHTOOL_A_HEADER_UNSPEC, @@ -376,12 +380,25 @@ enum { ETHTOOL_A_PAUSE_AUTONEG, /* u8 */ ETHTOOL_A_PAUSE_RX, /* u8 */ ETHTOOL_A_PAUSE_TX, /* u8 */ + ETHTOOL_A_PAUSE_STATS, /* nest - _PAUSE_STAT_* */ /* add new constants above here */ __ETHTOOL_A_PAUSE_CNT, ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1) }; +enum { + ETHTOOL_A_PAUSE_STAT_UNSPEC, + ETHTOOL_A_PAUSE_STAT_PAD, + + ETHTOOL_A_PAUSE_STAT_TX_FRAMES, + ETHTOOL_A_PAUSE_STAT_RX_FRAMES, + + /* add new constants above here */ + __ETHTOOL_A_PAUSE_STAT_CNT, + ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1) +}; + /* EEE */ enum { From patchwork Mon Sep 28 14:44:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 289480 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=-13.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 CAE70C2D0A8 for ; Mon, 28 Sep 2020 14:44:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8FC5920774 for ; Mon, 28 Sep 2020 14:44:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="sKjX55KC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbgI1Oox (ORCPT ); Mon, 28 Sep 2020 10:44:53 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:42798 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgI1Oox (ORCPT ); Mon, 28 Sep 2020 10:44:53 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 08SEipPW051876; Mon, 28 Sep 2020 09:44:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1601304291; bh=i9MRAaLfrkF6uRE/AWA4zwFpA6EWftu/edCSpykGDzs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=sKjX55KCNaExsBKWx7QVCKPH5V/ONESb3bWZzQYmc0u6oo6FsSyVoRfCoRG2hxqXW SrulOsElm/KXqO5/1vuN3e+aQXidKJgUCcXrOmL3xWRJWfIOMKpcm5NtpNe+/my42N SLX95stE5GYpVl0rCgK/WqlgTdsxXDKt4bt4Q1RI= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08SEipZL003178; Mon, 28 Sep 2020 09:44:51 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 28 Sep 2020 09:44:51 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 28 Sep 2020 09:44:51 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08SEipnb097520; Mon, 28 Sep 2020 09:44:51 -0500 From: Dan Murphy To: CC: , Dan Murphy Subject: [PATCH ethtool v3 3/3] Update link mode tables for fiber Date: Mon, 28 Sep 2020 09:44:03 -0500 Message-ID: <20200928144403.19484-3-dmurphy@ti.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200928144403.19484-1-dmurphy@ti.com> References: <20200928144403.19484-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Update the link mode tables to include 100base Fx Full and Half duplex modes. Signed-off-by: Dan Murphy --- ethtool.8.in | 2 ++ ethtool.c | 6 ++++++ netlink/settings.c | 2 ++ 3 files changed, 10 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index d0921949b37e..7c6e23e28ffa 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -794,6 +794,8 @@ lB l lB. 0x8000000000000000000000 400000baseLR4_ER4_FR4 Full 0x10000000000000000000000 400000baseDR4 Full 0x20000000000000000000000 400000baseCR4 Full +0x40000000000000000000000 100baseFX Half +0x80000000000000000000000 100baseFX Full .TE .TP .BI phyad \ N diff --git a/ethtool.c b/ethtool.c index 974b14063de2..39a1862a72a4 100644 --- a/ethtool.c +++ b/ethtool.c @@ -463,6 +463,8 @@ static void init_global_link_mode_masks(void) ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT, ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT, ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT, + ETHTOOL_LINK_MODE_100baseFX_Half_BIT, + ETHTOOL_LINK_MODE_100baseFX_Full_BIT, }; static const enum ethtool_link_mode_bit_indices additional_advertised_flags_bits[] = { @@ -669,6 +671,10 @@ static void dump_link_caps(const char *prefix, const char *an_prefix, "400000baseDR4/Full" }, { 0, ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT, "400000baseCR4/Full" }, + { 0, ETHTOOL_LINK_MODE_100baseFX_Half_BIT, + "100baseFx/Half" }, + { 1, ETHTOOL_LINK_MODE_100baseFX_Full_BIT, + "100baseFx/Full" }, }; int indent; int did1, new_line_pend; diff --git a/netlink/settings.c b/netlink/settings.c index 3059d4d0d0b7..41a2e5af1945 100644 --- a/netlink/settings.c +++ b/netlink/settings.c @@ -162,6 +162,8 @@ static const struct link_mode_info link_modes[] = { [ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT] = __REAL(400000), [ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT] = __REAL(400000), [ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT] = __REAL(400000), + [ETHTOOL_LINK_MODE_100baseFX_Half_BIT] = __HALF_DUPLEX(100), + [ETHTOOL_LINK_MODE_100baseFX_Full_BIT] = __REAL(100), }; const unsigned int link_modes_count = ARRAY_SIZE(link_modes);