From patchwork Tue Feb 20 18:42:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 203755 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp596784dyc; Tue, 20 Feb 2024 10:45:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUXmtkxSMxFNIXCZ2P64CTa9SyQA/jhraYvg7wbbAgdOvoBVkKM/fpL9uns+0KgXzo8Bg4sSNS5vjhozz5RhTZsV0La+Q== X-Google-Smtp-Source: AGHT+IFjPf1qvcau1bJPCVw85NNNyWMVTTB0Qr/PlRqC0UTIEb0tc+379dhBPbX8pdfLG277+R5J X-Received: by 2002:a05:6a20:93a9:b0:19e:c3a1:238d with SMTP id x41-20020a056a2093a900b0019ec3a1238dmr17509921pzh.52.1708454719492; Tue, 20 Feb 2024 10:45:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708454719; cv=pass; d=google.com; s=arc-20160816; b=prnQAOzsc8QOKXMtKsBi9ifYXnBh7uNljWd0XQlZj4jmbWcSBGl645vrg1A9WMSe5p CqsimqMA55cvTty7RLfYak9mQacSJ+BOXG71U/728BJcqO3GxuwAr8PiDHoCrXB1fEav 2AeRJGc5o1N1JhuaXa752U7D2vdAM/97f3C2yxN0zAiAdxkPWH/OIjByZSZy+TI4ojjD TdgJ9cY7UtfkEm3eyU1Sn0J8TOjFWCfrm66SkMp9kYodW9s85v+vOQB/2SN36UNMWxmB m3thZgAscBNTdxt3RfGEVCD0v23EtZVwxRSUqnGoQ0AfYkrORL72xbEmDKlRS4kEnoQj KB9A== 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=ESJHR9t64Brx7z//Qv8zIe9l8qbEx99zVW+3z+9sE8g=; fh=1vUu/d1GTjraph6G+ET+Z0z13QVrf6oL/IrrK9zaTF8=; b=vN4QXk6JVhmw9IUJv+wT5WqqRvJ6c48opgfu5ZJOt0ZF/Ps2P8m/8ZKZZfPx0JV7zd mifa6oqHl+oG0PwRiF8yD6t705DS7MGSc85qdDp9v/2nRbLMWsl/HGzwLp+IxTJWlE/2 RR8K1t/agqNh2LRC7BNSPcxkgpx1SdKXjnkgPrecu67C55SzOLUPwuessVTpt8lbXzs1 s7RHfdl3etptaEDabqJZG9/c2m6jS1v9Wlc/41xbs+lEGEZUbfMKC9ItOJFRw9yY27qN BKVlXpttfFKIpaziMP5xZmiZFrdTNycBCWdBsGeclLVcovdl/sgCHyRDRA3qsXP401J1 l40Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=CMDHN+6j; 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-73533-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73533-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 u16-20020a056a00099000b006e119887572si6679918pfg.383.2024.02.20.10.45.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 10:45:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73533-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=CMDHN+6j; 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-73533-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73533-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 22881281D19 for ; Tue, 20 Feb 2024 18:45:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11A5515098D; Tue, 20 Feb 2024 18:42:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="CMDHN+6j" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (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 1141D14C5B3; Tue, 20 Feb 2024 18:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708454557; cv=none; b=ByO9KaOlbNO3VsQM3b9hXzP327xzxvwwdCT/FmzSvdZFYXp34dEOM/jrNJS8rwRTVxAoRnya9plpMcYZvpoW5RFBtP0E/FemWEzLCk2BSwlgP2ZLr45sOdcTmLL5sXl+qr1A3WOcARVH6Qq31J6M9s9ilT0W/nDGd7jJFcw8J64= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708454557; c=relaxed/simple; bh=GqXz4T2pS0wc5g9lTTv0vXP5kWSghYI3TkF6G9EormA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D6VRbP3eHHbI4e/6w1ifG2J8isSFk0BRYo0hchK7Bjed0LC6FP1t5vVuAWPg/tOMGQItkya5VYKI2hp5hu2XsI1xjMT5vJvWIa/qx4Q+OEW1yV8dpfg3Nth9EK1BRHYqJvmQHlsCYSXokvgoNL97w1u8Rh8QU4yWkuLEC0BAoVg= 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=CMDHN+6j; arc=none smtp.client-ip=217.70.183.195 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 0EE7C60004; Tue, 20 Feb 2024 18:42:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708454553; 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=ESJHR9t64Brx7z//Qv8zIe9l8qbEx99zVW+3z+9sE8g=; b=CMDHN+6jfBTG5x4sUAl18BAoNRCmGCtstwgyPhET4lh8p6k5tM4yx2fSRRXuQb2gqM0oLS X2R5Nxm+E0UXqAm+y65ngNEkj5jeY6qmlD89o4brNvAiD/BMZmWI+qTgFbx+dVfjXQp7tm ctrPZznnlbRYWcInzptd9XYpE8De5dcvCcT25BqiTA6jHkEB5uVod39c0zA9ijXow6hs7l KS8bqtKVfRprlV9Df91lf5MYdaGbjWQWwjvdUrFXJNT01+Kv1+d8kwhy0qkJU3a/Gko1Wf ijwlK3WtC6XQbAeOx24qzxE+6rg7b9rb6MPC+CIF+VkrqDk8+zVF4poDHbKeag== 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 v8 08/13] netlink: specs: add ethnl PHY_GET command set Date: Tue, 20 Feb 2024 19:42:11 +0100 Message-ID: <20240220184217.3689988-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240220184217.3689988-1-maxime.chevallier@bootlin.com> References: <20240220184217.3689988-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: 1791444615756476314 X-GMAIL-MSGID: 1791444615756476314 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 --- 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..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