From patchwork Fri Jan 26 18:38:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 192744 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp74654dyb; Fri, 26 Jan 2024 10:41:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaXVBWtEP/np6S+DGKILfpd5eUO7J0oCBWh8OrrtXzgD/Ul/6R7ZBRTuGcPQFiri/V3saK X-Received: by 2002:a05:6a20:bb18:b0:19a:7958:f451 with SMTP id fc24-20020a056a20bb1800b0019a7958f451mr112375pzb.78.1706294510242; Fri, 26 Jan 2024 10:41:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706294510; cv=pass; d=google.com; s=arc-20160816; b=G+gqkeaGiXzoU7PvLQbXWSAWSvZ/PUKnYNYeQRz4klsubsASnpWgOOXzEXk6PZ1VvQ XrxKXMJKe4L1HNx4xuDF0PEZ+Fqu1KzazYZZr10ML+dPcgXgSGdavymuYge/jHRNkEc2 vKWi2Og3Wd61qXpHVqNrGLA6YiAXKk/SCV6PrgzDhRDH2NESNRzRH00B3eLD9njyh8bb QrJAf5FT5KktfduicaFdAb7M7FsISU+kY8Jr+s0qY8Y2MFX5FjKMXAs1wYjH97aR3wKX miIPeUmt7535TmDl7K+hHKsikDYBUIThH7VLofEDc9wD/+RVzhX9/OdGF5AZbRQtkoyh Wo+w== ARC-Message-Signature: i=2; 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=P76UuFX42Mbbf1Xqm1+TRGZvf9JtOi4DULTKekwH38I=; fh=d3Krop4IPE3x6nBOvh3GY5QHg6bS91zVnQiH59I3hyM=; b=PDQ8qb/I8ZOqn93qYBHWaAb9Z+iz8zgVVA0IFATzn8KkUef+1e7nYV8k3O2xCiJaYo kPzsWcbnL63xGCbmT2yzHxTZTAZC+grhdMUmocVEMVSaSrLgsJxTmGF4gb3sZtea1OP9 UYJvjuKY3dh0Mp3TfqtVkEFD4NfdRwD4q8cHt54REq/EanAVN+TLiiXqztnkfUbH2X4b OKvY6f9LhuKBctRNTJaRTTFaziN4Jaq6hh3hZBEHUVayGkrIzmmXPY+S/+EfChGV4Yhf XPAi/46PmwU0vc+2buaV2vbQvBI310gzcKFvS3aWQGpk3lBQkpd7kmV5eSJ/9832l8MA EXEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=T9syU4aV; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-40507-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40507-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ca15-20020a056a02068f00b005bdfbf1d562si1550060pgb.192.2024.01.26.10.41.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 10:41:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40507-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=T9syU4aV; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-40507-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40507-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F22E5286C85 for ; Fri, 26 Jan 2024 18:41:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AD2441C95; Fri, 26 Jan 2024 18:39:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="T9syU4aV" Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 73808219EB; Fri, 26 Jan 2024 18:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706294348; cv=none; b=lDmShc2M8UhLVSrdvqw0Q4hSDREKWcpPfJDswZ4KxnvsIxqXwDXGhNLJsCDGMdp2JCu97iVWTAyP4vEasB0DLijKWPhilv4qHM3HkBVij7NXqEbv3ciJO8MjHB5gdt95h4CsC/tzESEHGFZCUXASZpG530Mnv1YC9tFHOYrc5HE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706294348; c=relaxed/simple; bh=L1/7GgZEZkwu907IIZsGcUhVTFO5X69YjAeJLh8+EaM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DDsqUwIOaaVRC6rVMaX8YkIEJkgUABuf1TSvoI46Bn3LYbPy4+a7mAImDjYgRvurT7C6ulwly499ewV5TxNAQc1pOUgThcsIlBfIgYyoDfbpcDLsk74DycXx3Lqj6G1xMofvlRi4oHYjb2ayADh8QsVpwN7IwQf2SGnslkba7Xs= 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=T9syU4aV; arc=none smtp.client-ip=217.70.183.199 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 B949BFF80D; Fri, 26 Jan 2024 18:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1706294344; 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=P76UuFX42Mbbf1Xqm1+TRGZvf9JtOi4DULTKekwH38I=; b=T9syU4aVvFUeVP1bIJ4bGttlSK/o5f/krNUKlkkHeb2SroxEPM4sKCxJs1C947GGJWlXTf xeRt512Z2cCBfH2iHSq2CwJJVWfgyL5n4EKwS3ZfSQYOy10MDhctig7ffV6jOW/qcSdVJo 7M6OcBG86Y1I1NVkOm3z97zktxL8jzcnHPCGkJtzIVd40JKfxqWnTlgYjVOtFATZpcYJAM crJx8S8T+T2NdGRaAEIbG9P54bLQibp+PnqC31KS+waXzZM0inkP92BOvo/3Q3YsZKiiaw cbz1U1j/VA5TwaRBwfZ9NmY+0dQ+tvMN3Qrlag9GI/jPSvfLRU/tUmUfddu+yg== 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 v6 08/13] netlink: specs: add ethnl PHY_GET command set Date: Fri, 26 Jan 2024 19:38:45 +0100 Message-ID: <20240126183851.2081418-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240126183851.2081418-1-maxime.chevallier@bootlin.com> References: <20240126183851.2081418-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: 1789179472462498165 X-GMAIL-MSGID: 1789179472462498165 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 --- V6: Updated the spec according to the new attributes V5: No changes V4: Remove the ethtool-user generated code V3: New patch 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 bb6e1dc6d1c5..e98d78fbc2f3 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,38 @@ attribute-sets: - name: burst-tmr type: u32 + - + 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-phy-index + type: u32 + - + name: upstream-sfp-name + type: string + - + name: downstream-sfp-name + type: string + - + name: id + type: u32 operations: enum-model: directional @@ -1696,3 +1733,25 @@ 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-phy-index + - upstream-sfp-name + - downstream-sfp-name + - id + dump: *phy-get-op