DPDK  21.08.0
Enumerations | Functions
rte_power_pmd_mgmt.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <rte_common.h>
#include <rte_byteorder.h>
#include <rte_log.h>
#include <rte_power.h>
#include <rte_atomic.h>

Go to the source code of this file.

Enumerations

enum  rte_power_pmd_mgmt_type { RTE_POWER_MGMT_TYPE_MONITOR = 1, RTE_POWER_MGMT_TYPE_PAUSE, RTE_POWER_MGMT_TYPE_SCALE }
 

Functions

__rte_experimental int rte_power_ethdev_pmgmt_queue_enable (unsigned int lcore_id, uint16_t port_id, uint16_t queue_id, enum rte_power_pmd_mgmt_type mode)
 
__rte_experimental int rte_power_ethdev_pmgmt_queue_disable (unsigned int lcore_id, uint16_t port_id, uint16_t queue_id)
 

Detailed Description

RTE PMD Power Management

Definition in file rte_power_pmd_mgmt.h.

Enumeration Type Documentation

◆ rte_power_pmd_mgmt_type

PMD Power Management Type

Enumerator
RTE_POWER_MGMT_TYPE_MONITOR 

Use power-optimized monitoring to wait for incoming traffic

RTE_POWER_MGMT_TYPE_PAUSE 

Use power-optimized sleep to avoid busy polling

RTE_POWER_MGMT_TYPE_SCALE 

Use frequency scaling when traffic is low

Definition at line 29 of file rte_power_pmd_mgmt.h.

Function Documentation

◆ rte_power_ethdev_pmgmt_queue_enable()

__rte_experimental int rte_power_ethdev_pmgmt_queue_enable ( unsigned int  lcore_id,
uint16_t  port_id,
uint16_t  queue_id,
enum rte_power_pmd_mgmt_type  mode 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice.

Enable power management on a specified Ethernet device Rx queue and lcore.

Note
This function is not thread-safe.
Warning
This function must be called when all affected Ethernet queues are stopped and no Rx/Tx is in progress!
Parameters
lcore_idThe lcore the Rx queue will be polled from.
port_idThe port identifier of the Ethernet device.
queue_idThe queue identifier of the Ethernet device.
modeThe power management scheme to use for specified Rx queue.
Returns
0 on success <0 on error
Examples:
examples/l3fwd-power/main.c.

◆ rte_power_ethdev_pmgmt_queue_disable()

__rte_experimental int rte_power_ethdev_pmgmt_queue_disable ( unsigned int  lcore_id,
uint16_t  port_id,
uint16_t  queue_id 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice.

Disable power management on a specified Ethernet device Rx queue and lcore.

Note
This function is not thread-safe.
Warning
This function must be called when all affected Ethernet queues are stopped and no Rx/Tx is in progress!
Parameters
lcore_idThe lcore the Rx queue is polled from.
port_idThe port identifier of the Ethernet device.
queue_idThe queue identifier of the Ethernet device.
Returns
0 on success <0 on error
Examples:
examples/l3fwd-power/main.c.