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 0578523F26A for ; Thu, 17 Apr 2025 12:38:46 +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=1744893528; cv=none; b=bK8kMU4o3APC3mVYrbFxR6OS2/rQlG0J6iSbs0sQ+6Dy1Xbkw/65QMcv1DFFI0Tr2Ya+CuzxrDm3Wk+UrKKfAQ49YBIBZOXESvpes+BBFYZKJ8eTbBulVPepLx/5dyBfY1djO9EczZZbIcOoblymni/GqDBNiwWIMM9mk8Q8LE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744893528; c=relaxed/simple; bh=Ldi3hZNFBBq84SXBhwaBJGyT3CF7JNx+7PI3rrOqdNM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E7RwhKwCydaV5jxmM7pfT5AEunBMNapUlVZiZisKAJejaFLjBjUehfevbYKOm5lL/DT1RJXtSdYx4Qc1kGVLn0zeu7/D8wuWripjE8aBhmwySnTWw/hZprlyIk9+gN25eEazPUO1QruaVIJshNS6Zie+eyLnidVI/RuES1FiWG8= 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 1u5OVh-0006jN-3i; Thu, 17 Apr 2025 14:38:29 +0200 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 1u5OVg-000kfr-1S; Thu, 17 Apr 2025 14:38:28 +0200 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1u5OVg-005xtd-0z; Thu, 17 Apr 2025 14:38:28 +0200 Date: Thu, 17 Apr 2025 14:38:28 +0200 From: Oleksij Rempel To: Kory Maincent Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Donald Hunter , Rob Herring , Andrew Lunn , Simon Horman , Heiner Kallweit , Russell King , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , 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 v8 07/13] net: pse-pd: Add support for budget evaluation strategies Message-ID: References: <20250416-feature_poe_port_prio-v8-0-446c39dc3738@bootlin.com> <20250416-feature_poe_port_prio-v8-7-446c39dc3738@bootlin.com> 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: <20250416-feature_poe_port_prio-v8-7-446c39dc3738@bootlin.com> 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, Apr 16, 2025 at 03:44:22PM +0200, Kory Maincent wrote: > From: Kory Maincent (Dent Project) > > This patch introduces the ability to configure the PSE PI budget evaluation > strategies. Budget evaluation strategies is utilized by PSE controllers to > determine which ports to turn off first in scenarios such as power budget > exceedance. > > The pis_prio_max value is used to define the maximum priority level > supported by the controller. Both the current priority and the maximum > priority are exposed to the user through the pse_ethtool_get_status call. > > This patch add support for two mode of budget evaluation strategies. > 1. Static Method: > > This method involves distributing power based on PD classification. > It’s straightforward and stable, the PSE core keeping track of the > budget and subtracting the power requested by each PD’s class. > > Advantages: Every PD gets its promised power at any time, which > guarantees reliability. > > Disadvantages: PD classification steps are large, meaning devices > request much more power than they actually need. As a result, the power > supply may only operate at, say, 50% capacity, which is inefficient and > wastes money. > > Priority max value is matching the number of PSE PIs within the PSE. > > 2. Dynamic Method: > > To address the inefficiencies of the static method, vendors like > Microchip have introduced dynamic power budgeting, as seen in the > PD692x0 firmware. This method monitors the current consumption per port > and subtracts it from the available power budget. When the budget is > exceeded, lower-priority ports are shut down. > > Advantages: This method optimizes resource utilization, saving costs. > > Disadvantages: Low-priority devices may experience instability. > > Priority max value is set by the PSE controller driver. > > For now, budget evaluation methods are not configurable and cannot be > mixed. They are hardcoded in the PSE driver itself, as no current PSE > controller supports both methods. > > Signed-off-by: Kory Maincent (Dent Project) Reviewed-by: Oleksij Rempel Thank you! -- 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 |