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 C0C30211F for ; Thu, 22 May 2025 08:26:25 +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=1747902387; cv=none; b=bBRPOWQIiR3QcQilfI6kUyPF8zqttcMUApJRNDZfCJPYmKNoswfspkmtYxWn/UMSYBlxx/vIWBiS6v5TrEwETAnl8mULV726nczAYSSyO6GLDEEbOnKiY2nzaCD+jAyaQwFhYfqe61ZpfF2VTROFRPmkWTv2BuZnb+wgRDvJrdY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747902387; c=relaxed/simple; bh=n+5XOZJO39DicMLZfH4LEibGAtaPq4lPmMHF/KL0+f4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lKqoZWxYIGfeZvO7Xk2W9SJtdxMIH9VkaPmx5lsvSSA/16zdXncy6RnFKS4DTxzd69zJPLXeBghZK44Wg4/7BfCCYnwWnVlsLq2gPArZUhZVa/PEf7kYxwFjlvL5r+p3x9tM0xdejvsouNSkOWeFxcTeQAOSeu20VYmXjLYnoHk= 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 1uI1F9-0002pc-9c; Thu, 22 May 2025 10:25:35 +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 1uI1F8-000haq-1f; Thu, 22 May 2025 10:25:34 +0200 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1uI1F8-002hyA-1F; Thu, 22 May 2025 10:25:34 +0200 Date: Thu, 22 May 2025 10:25:34 +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 v11 07/13] net: pse-pd: Add support for budget evaluation strategies Message-ID: References: <20250520-feature_poe_port_prio-v11-0-bbaf447e1b28@bootlin.com> <20250520-feature_poe_port_prio-v11-7-bbaf447e1b28@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: <20250520-feature_poe_port_prio-v11-7-bbaf447e1b28@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 Tue, May 20, 2025 at 06:11:09PM +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) Acked-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 |