From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A41ECC41535 for ; Tue, 19 Dec 2023 09:00:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5470FeZrSF2vThdRE/jRHFbHw8bMUDHkCY9CDESZaOw=; b=PbKCxLAUGUBpmp Q279T6sSVk5Fry0a9X/j1tXb8Vx1D/iBW9OhbIybYQvKI46q9EUMmf6qLLcfnthnkOM+OLjZ0E73v MxMxV0F89D57QkS+DRotJx1VWgkTbvNqwMgCUhCCa1GSWAcbukQtATke46JZARNHdKw/Qn341RQ3J 4KNFBVSmqUR0z7Wzu0kI5kD49zM4W4BnH+MaFFgRpATWjYnQf2BA5fgAk3qbd4Lyn77WMdSVnkO7Z ERa8aa/C2fht6UngaHvNCL1P3VtQRRUGaMAUljskUYTQW4+fEVLAWAKR7MDWNcT0AlOee/4MLAcan IvZKfZojDWi1XfXRodoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFVxo-00DNwl-2e; Tue, 19 Dec 2023 09:00:32 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFVxm-00DNwG-0N for linux-arm-kernel@lists.infradead.org; Tue, 19 Dec 2023 09:00:31 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 7EFF5B81665; 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231215171237.1152563-14-maxime.chevallier@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231219_010030_301604_1276158D X-CRM114-Status: GOOD ( 16.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel