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 2DB773596D for ; Wed, 26 Feb 2025 06:00:31 +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=1740549634; cv=none; b=hMrrxH1b+Cpw4dlIemfHdxeFk7JWydrtwDM8JJxCoj9gqpr/U8egf5QLDBtX5q9nox31ZqinS0YngKFgxYST1QDP5fXwxMfyoan8uFd7WJi6gh9wdqbS50LRGCbUWgTRg5inxnb6jhwg/TUrv5IDynPx7lMz+qSJMzf9zYX7Cyc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740549634; c=relaxed/simple; bh=PjPKATSdaH5JbvKv2y6nDT7XIJdOyM7DRFleSS8Wdes=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ml8JRTeQ73cmCPkv59vgw2J+7MUVfeo5utyFXKtF/RqGU8DqTp741gGr8zxyIj+ZarhWgMLpVW6JIByRXb6e0Yz3kR4wC3TvtJQJ66fax34faJCtmI0OkYIiHALdEh9qaPkoETiq1UYkc5dPXbu5+Emcdt1frjfv4IySy8oc1Q8= 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 1tnASU-0004lp-1A; Wed, 26 Feb 2025 06:59: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 1tnASP-002tnR-1n; Wed, 26 Feb 2025 06:59:45 +0100 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tnASP-001SXr-1K; Wed, 26 Feb 2025 06:59:45 +0100 Date: Wed, 26 Feb 2025 06:59:45 +0100 From: Oleksij Rempel To: Jakub Kicinski Cc: Kory Maincent , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Jonathan Corbet , Donald Hunter , Rob Herring , Andrew Lunn , Simon Horman , Heiner Kallweit , Russell King , Krzysztof Kozlowski , Conor Dooley , Thomas Petazzoni , netdev@vger.kernel.org, linux-doc@vger.kernel.org, Kyle Swenson , Dent Project , kernel@pengutronix.de, Maxime Chevallier , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v5 06/12] net: pse-pd: Add support for budget evaluation strategies Message-ID: References: <20250218-feature_poe_port_prio-v5-0-3da486e5fd64@bootlin.com> <20250218-feature_poe_port_prio-v5-6-3da486e5fd64@bootlin.com> <20250220165129.6f72f51a@kernel.org> <20250224141037.1c79122b@kmaincent-XPS-13-7390> <20250224134522.1cc36aa3@kernel.org> <20250225102558.2cf3d8a5@kmaincent-XPS-13-7390> <20250225174752.5dbf65e2@kernel.org> Precedence: bulk X-Mailing-List: linux-doc@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: <20250225174752.5dbf65e2@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-doc@vger.kernel.org On Tue, Feb 25, 2025 at 05:47:52PM -0800, Jakub Kicinski wrote: > On Tue, 25 Feb 2025 10:25:58 +0100 Kory Maincent wrote: > > On Mon, 24 Feb 2025 13:45:22 -0800 > > Jakub Kicinski wrote: > > > > > > No they can't for now. Even different PSE power domains within the same PSE > > > > controller. I will make it explicit. > > > > > > Sounds like the property is placed at the wrong level of the hierarchy, > > > then. > > > > When a PSE controller appears to be able to support mixed budget strategy and > > could switch between them it will be better to have it set at the PSE power > > domain level. As the budget is per PSE power domain, its strategy should also > > be per PSE power domain. > > For now, it is simply not configurable and can't be mixed. It is hard-coded by > > the PSE driver. > > Yes, but uAPI is forever. We will have to live with those domain > attributes duplicated on each port. Presumably these port attributes > will never support a SET operation, since the set should be towards > the domain? The uAPI does not inspire confidence. If we need more > drivers to define a common API maybe a local sysfs API in the driver > will do? I tend to disagree here. The evaluation/allocation methods should be per port. At this step, we support only "hardware"(firmware)-based methods: 1. Static – Plain hardware classification-based power allocation per port. 2. Dynamic – Hardware classification with constant measurement for optimization. For some devices, the dynamic method may not work reliably enough, so we will need to switch to a fixed allocation method, which is currently not implemented but will be set via user space. This should be configurable per port. At some point, we will need to introduce LLDP-based allocation from user space. This will be managed by a daemon. For testing, here’s an example of how LLDP-based power negotiation can be analyzed: https://telecomtest.com.au/wp-content/uploads/2016/12/PDA-LLDP-Powered-Device-LLDP-Analyzer.pdf -- 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 |