From patchwork Tue Apr 9 10:58:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13622278 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DAEFBCD1299 for ; Tue, 9 Apr 2024 10:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=csS+rsQEze6bmdO3cBbV1Q0iB4WKGmV5jGvhdWitNGI=; b=yrld4lhLsriYe5 dOAIPTm+C5qxLTukRzCzfbU9PXt01SLgzVz4zWSJ5vFxo4PkV3Bd867VdbOqhsJR76WqiHAO/hs99 JRxDsXeaagj6LCfQ6a8Cv417Jv2ltIRVwrxpuEef+19dYa2KUTHmmeBcoUxSLW5sF1OhF/wsqbdM4 7f/76d+sNQ+jdOd9V5sDvtpw3bojrhkNX9EzFFK9pHzm7RleNjfxZapcIuH3KruwyW8KjZxSf3BKR 1K/tXHOP7nr5BXfMvEF1/u69Y5xlJsIJAtgJk0J2d501V9GTKwECA7doZp9MczFt7tzSZzdnG2i6U bb+E6dOEcjOF1FAYmECg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru9Bz-00000001YP8-0KiE; Tue, 09 Apr 2024 10:59:07 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru9Bq-00000001YIF-3HDt for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2024 10:59:02 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 92C1BC0005; Tue, 9 Apr 2024 10:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712660333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6JiJoj71wwbMuDRfP0xJZk24eqUqNdtQq+lnhKdtFz4=; b=Xp/Be+KYhX8cLiNvgJXLYasUPgi4VJJprc8ZAxNepBYojwjLX8MujPdt/9V53aMZCMamLp CSsrWCA3kiRG3i6RO8s5HLaHM+DooFh9C37r+w/OYt9DeA5PTfdKqh+lW/yr6Ce418x+DW bn8UzDo47ShIYAjJgvrBvixmTRJkkBGXfQeQ66CzkR2at5R4/o4A6S+cU1Ksq4wOLY1Gcg V1kvVVFjFXrNmjF2WdaUPGQDr4vyrYH7JU2PHWjZD8I8Lcy0UiWfd0Mf1z8PArrnbd0a4T ZFCytKTFzfMI6QMYbBNc+Z4+/4PiCNyM2oISgcTT0TyruKGxI3qxdUPf7s3xPA== From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?utf-8?q?K=C3=B6ry_Maincent?= , Jesse Brandeburg , Jonathan Corbet , =?utf-8?q?Marek_Beh=C3=BAn?= , Piergiorgio Beruto , Oleksij Rempel , =?utf-8?q?Nicol=C3=B2_Veronese?= , Simon Horman , mwojtas@chromium.org Subject: [PATCH net-next 0/8] net: Allow targeting specific PHYs through netlink Date: Tue, 9 Apr 2024 12:58:38 +0200 Message-ID: <20240409105847.465298-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240409_035859_155371_70D5F336 X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi everyone, This series is a resend of the las 8 patches of the link_topology series: https://lore.kernel.org/netdev/20240404093004.2552221-1-maxime.chevallier@bootlin.com/ There were a some conflicts on the netlink specs, which I guess made the series fail to apply. All patches of this series allow accessing and using the PHYs from the topology through netlink commands such as PLCA, PSE-PD, Cable testing and strsets, and introduces a dedicated command to list said PHYs. This re-send is simply rebased on net-next, with the addition of Andrew's Reviewed-by tags. Thanks, Maxime Maxime Chevallier (8): netlink: specs: add phy-index as a header parameter net: ethtool: Introduce a command to list PHYs on an interface netlink: specs: add ethnl PHY_GET command set net: ethtool: plca: Target the command to the requested PHY net: ethtool: pse-pd: Target the command to the requested PHY net: ethtool: cable-test: Target the command to the requested PHY net: ethtool: strset: Allow querying phy stats by index Documentation: networking: document phy_link_topology Documentation/netlink/specs/ethtool.yaml | 62 ++++ Documentation/networking/ethtool-netlink.rst | 45 +++ Documentation/networking/index.rst | 1 + .../networking/phy-link-topology.rst | 120 +++++++ include/uapi/linux/ethtool_netlink.h | 20 ++ net/ethtool/Makefile | 2 +- net/ethtool/cabletest.c | 16 +- net/ethtool/netlink.c | 9 + net/ethtool/netlink.h | 5 + net/ethtool/phy.c | 300 ++++++++++++++++++ net/ethtool/plca.c | 19 +- net/ethtool/pse-pd.c | 13 +- net/ethtool/strset.c | 17 +- 13 files changed, 594 insertions(+), 35 deletions(-) create mode 100644 Documentation/networking/phy-link-topology.rst create mode 100644 net/ethtool/phy.c