From patchwork Fri Dec 15 17:12:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13494708 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 78095C4332F for ; Fri, 15 Dec 2023 17:13:48 +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:References:In-Reply-To: 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: List-Owner; bh=2YnWiMCWfuvr9W6dRFenm3DllSTwuPiPRx/fXDOkXFs=; b=uY7TokhBg3LifL VIgKbWPhzaBAkkNwWQ989JZNNBHE3C44CXJl7iievkUIt0QxQooa7MQchLhnrqTSYKS4kdzZAlir+ Y48Iz6BE787korRRkxupqWo/56YqAPfx+kvkO4s3hksI/ie1bQfQJ9nDDeruqjE6kuD3x4drX83kA RneTbjO8MHFLBmyVIiQcUSTvaMn+9u02k/Pos8+SmQBLxLeHXYf4SN20Q1ELBqnW2L4xJPYXc8rv8 PxnBIEI68EeLWJrjxcLjRQPCPmXXtf++DHTpO3UKcWge4Zn6qyLO65f2oHR8TNYEskeb6bWjE1ldW sy/9DvI7x8nNJXk16X4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rEBkP-0040da-09; Fri, 15 Dec 2023 17:13:13 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rEBk5-0040Lv-1e for linux-arm-kernel@lists.infradead.org; Fri, 15 Dec 2023 17:12:55 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id A5271C0007; Fri, 15 Dec 2023 17:12:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702660372; 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: in-reply-to:in-reply-to:references:references; bh=A2+tj34apzyzLAZmojubwW3r4aHJz3IJgLO+9qPPESI=; b=LmOLSb7/idll3mgfMphPvfzeyshaLTMEHlCRfGupMJ7yb5LUxTD+PV77a9SyoHMOrwigK2 WP2/IjfuSl2i3o04m0rX3Jhwtg8yjEweD/v7dSV/vLWXFojSSKVDkg1HvmDKBifFBnaLaE CoFAaL7bEai+bXkOoJnX3hXSYuA1DWfkWM7zWav5EZuWAp3EXn2hOI0fVf+xAN0NID4/3i XLWF0+/vR74iAe+OMnJIIP6rLirxv5/wyYfeZZtqMUgPM8nC4plg8vjjexQyNg7MUPSSkf 0HZ/DeICMibk+o8ibnA7pU2ilH5oF4fWguXEaGb3fakDhruoVcoRUD5QrprBLQ== 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?= Subject: [PATCH net-next v4 08/13] netlink: specs: add ethnl PHY_GET command set Date: Fri, 15 Dec 2023 18:12:30 +0100 Message-ID: <20231215171237.1152563-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231215171237.1152563-1-maxime.chevallier@bootlin.com> References: <20231215171237.1152563-1-maxime.chevallier@bootlin.com> 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-20231215_091253_843923_DCED9FC1 X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. 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 The PHY_GET command, supporting both DUMP and GET operations, is used to retrieve the list of PHYs connected to a netdevice, and get topology information to know where exactly it sits on the physical link. Add the netlink specs corresponding to that command. Signed-off-by: Maxime Chevallier --- V4: Remove the ethtool-user generated code V3: New patch Documentation/netlink/specs/ethtool.yaml | 65 ++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml index bb6e1dc6d1c5..7f6fb1f61dd4 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -16,6 +16,11 @@ definitions: name: stringset type: enum entries: [] + - + name: phy-upstream-type + enum-name: + type: enum + entries: [ mac, phy ] attribute-sets: - @@ -945,6 +950,45 @@ attribute-sets: - name: burst-tmr type: u32 + - + name: phy-upstream + attributes: + - + name: index + type: u32 + - + name: sfp-name + type: string + - + name: phy + attributes: + - + name: header + type: nest + nested-attributes: header + - + name: index + type: u32 + - + name: drvname + type: string + - + name: name + type: string + - + name: upstream-type + type: u8 + enum: phy-upstream-type + - + name: upstream + type: nest + nested-attributes: phy-upstream + - + name: downstream-sfp-name + type: string + - + name: id + type: u32 operations: enum-model: directional @@ -1696,3 +1740,24 @@ operations: name: mm-ntf doc: Notification for change in MAC Merge configuration. notify: mm-get + - + name: phy-get + doc: Get PHY devices attached to an interface + + attribute-set: phy + + do: &phy-get-op + request: + attributes: + - header + reply: + attributes: + - header + - index + - drvname + - name + - upstream-type + - upstream + - downstream-sfp-name + - id + dump: *phy-get-op