History

net: pse-pd: Add support for budget evaluation strategies

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.

Kory Maincent (Dent Project) committed 1 year ago

Commit ffef61d1 parent c394e754 files · +815 −40Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/ethtool_netlink_generated.h+18−0
@@ -53,10 +53,28 @@ enum hwtstamp_source { · 52 unmodified lines
5353 * enum ethtool_pse_event - PSE event list for the PSE controller
5454 * @ETHTOOL_PSE_EVENT_OVER_CURRENT: PSE output current is too high
5555 * @ETHTOOL_PSE_EVENT_OVER_TEMP: PSE in over temperature state
56+ * @ETHTOOL_C33_PSE_EVENT_DETECTION: detection process occur on the PSE. IEEE
57+ * 802.3-2022 33.2.5 and 145.2.6 PSE detection of PDs. IEEE 802.3-202
58+ * 30.9.1.1.5 aPSEPowerDetectionStatus
59+ * @ETHTOOL_C33_PSE_EVENT_CLASSIFICATION: classification process occur on the
60+ * PSE. IEEE 802.3-2022 33.2.6 and 145.2.8 classification of PDs mutual
61+ * identification. IEEE 802.3-2022 30.9.1.1.8 aPSEPowerClassification.
62+ * @ETHTOOL_C33_PSE_EVENT_DISCONNECTION: PD has been disconnected on the PSE.
63+ * IEEE 802.3-2022 33.3.8 and 145.3.9 PD Maintain Power Signature. IEEE
64+ * 802.3-2022 33.5.1.2.9 MPS Absent. IEEE 802.3-2022 30.9.1.1.20
65+ * aPSEMPSAbsentCounter.
66+ * @ETHTOOL_PSE_EVENT_OVER_BUDGET: PSE turned off due to over budget situation
67+ * @ETHTOOL_PSE_EVENT_SW_PW_CONTROL_ERROR: PSE faced an error managing the
68+ * power control from software
5669 */
5770 enum ethtool_pse_event {
5871 ETHTOOL_PSE_EVENT_OVER_CURRENT = 1,
5972 ETHTOOL_PSE_EVENT_OVER_TEMP = 2,
73+ ETHTOOL_C33_PSE_EVENT_DETECTION = 4,
74+ ETHTOOL_C33_PSE_EVENT_CLASSIFICATION = 8,
75+ ETHTOOL_C33_PSE_EVENT_DISCONNECTION = 16,
76+ ETHTOOL_PSE_EVENT_OVER_BUDGET = 32,
77+ ETHTOOL_PSE_EVENT_SW_PW_CONTROL_ERROR = 64,
6078 };
6179
6280 enum {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t