From patchwork Tue Jul 9 06:30:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13727314 X-Patchwork-Delegate: kuba@kernel.org Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 AAB7713FD86; Tue, 9 Jul 2024 06:30:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720506659; cv=none; b=lqZKcPV/qfnfKXETDNGiPqOLF0XRi02Kw8v3HaWw0CNM32+ez9+Fo6LKEWQZdTzXxR4QRw3V4ONv04WPPqpc247a+tap3pjUOdUbZA/PjgNWDqiTScZPvX778/g0eMinI8G8rXSL4fcuV2rijmsxRgrhvwtHk8+4f9pDI0eEXdU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720506659; c=relaxed/simple; bh=9nFMUyvAdEsc+mL/OmsTjdcDyQJ9cJgeKxRUV855e/8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rjy5fzJmbUL+YN0/3CMB0LZj+sSu+XS07DOHlVOGqrHLwHBH5eb14uHsz3cZEsb7pcRcQEL2V4fLTP57By8oxBZnf1m7AO3jWtUTyPngwZBI6fS4duuIxZIvo0l0Hq7nx2dMSV6r420OK1kSG4AGVpd/iLDhyjIAQ8HXTuN8aAw= 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=fnBuZVkn; arc=none smtp.client-ip=217.70.183.201 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="fnBuZVkn" Received: by mail.gandi.net (Postfix) with ESMTPSA id 24CFE1BF213; Tue, 9 Jul 2024 06:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720506656; 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=2nR7mbdMNYGjRVvGzYpiCz2/ddBLbeDWSlAn83R/05w=; b=fnBuZVknDoxEsIblU4BM8gbeMU5UWBVKFtO9QJhTMuFeKAzWXBFoK6ZvTAUOKMkRZwGBNd q4bG2nQ4vnqzZAt/tav9BLIQBKapSW/W/90UG8v6kPsKWIFDIbV72OaY3+Bdryr/Ppblok v/mRmCbqCQaxL44zjGejACDPEG+XUWHwQLSQOgJDaw9k+QRzYTDr0ufqwN4EKzCkFoofvU oLCrJTnlCMIt0K75vdsDoW6TVHToo1ETwV1XXmZ6M4EJ0xB+YdI1Ie4m4/mTubdBFjlHiP w5kAsW8ASuFRUOhRjX6Olr6LvclVZLd8sLvJP9AOoYhEVXtCxvXjmso6Fa/fow== 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 , =?utf-8?q?Marek_Beh=C3=BAn?= , Piergiorgio Beruto , Oleksij Rempel , =?utf-8?q?Nicol=C3=B2_Veronese?= , Simon Horman , mwojtas@chromium.org, Nathan Chancellor , Antoine Tenart , Marc Kleine-Budde , Dan Carpenter , Romain Gantois Subject: [PATCH net-next v17 08/14] netlink: specs: add ethnl PHY_GET command set Date: Tue, 9 Jul 2024 08:30:31 +0200 Message-ID: <20240709063039.2909536-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240709063039.2909536-1-maxime.chevallier@bootlin.com> References: <20240709063039.2909536-1-maxime.chevallier@bootlin.com> 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 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 Reviewed-by: Christophe Leroy Tested-by: Christophe Leroy --- Documentation/netlink/specs/ethtool.yaml | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml index 586f1da8eb7b..d96a8050172b 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -39,6 +39,11 @@ definitions: - ovld-detected - power-not-available - short-detected + - + name: phy-upstream-type + enum-name: + type: enum + entries: [ mac, phy ] attribute-sets: - @@ -1088,6 +1093,35 @@ attribute-sets: - name: total type: uint + - + 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: u32 + enum: phy-upstream-type + - + name: upstream-index + type: u32 + - + name: upstream-sfp-name + type: string + - + name: downstream-sfp-name + type: string operations: enum-model: directional @@ -1880,3 +1914,24 @@ operations: - status-msg - done - total + - + 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-index + - upstream-sfp-name + - downstream-sfp-name + dump: *phy-get-op