Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp372288lqr; Wed, 5 Jun 2024 08:26:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRfVlFvGA5aXME5rapVOdpKe9ZH8zOCZExQjgON9YI5Uql0e8ezTC0YgljZsq/MESNSZNPS25DNrEiacO853vrORAzcakUpha9djctCg== X-Google-Smtp-Source: AGHT+IGetM6cN/gLn4ji+FGybHkdy6AWHiNpVJMJkpj3poHgyfq5KPr4G5o2kZezvcFXTM0N3dwR X-Received: by 2002:aa7:888b:0:b0:6f3:eaa2:53a0 with SMTP id d2e1a72fcca58-703e59e478fmr3323930b3a.24.1717601195752; Wed, 05 Jun 2024 08:26:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717601195; cv=pass; d=google.com; s=arc-20160816; b=H3q/LJsBSDkUPxAbhPRg7ymJjT0NO+C1vU1h+k5ORJ7CUn/+AZ58RDd3cbwZkGxktU +CvsOPCZTHW7xVA1xSYXOtZuAbPVg7aZXFBMM6OHZ0ua883LAWWa0ygqpBPSAhnvMI8y qbFDoaDsdEF4Itjm8531Ni4qGIw4w0WUL0VXQXQ7a0NUK7TLzDhYOrRzAPJoAyWCDyQG IwSnuMc3qkNkeV7+s1b1f0LhD9KEeUN//jObUUPo/oaNyRRZGwvJXtsEVwIYTPigVcFX JmkX0aNFAypR1SlcWl/SSLeQUAfy9g77938cIfZJpInxZDRFZO7rbfvijfKJbFqT/BjK 65cw== 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=a+K5HZ0TX/4jhgoWeL41AioHWepkacjBGpBgmMLrFUY=; fh=Dinp91LF2KcnzfyOXGg1vCezYXJAYX+8GKPCxLQjq1Q=; b=K6cbg7VnszSJevg38cRncK5InjL+CPI9ouAFGaZgE2Zq5cogJRKax9APFlbQx4QT19 6PLGwSgGETZ3m9IdD5ZrsaA775ImiwVnQGao5xl1rHHdeI3E3TH6QjnAkxApbV84Bf1A xO3afq4zKlXQI4P74OxzdNqL5sUYKDPUAUsNZ4ZUX/R0zFemFzLIl6I4clbR2jAB7W5C fcrNw0nWcuPDP+pPew4spSL0HLLeNk/2ERDCtHpnd1EDrFQoxfFVGNcLTgaMcqfErReW QKkRh9yQpGeo3cm2KlJQiKJ8OYXCKvYWOfg1wYRjGFphVpO1lehaZBsza+O8HKpuw4FW MOYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=FsPFe1u8; 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-202650-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202650-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6cb34fabed0si6628309a12.78.2024.06.05.08.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 08:26:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202650-linux.lists.archive=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=FsPFe1u8; 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-202650-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202650-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CBF8A2977F2 for ; Wed, 5 Jun 2024 13:26:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7BDD61C2237; Wed, 5 Jun 2024 12:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="FsPFe1u8" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 BA7B71ABE21; Wed, 5 Jun 2024 12:49:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717591781; cv=none; b=htpzAbgxFlN9/1nTH8zT6He+rRb7mrUWEBzI681zGpSTYiZWHBq6AFXuhDHtu+r+m+v/AbF5MdIpCN9hPNlAxg7OoxAf6ICeqteRV2aWKBEVOwXECLFaAR0MZBzUlWiO8fNMwtHSEG0Ov2sr+OqgrFdU2Ntdxd/EjwfqWAB3l/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717591781; c=relaxed/simple; bh=MOSUved5dJTjsW/e08011rYRD+JJTkhOLjH/Asc2Jlo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qbF2iBZvSzRchYt4BqXrnKYhEi4xgBKpTUqfQquUH66dCqTjiVvGhdjAzBa9w9A796ttZ8GO4XR3sOXGse12V0x+dx3lAtSbpbSypZ/c5agfx3dJt8rs7qHFAPcpuT4NWRucxjODbQZI3DsoPkFGoa47zVKN/fFQ6pztkAvyfKA= 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=FsPFe1u8; arc=none smtp.client-ip=217.70.183.200 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 827D72000E; Wed, 5 Jun 2024 12:49:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1717591778; 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=a+K5HZ0TX/4jhgoWeL41AioHWepkacjBGpBgmMLrFUY=; b=FsPFe1u8uqoHBLcw/33gOq4bfmm1RaqnsDDxZK0Ylhjk3LSzTfsciIfF8h3mG/RKmGbgvP DM6ZtKH5dE8cu4IfjnBjXXlyvi3i6Sd+aXzvaJm/4OyeQjkVY8mCKm15rHyBYCahKbm8G3 DQLeLpoaYqiZFj3hXHsliAl8+lKAQEyHAhsLA85C+rIVPP1dq/wSyWfqSoPLeTG0MX7z7J zHDVatlNX4Zx3NKeVDIl6mpjFlPi1Ie37ACBPZQv+RpxFS+crqZhgaJz891o8YKW+qZhOh AFcP3PFjICSOzfZ1SJt+xURrr2IAENsJsd9hnBLWIMQN3cADynzc6oogLD4msw== 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 , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?q?Nicol=C3=B2=20Veronese?= , Simon Horman , mwojtas@chromium.org, Nathan Chancellor , Antoine Tenart Subject: [PATCH net-next v12 08/13] netlink: specs: add ethnl PHY_GET command set Date: Wed, 5 Jun 2024 14:49:13 +0200 Message-ID: <20240605124920.720690-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240605124920.720690-1-maxime.chevallier@bootlin.com> References: <20240605124920.720690-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 --- 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 38c2ed0da739..92a89a70ed9e 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -20,6 +20,11 @@ definitions: name: header-flags type: flags entries: [ compact-bitsets, omit-reply, stats ] + - + name: phy-upstream-type + enum-name: + type: enum + entries: [ mac, phy ] attribute-sets: - @@ -978,6 +983,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 @@ -1733,3 +1770,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.45.1