From patchwork Mon Mar 4 15:10:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 209576 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp1485170dyc; Mon, 4 Mar 2024 07:14:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWgX3y/VIJiFSY1gfb4Q7vCsQrNwfIXSMhGReXj2iPjI3NtQh9Z29nCDWiPqe9cLfrY1tWs/LLmgeZHxzuRxYo2zRrPpQ== X-Google-Smtp-Source: AGHT+IHcKZEhwvdil3rbg5iUCACeZEz/JWiFpG13pM2zt1EkAxkYaeHoKSYN94roko7dcmcfdF2t X-Received: by 2002:a05:6402:1ca6:b0:567:658:412 with SMTP id cz6-20020a0564021ca600b0056706580412mr4438181edb.13.1709565258877; Mon, 04 Mar 2024 07:14:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709565258; cv=pass; d=google.com; s=arc-20160816; b=tTdcOozs4vkHZ1USNHhSclsCGJtmBvaotB1x9yMJo2p3FppbfeqvgqyMrTZKNQ2yK2 h6qOs18MDuG/mgENiqkHTSK/DeXbA9GrVky7BEN17rJGpmlyu5GowTFtZNHzr11yNYD/ UtPzxRnC1TqOzXnnck0mGUz9lyHxu53J2xaKG0yJcp0aMOOX16HexC245D8j/B9QErey r35z/uVeBb3Amx47pjYIC2VQxHx1qS1Mp4k8Z4bJyuYPHCjgLrABgTanIpItSKEfCwjj YCMpjv4Q19/wLpzZNgwslcRAfbZDSznLKQ6x0QBfSLu0DQC9UC0ZGQInOGFXnBaNAvyK 49GA== 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=VJjE6LJRVPmqYJ+R0HF1dBW3fSRm9OX3+Qc/AE8R0EU=; fh=1vUu/d1GTjraph6G+ET+Z0z13QVrf6oL/IrrK9zaTF8=; b=uaXflETThKJWhLBU91sLj3b8/SgLuwdnZs/cGqb9ikVlU8Uwb6fnZBrzyA/Gsx0n48 K9A2yaz1C3LVKsWYwzAFtDfC93jFIQL1yn2uKOKz+2GzKa7InVsHvpNepd9IB++5zTC7 LP2r5gOo6zASnALLwIYHeNz/4PkgXZCk7g0X6vJY4L5iga0eshQIcO7EMQsF4pt76t8V sQN348ZPbuq+5DXOFzQ/0Fmg0klESwOqMP29mXO9pD4RqTJZprPgoAdYLrBcSZLLacPC xfhQewxddtoq4Oh4MBiITmQ1qIPMsyjd9Aw74hMw9fSLftquDwLP1YKKdt2D/hikIG0W 4coA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=fLC8FCYX; 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-90786-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90786-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 z29-20020a50cd1d000000b005671b50293esi1649582edi.620.2024.03.04.07.14.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 07:14:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90786-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=fLC8FCYX; 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-90786-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90786-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 6E2591F2319B for ; Mon, 4 Mar 2024 15:14:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8342C47A79; Mon, 4 Mar 2024 15:10:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="fLC8FCYX" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 A02D347A74; Mon, 4 Mar 2024 15:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709565028; cv=none; b=hPQUMfDx9vR0ufwyJiNLzZF0EI+neLMqQPN43klvY115rgbbNRnZ50+RVssXlYhUbpW4r5D+2wJB+ymzd81xOTJ8FD/dQRLl2+1f9ukFZs9ycJdtY+amSzVIt808Y/WhmyeY9EsW/ZOY0+aaVDPXBjF+uHx/52lhkEBc1YLBBS0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709565028; c=relaxed/simple; bh=48uR+uTWUbOCP5/KOB5WdmOWyOrfHiyIP9wF4ebqgzY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oki8IDcpa6YO26b7yLcJiN0OXEcgFWpvlBziMyY5UVRvKEaYK/I+Oqz4W3vDE4/+yRpbrptl4vjvrAXvkUehieZw2Froid1C7gK+hT/iPVjTWX5oUX+slPI8GzlCHzCSXx2HYkCaLbQbnYEPznj3wSZPkhW/neB/n0gah2tZPIo= 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=fLC8FCYX; arc=none smtp.client-ip=217.70.183.201 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 2015A1BF20B; Mon, 4 Mar 2024 15:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709565025; 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=VJjE6LJRVPmqYJ+R0HF1dBW3fSRm9OX3+Qc/AE8R0EU=; b=fLC8FCYXkqM084U+hiFedMQCk85UHEdLnEgwWedvaaHkCxO7FXJCckZAwQP8tUhKj/3tRI S4nOQK1GCGAcqkm4y0GbNcUX9/2/P8tHFjjEkb8RH8jHhy4MaHXQ5Eu2kNjykQh2nV7LqG /8YLWRt2ayFK6fwDPxuHqduzh5rAXTZ4/keOavHnoRYvxFPsab7Mj8Nzu8ePQmvwrDESaa +QghcxMu/dN3VDTEq4MF6mC/kopVGbtLe66pJnbsEodQql13ESLz0GO0/yV0k5C5JyoT5u NpozeULmXGB50KJQVuoGONVmvy47Jcus8R6SPP+Zehadcfip4FQfHpwWtqR0BA== 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 v10 08/13] netlink: specs: add ethnl PHY_GET command set Date: Mon, 4 Mar 2024 16:10:04 +0100 Message-ID: <20240304151011.1610175-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240304151011.1610175-1-maxime.chevallier@bootlin.com> References: <20240304151011.1610175-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: 1792609100838908285 X-GMAIL-MSGID: 1792609100838908285 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 --- V10: rename upstream-phy-index in the phy-get-op definition 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..58a38a8cace6 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-index + - upstream-sfp-name + - downstream-sfp-name + - id + dump: *phy-get-op