From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 DB8EA35DA49 for ; Thu, 12 Mar 2026 05:05:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773291908; cv=none; b=d67yUsHYc9y8yku4MFMIPxzUtRayaOUrMfMY7l8cHzSDkgcWbMxgE4prmjTmkMRILrtwv188EXWoplZneVdjZht8m6nESqPTbyQKKp+yTP6Q2RWQz2ywyyykZYu7SBau8r+/UKX5Tm0i2utL1dThJRRO4E6oFlr0O9IcdzwmZmQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773291908; c=relaxed/simple; bh=8zELuTv51U8Qj+1Jp80UH9hJK1v4K07BgFQeM2+oZJk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JgpyV4Vpj16jKYJeKCx3iF2zhtwsS+oEKNoc654MRG+RKNuyDkaluinqGsMIkx+pkmXfB2PFpWLxJHZvvq4zcbM6t+TD5ngKqr39/Bz6WjCDE1iLL97ONga8CFvAYlsf44HUDNA0chJjgvw2RsLNpKVcgQfTe99mLMqXB6QzV+k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1w0YDu-0004bZ-Ez; Thu, 12 Mar 2026 06:04:38 +0100 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0YDq-004yCS-1n; Thu, 12 Mar 2026 06:04:35 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1w0YDr-0000000FDEl-3BLw; Thu, 12 Mar 2026 06:04:35 +0100 Date: Thu, 12 Mar 2026 06:04:35 +0100 From: Oleksij Rempel To: Jakub Kicinski Cc: Andrew Lunn , Maxime Chevallier , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , netdev@vger.kernel.org, "David S. Miller" , Andrew Lunn , Donald Hunter , Eric Dumazet , Naveen Mamindlapalli , Paolo Abeni , Simon Horman , Danielle Ratson , Hariprasad Kelam , Ido Schimmel , Kory Maincent , Leon Romanovsky , Michael Chan , Pavan Chebbi , Piergiorgio Beruto , Russell King , Saeed Mahameed , Shuah Khan , Tariq Toukan , Willem de Bruijn , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH net-next 02/11] ethtool: Add loopback netlink UAPI definitions Message-ID: References: <20260310104743.907818-1-bjorn@kernel.org> <20260310104743.907818-3-bjorn@kernel.org> <580debbb-8f6c-4b60-95ef-22c68480ded1@bootlin.com> <085bb0a9-85d3-4d62-9ac4-3461b61da5f3@bootlin.com> <438dae03-4dac-4e66-9f4d-e08b0434c9b4@lunn.ch> <20260311195052.1202174f@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260311195052.1202174f@kernel.org> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org On Wed, Mar 11, 2026 at 07:50:52PM -0700, Jakub Kicinski wrote: > On Wed, 11 Mar 2026 20:26:39 +0100 Andrew Lunn wrote: > > > For that we have what we need with phy_link_topology, as each PHY has > > > its index, we should be good to go in that regard hopefully :) > > > > So depth would be local to a component? We could have two PHY > > components, each with a different index, and depth = 0? > > > > I _think_ Jakub's depth was more at a global level? But then it would > > need to be passed down as we do the enumeration. > > Oh, sorry, I responded without reading the whole discussion :) > No, I imagined the depth would be within a single component, > so under control of a single driver (instance). The ordering > between components should be defined by PHY topology etc so > it's outside of the loopback config. As for me, it is problematic to help the user to understand the datapath depth on a switch. For example: CPU -- xMII --- MAC1 [loop] --- fabric --- MAC2 [loop] --- xMII -- PHY \----- MACx [loop] --- ... each port has two xMII loop configurations: towards the xMII or towards the fabric. From a driver perspective, a loop towards the xMII is "remote." However, from a system perspective, a "remote" loop on MAC1 is a local loop at depth=0, whereas a "local" loop on MAC2 is a local loop at depth=1. Other example would be where we have a chain of components which are attached on the system in a unexpected direction, where the MDI interface is pointing towards the main CPU, so the remote loopbacks became to local loop. One more issue is the test data generator location. The data generator is not always the CPU. We have HW generators located in components like PHYs or we may use external source (remote loopback). This is why i would prefer to have description of topology by not hard coding the perspective of view. -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |