Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp151117lqe; Thu, 4 Apr 2024 02:33:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1eSn/8ec/+PIr+6RXZ+43pyiArb0hnnoUR1wuWsAZKkmlM3MAsFfyqQQTBVPT12QtGmKHc4CEBinm80pHNlTGNNbRSY8/S1WJ/CDEWA== X-Google-Smtp-Source: AGHT+IG7JPWl+GaLQ17RxFro7vij+NQILkFBjANjnoDlbRtiWv5y2jhi9/caFBdtxgwOgtadwRKy X-Received: by 2002:a05:622a:148b:b0:434:494b:c69a with SMTP id t11-20020a05622a148b00b00434494bc69amr1754224qtx.61.1712223185252; Thu, 04 Apr 2024 02:33:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712223185; cv=pass; d=google.com; s=arc-20160816; b=dB6kKXspreFuDed/66sEhPuM67ixaBKkVuOsArjZBy4Kvhyfii5U2B9TtIwTrvaXQ4 vTsnjOU38FGUc7P/2tgo4G7ODPmE16EiLheSuKp/D5pE8cibsf5rFXgFcocyhJe/FefT 20Uf+jD586EoctLOOpHBcm2PE5burHRMn4vpo/u9CL39rgyB16CnhfEpCZIsntOHlU4A YQGl37yD/ZoYdVsChC0LMvqfeypqJTbdo1qxduieNlDs6PBb2E4ZJ5d21qwvF2w8FHp/ Admpo+xUAuKmPzUw69+ACotvpD3W9AdrjNy+mijrnLebX/DV0phajpl2r+VVf7tS9nxr LbWw== 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=Kr4agbz0ObQsvjULJruyCLfmALz7rQjKZzh6ma/EDcI=; fh=1vUu/d1GTjraph6G+ET+Z0z13QVrf6oL/IrrK9zaTF8=; b=xX6OGMfwAtdvhPzw0sUsyHng4zH5lgKX0Y74tNQMQGuuOoBRma2cqccbyx+4Mjx1LW AODduRxaKgi7/eprK6OhZ2zKZnw7mXinfgfI4mkYXFBmfnUBpiyGzbsIVBcIXPEVRy/t 81vbtSMF4jknAQU1lrsu86vHCFeUb7R0H94gulTZsUvbDkOuHYGlliMb0M/LcMcC0DLR Y0zUwytzIAmBQqSZA4f+/rCsVQrc21FhmC7iMV9XNK27wDf5qOs8GnSx4k8ADYZT1I/M MS6DrJtf2zYMWV+DUjtoVpKqjLZ2umZoOtmdauCPVjY+/X3/XOpdKnoiJIRueO+FeE+j T2tg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kaXP22mp; 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-131179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131179-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o1-20020ac85a41000000b004315fa82734si16423042qta.494.2024.04.04.02.33.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 02:33:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kaXP22mp; 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-131179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131179-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D21341C262DF for ; Thu, 4 Apr 2024 09:33:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5328F84038; Thu, 4 Apr 2024 09:30:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="kaXP22mp" 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 5886983A19; Thu, 4 Apr 2024 09:30:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712223023; cv=none; b=MXx8pAeDfz+YA5zX/gIXvFm9puPdTMsaz8cpc0fQ0Y2IpIxvEmWytewKqZrzCuUMGmQeJc/glT099vZPhKNjS0fRfPaunnrazIhTeXyLnQM05m8rLxXyOqQZok2+X7QZnOpYzcDdipIeXOen9sClQKodkHXhRZ0ub9zTyyX488c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712223023; c=relaxed/simple; bh=h2VQ4b4FKqoCaIQA8MOkjN4lkw7awR6QP5O5JsOacBQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=erYV59PI1Fp+gRu2uDfrWM+KNtP1uZshHaIR7Z5RdXdngwgQTcEFZPtEUs/seyu3IhfR+a9h0vLlTCUCH+95B6rm3qIir0ZzIbtTwOtwufcHbHSmj+2qV8upblMj8MJUCEro4/7OQS65U2J8g4pSbS9RwV+uiRFqzjIkzGEZIaY= 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=kaXP22mp; arc=none smtp.client-ip=217.70.183.198 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 8E2D2C0007; Thu, 4 Apr 2024 09:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712223019; 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=Kr4agbz0ObQsvjULJruyCLfmALz7rQjKZzh6ma/EDcI=; b=kaXP22mpx+XA85+th0nxp+JHNv3ASBD3phh2aZZJkS+5JdSKn7H5azpsLPM6MZWXIGNTzi hqrFKLdMtmPnF9a9LAhY1yypjRcxR8snjnEwKTW/cesefTyOsIOTTPjDhkNylmdyUADNqz 3I5tgDuh5/1MI9Oo2H2ampjBaLwZgj3X7IPNVrHAGN29vnsVV9pLAk1VG3n2hclHgMfE15 gcBPACIityPxRJS3jgp7SX5d5/cJeGzl88Cl2xPR26WkKPH4/HzytMy2GRmN20QnG6LeFz MgjSvKdAHfZKvdEQp3B3GeV8AY6hVKwD6ACv421NmJbLcRsk5SENHztXueT1zg== 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=20Maincent?= , Jesse Brandeburg , Jonathan Corbet , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?q?Nicol=C3=B2=20Veronese?= , Simon Horman , mwojtas@chromium.org Subject: [PATCH net-next v11 08/13] netlink: specs: add ethnl PHY_GET command set Date: Thu, 4 Apr 2024 11:29:58 +0200 Message-ID: <20240404093004.2552221-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240404093004.2552221-1-maxime.chevallier@bootlin.com> References: <20240404093004.2552221-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 Content-Transfer-Encoding: 8bit X-GND-Sasl: maxime.chevallier@bootlin.com 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 --- V11: No changes 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 -- 2.44.0