From patchwork Wed Jul 3 14:07:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13722364 X-Patchwork-Delegate: kuba@kernel.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 0A58B1849CF; Wed, 3 Jul 2024 14:08:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720015705; cv=none; b=HcZvL9gBDQc8f7/k8cSWoFjAwWBrJF/BsbE4OOLuR22yHAlrXi7VSx4oIljCox/fvE1/6A4G1A0Kwp6/6ehpWfismTZdMV2+/vNRFsQo9vlRemQ3+oLktCVnEY1suVpdgYlWvaTu2RU+LGCkMlSopmjI1ZNws0ktNyoQ/v0UfjU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720015705; c=relaxed/simple; bh=5N5f3p4AhmYibLdKu8pkKEcX2K8a5Yv2QRan1fzfDK0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q1FurMXhxD54tfzqkZB1hzV3uKf68PHo8466Lq6xl3OITo6elaP/c9gePLFLij9ggFFScSVnJAciGoPZuXrh7A9ZQueTuIUVPdCEZbpP/Loamyyo6a/hOJLKLTrZz7KFfhQ9q/713yipulEbYx5hbUp48MMuWs3usYtpUHXrgbM= 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=CwEvgihD; arc=none smtp.client-ip=217.70.183.196 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="CwEvgihD" Received: by mail.gandi.net (Postfix) with ESMTPSA id 63469E0006; Wed, 3 Jul 2024 14:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1720015701; 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=HKJGfXiws2tYQ9mibdEFx9fRNcFEwScp0PLv7RWnhKQ=; b=CwEvgihD5CEer/V1ueg0gtDl8yeYSEWS5hVYo0tWFVCzABtYIV2MFg2NTDc49tWOQuR/Ws 8X3g6NqyDuNQ8+LHuQ6Nsf97623kSdXtWUpYf/NE/sLM2D3psXG/GBiAFQucVnOoZz4FWM AonZ5t2LNDlL7cRcRgoxPgmJY7eGnjalRq0/nT1AE2E/TVkrDUtRHzr/LV4o1oRTSNh4BQ CciaDLA+mwExL/sHYHfK51dBnrrShsdwgTMRJd/2NEPCfBJ+8Nr5Lnf468n0sv4AVwZZkz 9icLzbRJnYMLxC+XhYZhTw0Zx6GdP1ga4Ciatwo2QMefejm0JsA4OemDO5OYVg== 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 Subject: [PATCH net-next v15 08/14] netlink: specs: add ethnl PHY_GET command set Date: Wed, 3 Jul 2024 16:07:58 +0200 Message-ID: <20240703140806.271938-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240703140806.271938-1-maxime.chevallier@bootlin.com> References: <20240703140806.271938-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 --- Documentation/netlink/specs/ethtool.yaml | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml index 4ca7c5b8c504..80d364729772 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -24,6 +24,11 @@ definitions: name: module-fw-flash-status type: enum entries: [ started, in_progress, completed, error ] + - + name: phy-upstream-type + enum-name: + type: enum + entries: [ mac, phy ] attribute-sets: - @@ -1037,6 +1042,38 @@ 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 + - + name: id + type: u32 operations: enum-model: directional @@ -1822,3 +1859,25 @@ 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 + - id + dump: *phy-get-op