From patchwork Tue Feb 13 15:04:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 200481 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp603041dyb; Tue, 13 Feb 2024 07:13:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWxz8DVjUrzCcD5cNNO2VskzDDsrc+Gwi7xQfRE1RlhbheQnoio/pC7hujPrOG5cOUFPHXFKwWfTwyg7/iTFIuzxXlDDA== X-Google-Smtp-Source: AGHT+IFII1ziqjMZ8zHdv6b4aYJn8z6zPRl+wWA2RfScYtQ+RWUAwrUwsIGTLsecOTwTyixP7b2e X-Received: by 2002:a17:902:720b:b0:1db:2aed:786d with SMTP id ba11-20020a170902720b00b001db2aed786dmr2697689plb.29.1707837211186; Tue, 13 Feb 2024 07:13:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707837211; cv=pass; d=google.com; s=arc-20160816; b=t2t0OkH6sj0SgbgQpVVAOkgjxGvzbB5aWFPCqP0+5VnNfWmYcmOnRE1I7YwtXwu2eQ 0wjLFHVyzfOHhXRoss8EdlYntZTxi5Q+745IoEHtJYkmVNmSkvtTCiSW+tkgPoYZWmUt oboGE0hnd43z9u7vH47jt4p5JMuFoIcOyJfUPnMDKweyI0k5tyMZOeRWOxWpYPh3I4MG 7/OsojJQStCv6iHfsGggr63EdZU9RHM2UZpLhQTuRVXKgEi5bSdrv9iE2NMccJjhn9S2 5uC4pB1zYAC8lh2HcgHcZ01f1nZjdBH3RoIS/9msZXa+WPoimBzVb3/HvM2TsnBx4njZ ydwA== 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=C4RYso1bdjI1BwO/bVlMqy6V8aSjC8tPTMLgRYJlyIA=; fh=8Bh9AXv4QZHc4azJnn4Np9kTMW1VRhY1ow1Gs3lpp50=; b=IJhYkQ7UmVdS1t8CpY07FUFTQsTbOD7HqXtXkcI6Qp72xdDA+tugvHzqUV+VxWNy8B sZ/IPM/bG2GblBMXKs1AgPabJOhSP4laPUntqzE3cpaIMEchBmQFRli8oqBMxBO9TPhc sqSo/EHzcIb7P4PQRvTw4QfkUkA5j6oycZEGPHl3FEgNZ0M4EV5Ukkf9GGNZOzav8jrK 5CPEizM73109Tk9cfzEY/gY8aj/t3wJ6BrNdmqzzr3KaA8K2IZ0vdURHNHQ5PAea/UXv 822vNVhqhkoLw5bLBxtHvAQgXccjKEWunSqrWXjYxjHTc3mHQkwPAJfET4xLD9e8lHDg bhYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="Xk/WBPlP"; 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-63773-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63773-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=2; AJvYcCVi3PMeyBDgQPUJmA7s76nprXSOX5RYOOlXtq+KcRyKyzT01glIJUYne/SwnEYANGbxvWlqut2LTpuwBjshyupakFWgFw== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l3-20020a170902f68300b001d91df66e24si2139895plg.164.2024.02.13.07.13.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 07:13:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63773-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="Xk/WBPlP"; 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-63773-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63773-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 17C7F2835DE for ; Tue, 13 Feb 2024 15:09:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B683660BB3; Tue, 13 Feb 2024 15:04:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Xk/WBPlP" 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 D9D1A605C2; Tue, 13 Feb 2024 15:04:48 +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=1707836690; cv=none; b=rXPi0TwKkWbOf+yV8mPiRIFqhErNp7WyoVhI4z5f6h2k7RkmNgsSib2AgH3SKohW7OfbBhlTww/fjy45ZXRujUlLdqSPTjM9ing1Xw+ZUcRUQxE6B3L/spD4ZhFPfiMP+4TfxGIGEU8W8E3hdPEcVlwfjDLkWXDuuiSv+bB786c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707836690; c=relaxed/simple; bh=iBBewnB2kKbuDY1N2YWRJf9/pYhFwE10TTpPgZnLp+c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rBJdI0Kcmzm4d+kSauHObfWwUvPCvVWnf2oC0bHqjwtTGEOkRNEF0/5O2PQ9HBzpOWM/7gKpUcANCtqfKiPPo7A5jrYlGL82zfE6pdrJqJiT7wX7IJnj54374thWValXy1uAh7If2lxfDrsevGiKNJ9nm2+bHWAxHNTCig5tTrM= 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=Xk/WBPlP; 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 236F51BF20B; Tue, 13 Feb 2024 15:04:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707836687; 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=C4RYso1bdjI1BwO/bVlMqy6V8aSjC8tPTMLgRYJlyIA=; b=Xk/WBPlPw8lzAKb5Gh1ddKo7lnRVaTi7CkbfYmO4vxBs7qOFxRHeFbCSj3EFyI/EhtooLE mToSi8e3Axa1bFxICTxEIZKSK2An+96HaYl85QH9Su6FoEscWDNPryhC3/cK2aTNfOGbJP /3wG1w9edDtCue0NxpaCoMHAOejTLBBkzIm8X8C0ann/76schcfw384b4quJOO7TLbfF0O zA8J9pjsmVXe8SCvETmHlone3XCNP1ePMc1wHFpv9fMd++qpAzprVGSjTWA0uSQEqKnxzl s+aOoPb0X/ksp3BqdPQwZ6fqQ7uHieNGJxMws2F7HxIHr3N07KPL+RXXLsPvmA== 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 v7 08/13] netlink: specs: add ethnl PHY_GET command set Date: Tue, 13 Feb 2024 16:04:25 +0100 Message-ID: <20240213150431.1796171-9-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213150431.1796171-1-maxime.chevallier@bootlin.com> References: <20240213150431.1796171-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: 1790797111769551787 X-GMAIL-MSGID: 1790797111769551787 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 --- 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