From patchwork Thu Dec 21 18:00:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 182380 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp588282dyi; Thu, 21 Dec 2023 10:04:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvuFoE9zfX28tHVDcr3cNXxXlvnT6ALhJ2rC+Pm137miFCkWxQyvPD+sPmTE6VQxEBDs18 X-Received: by 2002:a17:906:d4:b0:a26:8544:a7c4 with SMTP id 20-20020a17090600d400b00a268544a7c4mr88475eji.7.1703181855532; Thu, 21 Dec 2023 10:04:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703181855; cv=none; d=google.com; s=arc-20160816; b=OepWITsC9txXDN3qpWFyB7X5b9YmAkDDH4Mb+swgwR3JI5Iwl4c+jmhoqVzTOeVLBI d7z40auf+P5uVVdby/muvQ2jv//S6oDVSBShXsOza05ZczaALVaa85h3zBArN490G3HY akT6ebJBrwvO1PpcwSGDuApea7Rha0kl0ulxyGw23CDBwbPMLVnly61lMVv9s+3YY4qB +pRVkDCB7vZcrCuPVzpCXTIRET6r9HO/DxSm4TDtCZeTfDF2W1C0yG5FeqIoAn86TbER 8Uoy4HVmC8r7+0koM4VJGo5l0+AiqKXgbp7Bhs8emCHFD1rXZp68I1W8vfDKePuBtrV5 PNBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Wx2Xb3yBI5nDc2ovBsIgjH+D56lUacx8ViJl/dOCbdg=; fh=d3Krop4IPE3x6nBOvh3GY5QHg6bS91zVnQiH59I3hyM=; b=Dl+e2x2kEqqYQa6JCwlHzUAbEmSj92UM0OdGwh3dhT+3L8ltPJOhBamfqdcts/CSFz 8KW7tXrE6V444pPSeWab0rG4m4bF/JcTsX7Kj8LpEJHHx4Dku2JL4ozpT29ixon+K5UM H7VB+mAlXSQcDpasDiUQOPLp+msC99V4hcScjRb0udp/LqmYwfba9tTWrWrk6bf1zGuB jbzC1ognfBeSSOknkLnemXx8NzLLhpk6THLX1HjU7Bh0G2tyvAwffgQIo4V9MWwgQo1O d1DQj+O1+byFrrg8cbvzh+TGm/Yppc/b/rtXzkwZQanW8ZzxxkWAPJ9csBxI0uLR5jwj BgfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=l3TJDEPe; spf=pass (google.com: domain of linux-kernel+bounces-8893-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8893-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 28-20020a170906101c00b00a1d94472b0dsi1059901ejm.169.2023.12.21.10.04.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 10:04:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8893-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=l3TJDEPe; spf=pass (google.com: domain of linux-kernel+bounces-8893-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8893-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2B9611F262AB for ; Thu, 21 Dec 2023 18:04:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FF7B77F0B; Thu, 21 Dec 2023 18:01:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="l3TJDEPe" X-Original-To: linux-kernel@vger.kernel.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 2F1DD76912; Thu, 21 Dec 2023 18:01:03 +0000 (UTC) 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 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4ED6A1C0010; Thu, 21 Dec 2023 18:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1703181662; 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=Wx2Xb3yBI5nDc2ovBsIgjH+D56lUacx8ViJl/dOCbdg=; b=l3TJDEPelTAzu/9j4WDDGDr/nXWRTnPaMgjhFfNAm4kxnE4CVHDAYAONkQ8MUzzkw52Eos NqIiFnEQynOW2OwSqpWdhjzYPppFlL4Y3J6N2GAyVSBrMdh1FBBPcaQqItw5c2tFvCgtcW 0/x9hZq09GExUYVrLvjl/WWFA3LW98lXZx8A9PeP5lkCt38oXnSeh2pUpBT7ewyKmyp/Xm 6Z0MG2C9gzwIWVdKpU6dZ/2kUA8HjTpoVVhNcWPWg/9a0DcQhcHvwYZQKOwrv5Xx0WBO9s N0frmnArjneewEm8nm3dwe86xeUX3UOkxPw8Q9YMcBorELXQihCYuLMwUnA0AA== 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 Subject: [PATCH net-next v5 08/13] netlink: specs: add ethnl PHY_GET command set Date: Thu, 21 Dec 2023 19:00:41 +0100 Message-ID: <20231221180047.1924733-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221180047.1924733-1-maxime.chevallier@bootlin.com> References: <20231221180047.1924733-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785915617083202466 X-GMAIL-MSGID: 1785915617083202466 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 --- V5: No changes 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