devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v6 00/12] Add support for PSE budget evaluation strategy
@ 2025-03-04 10:18 Kory Maincent
  2025-03-04 10:18 ` [PATCH net-next v6 01/12] net: ethtool: Add support for ethnl_info_init_ntf helper function Kory Maincent
                   ` (11 more replies)
  0 siblings, 12 replies; 36+ messages in thread
From: Kory Maincent @ 2025-03-04 10:18 UTC (permalink / raw)
  To: Andrew Lunn, Oleksij Rempel, 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
  Cc: Liam Girdwood, Mark Brown, Thomas Petazzoni, netdev, linux-doc,
	Kyle Swenson, Dent Project, kernel, Maxime Chevallier, devicetree,
	linux-kernel, Kory Maincent (Dent Project), Krzysztof Kozlowski

From: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>

This series brings support for budget evaluation strategy in the PSE
subsystem. PSE controllers can set priorities to decide which ports should
be turned off in case of special events like over-current.

This patch series adds support for two budget evaluation strategy.
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.

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.

The UAPI allows adding support for software port priority mode managed from
userspace later if needed.

Patches 1-2: Add support for interrupt event report in PSE core, ethtool
	     and ethtool specs.
Patch 3: Adds support for interrupt and event report in TPS23881 driver.
Patches 4,5: Add support for PSE power domain in PSE core and ethtool.
Patches 6,7: Add support for budget evaluation strategy in PSE core,
	     ethtool and ethtool specs.
Patches 8-10: Add support for port priority and power supplies in PD692x0
	      drivers.
Patches 11,12: Add support for port priority in TPS23881 drivers.

Signed-off-by: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>
---
Changes in v6:
- Few typos.
- Use uint instead of bitset for PSE_EVENT.
- Remove report of budget evaluation strategy in the uAPI.
- Link to v5: https://lore.kernel.org/r/20250218-feature_poe_port_prio-v5-0-3da486e5fd64@bootlin.com

Changes in v5:
- Remove the first part of the patch series which tackled PSE
  improvement and already gets merged:
  https://lore.kernel.org/netdev/20250110-b4-feature_poe_arrange-v3-0-142279aedb94@bootlin.com/
- Remove the PSE index support which is useless for now. The PSE power
  domain ID is sufficient.
- Add support for PD692x0 power supplies other than Vmain which was already
  in the patch series.
- Few other small fixes.
- Link to v4: https://lore.kernel.org/r/20250103-feature_poe_port_prio-v4-0-dc91a3c0c187@bootlin.com

Changes in v4:
- Remove disconnection policy.
- Rename port priority mode to budget evaluation strategy.
- Add cosmetic changes in PSE core.
- Add support for port priority in PD692x0 driver.
- Link to v3: https://lore.kernel.org/r/20241121-feature_poe_port_prio-v3-0-83299fa6967c@bootlin.com

Changes in v3:
- Move power budget to regulator core.
- Add disconnection policies with PIs using the same priority.
- Several fixes on the TPS23881 drivers.
- Several new cosmetic patches.
- Link to v2: https://lore.kernel.org/r/20241030-feature_poe_port_prio-v2-0-9559622ee47a@bootlin.com

Changes in v2:
- Rethink the port priority management.
- Add PSE id.
- Add support for PSE power domains.
- Add get power budget regulator constraint.
- Link to v1: https://lore.kernel.org/r/20241002-feature_poe_port_prio-v1-0-787054f74ed5@bootlin.com

