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: 13622268 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9F9584A38; Tue, 9 Apr 2024 10:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712660337; cv=none; b=Owjb9W158E63vmPiR6c+5p842PFZXLuXfsHDpBDVgcJIXI5Jn0snQy0m1We1TP2CVGBq9C20WnQCDR7GswSLvGifjnO0mdSuuguUxiKTRkisvlux+avDtmLkiw3Q2ZXetSKlT3vEUHGoE/A+xDC+WayIPyvBIPFV35XhVo0onQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712660337; c=relaxed/simple; bh=xgdlhQ6no+eBBAb+8ul9yi1YXZyIFcsX7DxOmNDGJJo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TfH5KlpPLoHqbXsJuyVvQ/5bVoHc9vHZiH7IWcVLk6sQ+hNOWP+M8LPV/XEEDGZIh6OYC/X/lyFaDeepIruSEy+y0kgr48cEgsdFoyfmE0GvZqcKq8JZYmykiByyeFKYt4zbX5hLP4ErVV3r55pWdpBvDjbTttAb/M0X9wuTT9s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Xp/Be+KY; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Xp/Be+KY" 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 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-Patchwork-Delegate: kuba@kernel.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