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: 179459 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp9444035dys; Fri, 15 Dec 2023 09:26:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGqynY7JbOeA7g8CPdkHtWn1bY7xZ9apMqYdmaZUvxGcCqfhNW83kJ6XlccZpjidZTc+ki X-Received: by 2002:a05:6e02:188a:b0:35f:871f:ae58 with SMTP id o10-20020a056e02188a00b0035f871fae58mr2476802ilu.102.1702661177824; Fri, 15 Dec 2023 09:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702661177; cv=none; d=google.com; s=arc-20160816; b=hwo2OxVZLHjBw0s0pdQj4NYW2p8w0ByZavx4ivahNZgd5+9WxdiCoEeSid1UCyxw2k gyWS67v5TUMmALrGc1Ae+KS8jg+qVm+XJNqyXbivshPezBa6HcoGg0+JvV20pyCOxaY6 zleyzTQYdM0vg2hIIwnO5S+91vxQ5L5BAP51ThjwmNjr/PviNFr7eLzJNgwx014TrlTW tkEuFQOHnzMuhuGuI7yrPur0vLV3IDCb81ApJd5dTKn9V1nGvC4LR5k9xrvJ2S3d9Usc 3ftLet8yZAHUEMXLv6dQSaO5j4F7rbi9Y994Tn0HtE0WeiTO+28rYJrjw3QM5zTtU3n5 ArBA== 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=A2+tj34apzyzLAZmojubwW3r4aHJz3IJgLO+9qPPESI=; fh=01/i7K9ues3Vkkz8uyECvnCPITXmGs/30yOh5FbyFgY=; b=U/KlG5pFygu1dLvKYuyvJ2blX7iy8TVw4mT+/O02pGUe71g9pjd+cVhG1OO1dh2YJp w00UUVvxXI2ckTy4KBkNOil8zK2RE44f0PiyFZA3j4cFaUqjYkebQQ4+DqKZTf8WjYIs 0D6Ts+2PmwyTlT04yHacmRJTysBsUozzkP0Tso+lZ3L3AQ62aLh5WoZmn/pNZcKvR4Q0 nbfyNYSF9NVeFt7/ai1dMoHYBz2A/RT+g0AyZkUixTlgHUnlnfJ8T++NDdpEmxNuGI44 Sz3N0kM15X5kiSwVMtpM62HdEvVv1UwA9VibBwa5zx7+HCbIin+die1fnVIurQu9bR8f eFPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="LmOLSb7/"; spf=pass (google.com: domain of linux-kernel+bounces-1400-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1400-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9-20020a631d49000000b005c65c11acf6si12732089pgm.774.2023.12.15.09.26.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 09:26:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1400-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="LmOLSb7/"; spf=pass (google.com: domain of linux-kernel+bounces-1400-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1400-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A733DB20F3B for ; Fri, 15 Dec 2023 17:24:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7BF347EFBE; Fri, 15 Dec 2023 17:12:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="LmOLSb7/" X-Original-To: linux-kernel@vger.kernel.org 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 AC7B781837; Fri, 15 Dec 2023 17:12:53 +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 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> 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: 1785369647195544545 X-GMAIL-MSGID: 1785369647195544545 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