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 D198312DD8A for ; Wed, 8 Jan 2025 18:17:44 +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=1736360267; cv=none; b=Muv75MB5C08h6z+q85mlxNvRbmdMg8wKKJDz6tMhO7Qa2gEN/+PvCQliPoofmNZPGJ3n/YMQmekHIpQjIfdSZ3Z67ljij/f4a2A7um/GrLS3RP4+ZlUxqaASoDI8rUPgqV44BeKVLZSOG8/jgYlT+wex8NbXNZz2bz92zN88dA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736360267; c=relaxed/simple; bh=/DP6qXa8MJGO3By8U30HdxZN1bltT/+/6lqG29HW7KM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TxpcfYIgLyjGpofC3ZKTuOXvBPkUXNWP/M8Q3eCs7ivHbYdOJxE58PhafFVTo7AhMw/O5rEibYMfuCK7GVNO1R4iWGwDCfO0dAkhwvPEl7NZXJoCn3h3SLdwkT65g3ppY9HhBsmVIrrg7AczHAiVkwRO17e2G8lx4BMtCume85I= 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 1tVacV-0000V1-D4; Wed, 08 Jan 2025 19:17:31 +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 1tVacR-007Z4x-1Q; Wed, 08 Jan 2025 19:17:28 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tVacS-00BauR-0H; Wed, 08 Jan 2025 19:17:28 +0100 Date: Wed, 8 Jan 2025 19:17:28 +0100 From: Oleksij Rempel To: Jakub Kicinski Cc: Kory Maincent , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Donald Hunter , Jonathan Corbet , Liam Girdwood , Mark Brown , Thomas Petazzoni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, Kyle Swenson , Dent Project , kernel@pengutronix.de, Maxime Chevallier Subject: Re: [PATCH net-next 11/14] net: pse-pd: Add support for PSE device index Message-ID: References: <20250104-b4-feature_poe_arrange-v1-0-92f804bd74ed@bootlin.com> <20250104-b4-feature_poe_arrange-v1-11-92f804bd74ed@bootlin.com> <20250107171834.6e688a6b@kernel.org> <20250108094201.63463180@kernel.org> 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=utf-8 Content-Disposition: inline In-Reply-To: <20250108094201.63463180@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: linux-kernel@vger.kernel.org On Wed, Jan 08, 2025 at 09:42:01AM -0800, Jakub Kicinski wrote: > On Wed, 8 Jan 2025 06:47:10 +0100 Oleksij Rempel wrote: > > On Tue, Jan 07, 2025 at 05:18:34PM -0800, Jakub Kicinski wrote: > > > On Sat, 04 Jan 2025 23:27:36 +0100 Kory Maincent wrote: > > > > From: Kory Maincent (Dent Project) > > > > > > > > Add support for a PSE device index to report the PSE controller index to > > > > the user through ethtool. This will be useful for future support of power > > > > domains and port priority management. > > > > > > Can you say more? How do the PSE controllers relate to netdevs? > > > ethtool is primarily driven by netdev / ifindex. > > > If you're starting to build your own object hierarchy you may be > > > better off with a separate genl family. > > > > I hope this schema may help to explain the topology: > > > > +--- netdev / ifindex 0 > > +--- PSE power domain 0 --+--- netdev / ifindex 1 > > | +--- netdev / ifindex 2 > > PSE ctrl 0 -+ > > | +--- netdev / ifindex 3 > > +--- PSE power domain 1 --+--- netdev / ifindex 4 > > +--- netdev / ifindex 5 > > > > +--- netdev / ifindex 6 > > +--- PSE power domain 2 --+--- netdev / ifindex 7 > > | +--- netdev / ifindex 8 > > PSE ctrl 1 -+ > > | +--- netdev / ifindex 9 > > +--- PSE power domain 3 --+--- netdev / ifindex 10 > > +--- netdev / ifindex 11 > > > > PSE device index is needed to find actually PSE controller related to > > specific netdev / ifindex. > > Makes sense. So how does it end up looking in terms of APIs > and attributes? Will we need much more than power limits at > the domain and ctrl level? The PSE power domains are based on regulator framework. So, we will get some diagnostic and may be control API on this side. The PSE controller will need some configuration and diagnostic interfaces. For example: - not port specific configurations - not port specific diagnostics Every thing port related can be passed to the netdev -- 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 |