From patchwork Wed Feb 28 11:47:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 207809 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3298280dyb; Wed, 28 Feb 2024 04:04:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVbylqULo8XX3Q3GxCXkpMTSxk0H5hKGwjkKK935h2ImKOz7RdutLzNDuS3hdaQmGtgdvoF0EcaN9jJGRqMd5g92YOIKg== X-Google-Smtp-Source: AGHT+IGzCVU33SRCWEd7a+nWuYP1q5bsyhLayjvHW5JTtV4mCNBMwYbo1nXOQSy1Czw+X+gRN0mq X-Received: by 2002:a05:6a00:9287:b0:6e5:2e25:3495 with SMTP id jw7-20020a056a00928700b006e52e253495mr10587275pfb.32.1709121883357; Wed, 28 Feb 2024 04:04:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709121883; cv=pass; d=google.com; s=arc-20160816; b=xpHWRApXaOO1EtWQPqrBNG8TrtrsV+14R2Y/oK6FDiRdcrwmWEo2lZd0EVtUcOK/mT mACU+pi2hvpGILBnhBbWfEsq2uBPK1Iacm3rLUbl5gCG52qmB8C5ZGzfh8+VA1sqoRdx LXkyPYkNUIRkegoy8GpS3be6Zfx2dVpUTEEMdeg1E9zXD37Qh1ZXWdDlpmf4B9bUTNLk 5lOcmo/JkudXAG1SSq8UDYY9B+UR0xtISXbVqiEa4oSZ6EtfAeZn7KazvfkJwjCoB81d WUjibHcW/N8jRujXb9X+SjvsRiVdHPa1mROiimVqbwpxkHvfNO7UUzipeqyh0X01NJ1R 1QYw== 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=SZCpH/Td7EE8pi8i7NoayzNdWhdSRlTAbXgEeQYZvHc=; fh=1vUu/d1GTjraph6G+ET+Z0z13QVrf6oL/IrrK9zaTF8=; b=HnHBEgX9H9TelZrNPhQKealwUfdq8ibTneKNuFsv/EBMorTuGYoZd5mw7N6RaRSrwJ ZHf4uNlGSq0Fnmd+xsKVjCC2OW6HNxx9oqzzu/CUtbJEHH51uGJTSH268UBOZGOe0+Ri 8+tvDt/VkB3XBfUAiKgNw1V0lgwtQBTjG12wwqg9VHvIYl1uLX7SrRusa2jmrMtn3uC3 VDMsP4hpzeLm3hkJdby7ZW3zDMo4bKnlyA5bgdm3u46F17/3KEYo7vZmzHJIpuEypOq1 Ec8z7mPjG4TTxPoDlS4ZScMcSzHF71x2gzeAOiqJ9k12F4C99pPOrUJxsXQ6kBaReV5T JaoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ALGtDcal; 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-84950-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84950-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. [147.75.48.161]) by mx.google.com with ESMTPS id q5-20020a056a00084500b006e4ba601b32si7458518pfk.211.2024.02.28.04.04.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 04:04:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84950-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=ALGtDcal; 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-84950-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84950-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 BF938B250EF for ; Wed, 28 Feb 2024 11:51:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB5E014900A; Wed, 28 Feb 2024 11:47:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ALGtDcal" 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 A16823BBF6; Wed, 28 Feb 2024 11:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709120868; cv=none; b=d8U9GHoC/MV/WrKi9SMFbSgaH2ss1dMXvSilc6yTryGjA1zVTTj3hPnFHuf6xJ4bmTJ6lbMpNQr/rwpMJJ3vsv6KkKjZczGWnEAv4HCoOpYBU46R4FusYrfkqB/Py0TPhQVO3ZJsBfOrbjTM7uuuHL+F8ovsQ+UCvIl086j+hGU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709120868; c=relaxed/simple; bh=7Q1aA/Qso7LLhhofFi6LH1M7du8VPuTYJh5gQpIcv4k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qmaoiDSNovvSSvZ+vp3iyicU22SuThITFBra/6GaUUJ8bYwmmv4pS6CZaMalv2+bFdFOtBdhMyd2KzDrPC2yx8XY/ne0nTGX2GZ6AR5YVhhYJqmbkxZgX75STSMYRtsjCUxUcplqg92n0VgL4W0VJNQ7ujVEK0osrKyc5GUIEbA= 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=ALGtDcal; arc=none smtp.client-ip=217.70.183.197 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 EF2DF1C0014; Wed, 28 Feb 2024 11:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709120865; 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=SZCpH/Td7EE8pi8i7NoayzNdWhdSRlTAbXgEeQYZvHc=; b=ALGtDcalsuD+r0GD1Vq6jFmQBkNy3tGC8r4cF7qU/qEqAC5Vt09V81PD9DIqZS/QR2oO/w AcWJZmPHkgG6uBZ1Ald7tWmcglajKazigAeOHlqSDrs5qcvC7fXW35nTaidqlF9UcqJcuU aUI/cNPLuu1cvO8+Uw4hyaDLHHoWftP9cfC23AmZKN1KpXeTWOOKDuIW4LrZ/RrUQULMbj sLciTGIgv4Mx5ZBtKqIDWa5Kw8jIBN7rcAUHjSQr5VGty9jucqYQFCInv+O1zDUem7OyD2 VsWg7uoklnJ7Ig6iXwrHogSJv0suT8iDZz6K5iAfo4mNTJTddY7DUQqIMdd8Jg== 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 , mwojtas@chromium.org Subject: [PATCH net-next v9 08/13] netlink: specs: add ethnl PHY_GET command set Date: Wed, 28 Feb 2024 12:47:22 +0100 Message-ID: <20240228114728.51861-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240228114728.51861-1-maxime.chevallier@bootlin.com> References: <20240228114728.51861-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: 1792144187807504923 X-GMAIL-MSGID: 1792144187807504923 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 --- V9: rename upstream-phy-index to upstream-index to align with the ethtool_netlink.h definition V8: No changes V7: No changes 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..6e6f6c393d01 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-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