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 4870978F4A for ; Sun, 15 Mar 2026 15:10:24 +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=1773587425; cv=none; b=OtI8V3ldif1CX9CIaR0DAuhAa4WBvuSLNkfnBnXRZCQPkpfR9Y+6Oxir0f+Fa1Tdp5DRLSrT6Yas97KbGLS2pXe5JD0QoVur3V4/Y84Uqh/HWGK1U2lssV6HgOc/NPvNvXXJm2qF3dvrxuf4uwhUHA5K/UxvBRMaVf9xwTlrY+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773587425; c=relaxed/simple; bh=Qa1V7r4AhB22UlPVP7Mo0d/+CLYO6p016uQvDzPsgKY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BLO4sixHKbNHs2gn1/fI7bEVWN281DhpKAFMhndgdOGfRWPQLgQWxHklxPNxxiZcovpZdv9Q2cHyjRj4mbkMOC3XjgLeuzMjgdwBfQHPRL9JBJ9KaHjqXal9P2UQTrmsYraHAfRpgq4GSQ8YAmTrLlaAQa3h8TxtCWIMgqXxyeo= 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 1w1n6E-0003EN-Ou; Sun, 15 Mar 2026 16:09:50 +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 1w1n6B-000QDS-3A; Sun, 15 Mar 2026 16:09:47 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1w1n6B-00000003djm-3O4a; Sun, 15 Mar 2026 16:09:47 +0100 Date: Sun, 15 Mar 2026 16:09:47 +0100 From: Oleksij Rempel To: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: Maxime Chevallier , Andrew Lunn , Jakub Kicinski , 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-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> <7c45ebf6-0cb2-4a4c-ac12-f4f9bb59c908@lunn.ch> <42abf88e-4fbf-4966-9490-8315f118ddea@bootlin.com> <873423y27k.fsf@all.your.base.are.belong.to.us> 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 Content-Transfer-Encoding: 8bit In-Reply-To: <873423y27k.fsf@all.your.base.are.belong.to.us> 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 Hi Björn, On Fri, Mar 13, 2026 at 08:11:11PM +0100, Björn Töpel wrote: > Folks, thanks for the elaborate discussion (accidental complexity vs > essential complexity comes to mind...)! Sorry for overthinking :) > Maxime Chevallier writes: > > > Hi Andrew, > > > >>> 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). > >> > >> At the moment, we don't have a Linux model for such generators. There > >> is interest in them, but nobody has actually stepped up and proposed > >> anything. I do see there is an intersect, we need to be able to > >> represent them in the topology, and know which way they are pointing, > >> but i don't think they have a direct influence on loopback. > > > > If I'm following Oleksij, the idea would be to have on one side the > > ability to "dump" the link topology with a finer granularity so that we > > can see all the different blocks (pcs, pma, pmd, etc.), how they are > > chained together and who's driving them (MAC, PHY (+ phy_index), module, > > etc.), and on another side commands to configure loopback on them, with > > the ability to also configure traffic generators in the future, gather > > stats, etc. > > > > Another can of worms for sure, and probably too much for what Björn is > > trying to achieve. It's hard to say if this is overkill or not, there's > > interest in that for sure, but also quite a lot of work to do... > > It's great to have these discussion as input to the first (minimal!) > series, so we can extend/build on it later. > > If I try to make sense of the above discussions... > > Rough agreement on: > > - Depth/ordering should be local to a component, not global across the > whole path. ack > - Cross-component ordering comes from existing infrastructure (PHY link > topology, phy_index). ack > - The current component set (MAC/PHY/MODULE) is reasonable for a first > pass. I do not have strong opinion here. > - HW traffic generators and full topology dumps are interesting but out > of scope for now (Please? ;-)). It didn't tried to push it here. My point is - image me or may be you, will need to implement it in the next step. This components will need to cooperate and user will need to understand the relation and/or topology. The diagnostic is all about topology. > So, maybe the next steps are: > > 1. Keep the current component model (MAC/PHY/MODULE) and the > NEAR_END/FAR_END direction (naming need to change as Maxime said). Probably good to document that NEAR_END/FAR_END or local/remote is related to the viewpoint convention. Otherwise it will get confusing with components which mount in a unusual direction (embedded worlds is full of it :)) > 2. Add a depth (or order?) field to ETHTOOL_A_LOOPBACK_ENTRY as Jakub > suggested, local to each component instance. This addresses the > "multiple loopback points within one MAC" case without requiring a > global ordering. I hope it addresses what Oleksij's switch example > needs (multiple local loops at different depths within one > component) *insert that screaming emoji*. ack. I guess "depth" fits to the "viewpoint" terminology. > 3. Document the viewpoint convention clearly. ack > 4. Punt on the grand topology dump. Too much to chew. ack > 5. Don't worry about DSA CPU ports - they don't have a netif, so > loopback doesn't apply there today. If someone adds netifs for CPU > ports later, depth handles it. ack > TL;DR: Add depth, document the viewpoint convention, and ship > it^W^Winterate. > > Did I get that right? I'm ok with it, but maintainers will have the last word. Best Regards, Oleksij -- 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 |