---
Kory Maincent (12):
      net: ethtool: Add support for ethnl_info_init_ntf helper function
      net: pse-pd: Add support for reporting events
      net: pse-pd: tps23881: Add support for PSE events and interrupts
      net: pse-pd: Add support for PSE power domains
      net: ethtool: Add support for new power domains index description
      net: pse-pd: Add support for budget evaluation strategies
      net: ethtool: Add PSE new budget evaluation strategy support feature
      net: pse-pd: pd692x0: Add support for PSE PI priority feature
      net: pse-pd: pd692x0: Add support for controller and manager power supplies
      dt-bindings: net: pse-pd: microchip,pd692x0: Add manager regulator supply
      net: pse-pd: tps23881: Add support for static port priority feature
      dt-bindings: net: pse-pd: ti,tps23881: Add interrupt description

 .../bindings/net/pse-pd/microchip,pd692x0.yaml     |  22 +-
 .../bindings/net/pse-pd/ti,tps23881.yaml           |   8 +
 Documentation/netlink/specs/ethtool.yaml           |  37 +
 Documentation/networking/ethtool-netlink.rst       |  49 ++
 drivers/net/mdio/fwnode_mdio.c                     |  26 +-
 drivers/net/pse-pd/pd692x0.c                       | 225 ++++++
 drivers/net/pse-pd/pse_core.c                      | 863 ++++++++++++++++++++-
 drivers/net/pse-pd/tps23881.c                      | 364 ++++++++-
 include/linux/ethtool_netlink.h                    |   9 +
 include/linux/pse-pd/pse.h                         |  72 +-
 include/uapi/linux/ethtool.h                       |  52 ++
 include/uapi/linux/ethtool_netlink_generated.h     |  12 +
 net/ethtool/netlink.c                              |   7 +-
 net/ethtool/netlink.h                              |   2 +
 net/ethtool/pse-pd.c                               |  67 ++
 15 files changed, 1763 insertions(+), 52 deletions(-)
---
base-commit: bae1b23c77b97000d99afe38cbd7fb5778a2ea6d
change-id: 20240913-feature_poe_port_prio-a51aed7332ec

Best regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2025-03-26 14:35 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04 10:18 [PATCH net-next v6 00/12] Add support for PSE budget evaluation strategy Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 01/12] net: ethtool: Add support for ethnl_info_init_ntf helper function Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 02/12] net: pse-pd: Add support for reporting events Kory Maincent
2025-03-07  1:43   ` Jakub Kicinski
2025-03-07  9:08     ` Kory Maincent
2025-03-17  9:28   ` Oleksij Rempel
2025-03-20 13:43     ` Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 03/12] net: pse-pd: tps23881: Add support for PSE events and interrupts Kory Maincent
2025-03-17  9:43   ` Oleksij Rempel
2025-03-20 14:09     ` Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 04/12] net: pse-pd: Add support for PSE power domains Kory Maincent
2025-03-17  9:59   ` Oleksij Rempel
2025-03-20 15:46     ` Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 05/12] net: ethtool: Add support for new power domains index description Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 06/12] net: pse-pd: Add support for budget evaluation strategies Kory Maincent
2025-03-07  1:46   ` Jakub Kicinski
2025-03-07  9:10     ` Kory Maincent
2025-03-17 12:40   ` Oleksij Rempel
2025-03-20 16:35     ` Kory Maincent
2025-03-24 16:39       ` Kory Maincent
2025-03-24 17:33         ` Kyle Swenson
2025-03-25  5:34           ` Oleksij Rempel
2025-03-25 15:25             ` Kory Maincent
2025-03-25 20:40               ` Kyle Swenson
2025-03-26 10:01                 ` Oleksij Rempel
2025-03-26 14:35                   ` Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 07/12] net: ethtool: Add PSE new budget evaluation strategy support feature Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 08/12] net: pse-pd: pd692x0: Add support for PSE PI priority feature Kory Maincent
2025-03-17 13:20   ` Oleksij Rempel
2025-03-20 16:36     ` Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 09/12] net: pse-pd: pd692x0: Add support for controller and manager power supplies Kory Maincent
2025-03-04 10:18 ` [PATCH net-next v6 10/12] dt-bindings: net: pse-pd: microchip,pd692x0: Add manager regulator supply Kory Maincent
2025-03-04 10:19 ` [PATCH net-next v6 11/12] net: pse-pd: tps23881: Add support for static port priority feature Kory Maincent
2025-03-17 13:33   ` Oleksij Rempel
2025-03-20 17:22     ` Kory Maincent
2025-03-04 10:19 ` [PATCH net-next v6 12/12] dt-bindings: net: pse-pd: ti,tps23881: Add interrupt description Kory Maincent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).