Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp366700rdh; Tue, 19 Dec 2023 01:00:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1OTk52vX6dpyXtItEQMx6tl6eMdlP+PT6nSN2Rd8XW6fvItYa7WDTf8rsQ4iae/IPBHLS X-Received: by 2002:ac8:5dce:0:b0:425:9382:6534 with SMTP id e14-20020ac85dce000000b0042593826534mr16530387qtx.65.1702976439898; Tue, 19 Dec 2023 01:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702976439; cv=none; d=google.com; s=arc-20160816; b=ztsJF44X6wy/X48ZEDE86a4SFY9BXsQemeT0IB63ZrBkbOtzk++LFViMuXxba+1tiO JvfKzZT4i344kqng/oqDO0WltRkEL+Br1jK3NfsX3JOzdV5Ryqb0fwTuzLu/77RU2NY+ 91IP1U+wIaY2gL1mDjD1YWV11mqXuuVNs1lFgDGz5jl10alCqN+nIohxZQWCziRdy2kn nmEEmCwKJyq85zt2shDiOS4xeaLaODUxfIsoYaadj50XWqsPae6+HH4pPsF0rxSfD+1j OM/9fy1V5COuFXpzmPqCOIYyhMeAYXTYQaVin8UCxwORIdZM8aM8t4TiK20BtC9WH+X8 4RWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CK/bVbAw5bhWvaOFEg1RtVl3wSk+ViVSsdH24GjSY4s=; fh=45bi2tkHiIxkR4AeeXs4jT/AokC/uWZabNA35zm/75w=; b=FPQEMTday3blZfxzAc12waaJVPnxZ+UYE0VwX9n2ycq3sRCDn2o6BuORGwGY0p4vhD iyE8kPCey2849pplsjcflgFPqj0WHK29m6ippe7dMvBkPgZNNRT6PftczzRAz7meNv4J 7E/mivzpPNSYsaIav9fAy5rPaWU+mUqDDPNSAtbvahDkfRbVvw4SzDNVMLNVtY5gdGlw w5Fgcr+ri1IkXIXoGEgLclHEn7Cp8/S6iSI+KNe0b27E+sxmbWRMdgYZkKympz5nCm0E 321W19nW8CGVykYY/8Hdip2K2B4rlW/8r0wwyeGiOzcavMsnJS5396LDc2KUfIaEGc0K Apmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IxmJVAnK; spf=pass (google.com: domain of linux-kernel+bounces-4931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ka18-20020a05622a441200b00425781d482fsi23726709qtb.134.2023.12.19.01.00.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 01:00:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4931-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=@kernel.org header.s=k20201202 header.b=IxmJVAnK; spf=pass (google.com: domain of linux-kernel+bounces-4931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 A21581C23953 for ; Tue, 19 Dec 2023 09:00:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2223212B70; Tue, 19 Dec 2023 09:00:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IxmJVAnK" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.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 5565A125B0; Tue, 19 Dec 2023 09:00:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88831C433C7; Tue, 19 Dec 2023 09:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702976427; bh=7lPJeEGRA+v+htYV42yko4yF0KBUn2IyqKKgjcCAxrI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IxmJVAnKZj+06aLhm7xhf2DPFrjWcriT2r501VOULyHpFR08ACZ7k4OeDjmewzi6I e/TDOV/63BWqsTI3luxnPvb7cnrykXZIIlvC3LmZdiuCvdtLJ8OVtHbz8EWrTvldfW VuhJ8quHz+Jo8qEP1iLmhxc845PD3edozq6bpQI5uIXoCxmzL6srDblkkPnYu7esfi qrKMHjfJJlGGPLHUQn5KWFL1WK2xkKg6Kb//htWNFPZ21agunQ70bfeJ2jQJobv2Q7 I/Ojsi0B6wKPfjIxZEv1+N3+uLSE+buJwfVkfVa63dtRKLNuze7v5ZUEMABFX6G1pN 2COE1D2MdNaFw== Date: Tue, 19 Dec 2023 08:58:51 +0000 From: Simon Horman To: Maxime Chevallier Cc: davem@davemloft.net, 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?B?S8O2cnk=?= Maincent , Jesse Brandeburg , Jonathan Corbet , Marek =?utf-8?B?QmVow7pu?= , Piergiorgio Beruto , Oleksij Rempel , =?utf-8?Q?Nicol=C3=B2?= Veronese Subject: Re: [PATCH net-next v4 13/13] Documentation: networking: document phy_link_topology Message-ID: <20231219085851.GC811967@kernel.org> References: <20231215171237.1152563-1-maxime.chevallier@bootlin.com> <20231215171237.1152563-14-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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231215171237.1152563-14-maxime.chevallier@bootlin.com> On Fri, Dec 15, 2023 at 06:12:35PM +0100, Maxime Chevallier wrote: ... > +UAPI > +==== > + > +There exist a set of netlink commands to query the link topology from userspace, > +see ``Documentation/networking/ethtool-netlink.rst``. > + > +The whole point of having a topology representation is to assign the phyindex > +field in :c:type:`struct phy_device `. This index is reported to > +userspace using the ``ETHTOOL_MSG_PHY_GET`` ethtnl command. Performing a DUMP operation > +will result in all PHYs from all net_device being listed. The DUMP command > +accepts either a ``ETHTOOL_A_HEADER_DEV_INDEX`` or ``ETHTOOL_A_HEADER_DEV_NAME`` > +to be passed in the request to filter the DUMP to a single net_device. > + > +The retrieved index can then be passed as a request parameter using the > +``ETHTOOL_A_HEADER_PHY_INDEX`` field in the following ethnl commands : > + > +* ``ETHTOOL_MSG_STRSET_GET`` to get the stats strig set from a given PHY string > +* ``ETHTOOL_MSG_CABLE_TEST_ACT`` and ``ETHTOOL_MSG_CABLE_TEST_ACT``, to perform > + cable testing on a given PHY on the link (most likely the outermost PHY) > +* ``ETHTOOL_MSG_PSE_SET`` and ``ETHTOOL_MSG_PSE_GET`` for PHY-controlled PoE and PSE settings > +* ``ETHTOOL_MSG_PLCA_GET_CFG``, ``ETHTOOL_MSG_PLCA_SET_CFG`` and ``ETHTOOL_MSG_PLCA_GET_STATUS`` > + to set the PLCA (Physical Layer Collision Avoidance) parameters > + > +Note that the PHY index can be passed to other requests, which will silently > +ignore it if present and irrelevant. > -- > 2.43.0 >