Skip to content

Add PMD power mgmt

Liang Ma dpdk-dev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest6 patches 1 replyIn review
  2. v109 patches 36 repliesSuperseded
  3. v910 patches 10 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v810 patches0 repliesSuperseded
v410 patches44 repliesSuperseded

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ethdev: add simple power management APIdoc/guides/rel_notes/release_20_11.rst lib/librte_ethdev/rte_ethdev.c lib/librte_ethdev/rte_ethdev.h +2 more+97 -01 reply
2/6power: add PMD power management API and callbackdoc/guides/prog_guide/power_man.rst doc/guides/rel_notes/release_20_11.rst lib/librte_power/meson.build +3 more+484 -30 replies
3/6net/ixgbe: implement power management APIdrivers/net/ixgbe/ixgbe_ethdev.c drivers/net/ixgbe/ixgbe_rxtx.c drivers/net/ixgbe/ixgbe_rxtx.h+28 -00 replies
4/6net/i40e: implement power management APIdrivers/net/i40e/i40e_ethdev.c drivers/net/i40e/i40e_rxtx.c drivers/net/i40e/i40e_rxtx.h+29 -00 replies
5/6net/ice: implement power management APIdrivers/net/ice/ice_ethdev.c drivers/net/ice/ice_rxtx.c drivers/net/ice/ice_rxtx.h+29 -00 replies
6/6examples/l3fwd-power: enable PMD power mgmtdoc/guides/sample_app_ug/l3_forward_power_man.rst examples/l3fwd-power/main.c+59 -10 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchKonstantin AnanyevDavid HuntJeff GuoAndrew RybchenkoThomas Monjalon
SeriesA-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b
1/6A-b
2/6A-b A-b
3/6A-b
4/6A-b A-b
5/6A-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v11 thread

Cover letter [dpdk-dev] [PATCH v11 0/6] Add PMD power mgmt

This patchset proposes a simple API for Ethernet drivers to cause the CPU to enter a power-optimized state while waiting for packets to arrive, along with a set of generic intrinsics that facilitate that. This is achieved through cooperation with the NIC driver that will allow us to know address of wake up event, and wait for writes on it.

On IA, this is achieved through using UMONITOR/UMWAIT instructions. They are used in their raw opcode form because there is no widespread compiler support for them yet. Still, the API is made generic enough to hopefully support other architectures, if they happen to implement similar instructions.

To achieve power savings, there is a very simple mechanism
used: we're counting empty polls, and if a certain threshold is reached, we get the address of next RX ring descriptor from the NIC driver, arm the monitoring hardware, and enter a power-optimized state. We will then wake up when either a timeout happens, or a write happens (or generally whenever CPU feels like waking up - this is platform- specific), and proceed as normal. The empty poll counter is reset whenever we actually get packets, so we only go to sleep when we know nothing is going on. The mechanism is generic which can be used for any write back descriptor.

Why are we putting it into ethdev as opposed to leaving this up to the application? Our customers specifically requested a way to do it wit minimal changes to the application code. The current approach allows to just flip a switch and automatically have power savings.

- Only 1:1 core to queue mapping is supported, meaning that each lcore must at most handle RX on a single queue
- Support 3 type policies. UMWAIT/PAUSE/Frequency_Scale
- Power management is enabled per-queue
- The API doesn't extend to other device types

Liang Ma (6):
ethdev: add simple power management API
power: add PMD power management API and callback net/ixgbe: implement power management API net/i40e: implement power management API net/ice: implement power management API examples/l3fwd-power: enable PMD power mgmt

 doc/guides/prog_guide/power_man.rst           |  51 +++
 doc/guides/rel_notes/release_20_11.rst        |  17 +
 .../sample_app_ug/l3_forward_power_man.rst    |  14 +
 drivers/net/i40e/i40e_ethdev.c                |   1 +
 drivers/net/i40e/i40e_rxtx.c                  |  26 ++
 drivers/net/i40e/i40e_rxtx.h                  |   2 +
 drivers/net/ice/ice_ethdev.c                  |   1 +
 drivers/net/ice/ice_rxtx.c                    |  26 ++
 drivers/net/ice/ice_rxtx.h                    |   2 +
 drivers/net/ixgbe/ixgbe_ethdev.c              |   1 +
 drivers/net/ixgbe/ixgbe_rxtx.c                |  25 ++
 drivers/net/ixgbe/ixgbe_rxtx.h                |   2 +
 examples/l3fwd-power/main.c                   |  46 ++-
 lib/librte_ethdev/rte_ethdev.c                |  23 ++
 lib/librte_ethdev/rte_ethdev.h                |  41 +++
 lib/librte_ethdev/rte_ethdev_driver.h         |  28 ++
 lib/librte_ethdev/version.map                 |   1 +
 lib/librte_power/meson.build                  |   5 +-
 lib/librte_power/rte_power_pmd_mgmt.c         | 320 ++++++++++++++++++
 lib/librte_power/rte_power_pmd_mgmt.h         |  92 +++++
 lib/librte_power/version.map                  |   4 +
 21 files changed, 725 insertions(+), 3 deletions(-)
 create mode 100644 lib/librte_power/rte_power_pmd_mgmt.c
 create mode 100644 lib/librte_power/rte_power_pmd_mgmt.h
Signature · 1 line
2.17.1