From patchwork Mon Aug 9 10:22:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 494255 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=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, 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 330EEC4320A for ; Mon, 9 Aug 2021 10:23:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1395C6108C for ; Mon, 9 Aug 2021 10:23:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234726AbhHIKXu (ORCPT ); Mon, 9 Aug 2021 06:23:50 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:56023 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234595AbhHIKXl (ORCPT ); Mon, 9 Aug 2021 06:23:41 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 42DFA5C00C3; Mon, 9 Aug 2021 06:23:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 09 Aug 2021 06:23:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=NbpqQJcVgrujMx5OM HK9uAoqF0ZQuLsOroYvlRJ23rw=; b=SWtNLF3ziryjaugZx/fjpOww8ovxt7w0N UHjBJD7WWYW7UaoFOC1sZXv5BTyEeaLpGPZw9krp7fsieq0oWlYFf5JzzBYUzuCA uQTM1MNFHb3deZ8J6I9Fh1uHGkQcKa6xLP9del6cqYBsqj+3NoRhSrz6ItmDDlGX YOo0KeS+48rf036GGX0kyZy93fgaFm27EghvyDDPl4usw38ILtI23/1+fecXDQQr tHg9I3+vb70h6h21RlQCJNUB2ESoZrToW6P97jinNC/6liZVhttpP+HJz+WXkx1c k99DtHuM7yzyFFHgM3VeJVdIa86RbszGWFKdy3t/8mq6IhBmf3uow== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeejgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpefkughoucfutghhihhmmhgvlhcuoehiughoshgthhesihguohhstghh rdhorhhgqeenucggtffrrghtthgvrhhnpeetveeghfevgffgffekueffuedvhfeuheehte ffieekgeehveefvdegledvffduhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Aug 2021 06:23:16 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch, mkubecek@suse.cz, pali@kernel.org, vadimp@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: [RFC PATCH ethtool-next 0/6] ethtool: Add ability to control transceiver modules Date: Mon, 9 Aug 2021 13:22:50 +0300 Message-Id: <20210809102256.720119-1-idosch@idosch.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ido Schimmel Patch #1 updates the UAPI headers. Patch #2 adds the actual implementation that allows user space to set transceiver modules' low power mode. See the commit message for example output. Patches #3-#5 parse more fields from SFF-8636 and CMIS EEPROMs to provide better observability regarding the low power mode of the modules. Patch #6 adds the ability to reset transceiver modules. See the commit message for example usage. Ido Schimmel (6): Update UAPI header copies ethtool: Add ability to control transceiver modules' low power mode ethtool: Print CMIS Module State ethtool: Print CMIS Module-Level Controls ethtool: Print SFF-8636 Power set and Power override bits ethtool: Add ability to reset transceiver modules Makefile.am | 2 +- cmis.c | 52 +++++++++ cmis.h | 13 +++ ethtool.8.in | 24 +++++ ethtool.c | 16 +++ netlink/desc-ethtool.c | 12 +++ netlink/extapi.h | 6 ++ netlink/module.c | 191 ++++++++++++++++++++++++++++++++++ netlink/monitor.c | 8 ++ netlink/netlink.h | 2 + qsfp.c | 6 ++ qsfp.h | 2 +- shell-completion/bash/ethtool | 23 ++++ uapi/linux/ethtool.h | 4 +- uapi/linux/ethtool_netlink.h | 35 ++++++- uapi/linux/if_link.h | 19 ++++ uapi/linux/net_tstamp.h | 17 ++- uapi/linux/netlink.h | 5 +- 18 files changed, 428 insertions(+), 9 deletions(-) create mode 100644 netlink/module.c