---
name: "rte_power_ethdev_pmgmt_queue_enable"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_power_pmd_mgmt.h"
---

# rte\_power\_ethdev\_pmgmt\_queue\_enable(3)

Part of [rte\_power\_pmd\_mgmt.h(3)](/rte_power_pmd_mgmt.h/3.md).

## NAME

rte\_power\_pmd\_mgmt.h

## SYNOPSIS

`#include <stdint.h>`\
 `#include <rte_log.h>`\
 `#include <rte_power_cpufreq.h>`\

### Enumerations

enum **rte\_power\_pmd\_mgmt\_type** { **RTE\_POWER\_MGMT\_TYPE\_MONITOR** = 1, **RTE\_POWER\_MGMT\_TYPE\_PAUSE**, **RTE\_POWER\_MGMT\_TYPE\_SCALE** }\

### Functions

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)\
 int **rte\_power\_ethdev\_pmgmt\_queue\_disable** (unsigned int lcore\_id, uint16\_t port\_id, uint16\_t queue\_id)\
 void **rte\_power\_pmd\_mgmt\_set\_emptypoll\_max** (unsigned int max)\
 unsigned int **rte\_power\_pmd\_mgmt\_get\_emptypoll\_max** (void)\
 int **rte\_power\_pmd\_mgmt\_set\_pause\_duration** (unsigned int duration)\
 unsigned int **rte\_power\_pmd\_mgmt\_get\_pause\_duration** (void)\
 int **rte\_power\_pmd\_mgmt\_set\_scaling\_freq\_min** (unsigned int lcore, unsigned int min)\
 int **rte\_power\_pmd\_mgmt\_set\_scaling\_freq\_max** (unsigned int lcore, unsigned int max)\
 int **rte\_power\_pmd\_mgmt\_get\_scaling\_freq\_min** (unsigned int lcore)\
 int **rte\_power\_pmd\_mgmt\_get\_scaling\_freq\_max** (unsigned int lcore)\

## Detailed Description

RTE PMD Power Management

Definition in file **rte\_power\_pmd\_mgmt.h**.

## Enumeration Type Documentation

### enum 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* **25** *of file* **rte\_power\_pmd\_mgmt.h***.*

## Function Documentation

### 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)

*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\_id The lcore the Rx queue will be polled from.* \
 *port\_id The port identifier of the Ethernet device.* \
 *queue\_id The queue identifier of the Ethernet device.* \
 *mode The power management scheme to use for specified Rx queue.*

**Returns**

*0 on success \<0 on error*

### int rte\_power\_ethdev\_pmgmt\_queue\_disable (unsigned int lcore\_id, uint16\_t port\_id, uint16\_t queue\_id)

*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\_id The lcore the Rx queue is polled from.* \
 *port\_id The port identifier of the Ethernet device.* \
 *queue\_id The queue identifier of the Ethernet device.*

**Returns**

*0 on success \<0 on error*

### void rte\_power\_pmd\_mgmt\_set\_emptypoll\_max (unsigned int max)

*Set a emptypoll\_max to specified value. Used to specify the number of empty polls to wait before entering sleep state.*

**Parameters**

*max The value to set emptypoll\_max to.*

### unsigned int rte\_power\_pmd\_mgmt\_get\_emptypoll\_max (void)

*Get the current value of emptypoll\_max.*

**Returns**

*The current emptypoll\_max value*

### int rte\_power\_pmd\_mgmt\_set\_pause\_duration (unsigned int duration)

*Set the pause\_duration. Used to adjust the pause mode callback duration.*

**Note**

*Duration must be greater than zero.*

**Parameters**

*duration The value to set pause\_duration to.*

**Returns**

*0 on success \<0 on error*

### unsigned int rte\_power\_pmd\_mgmt\_get\_pause\_duration (void)

*Get the current value of pause\_duration.*

**Returns**

*The current pause\_duration value.*

### int rte\_power\_pmd\_mgmt\_set\_scaling\_freq\_min (unsigned int lcore, unsigned int min)

*Set the min frequency to be used for frequency scaling or zero to use defaults.*

**Note**

*Supported by: Pstate mode.*

**Parameters**

*lcore The ID of the lcore to set the min frequency for.* \
 *min The value, in KiloHertz, to set the minimum frequency to.*

**Returns**

*0 on success \<0 on error*

### int rte\_power\_pmd\_mgmt\_set\_scaling\_freq\_max (unsigned int lcore, unsigned int max)

*Set the max frequency to be used for frequency scaling or zero to use defaults.*

**Note**

*Supported by: Pstate mode.*

**Parameters**

*lcore The ID of the lcore to set the max frequency for.* \
 *max The value, in KiloHertz, to set the maximum frequency to. If 'max' is 0, it is considered 'not set'.*

**Returns**

*0 on success \<0 on error*

### int rte\_power\_pmd\_mgmt\_get\_scaling\_freq\_min (unsigned int lcore)

*Get the current configured min frequency used for frequency scaling.*

**Note**

*Supported by: Pstate mode.*

**Parameters**

*lcore The ID of the lcore to get the min frequency for.*

**Returns**

*0 if no value has been configured via the 'set' API. \>0 if a minimum frequency has been configured. Value is the minimum frequency , in KiloHertz, used for frequency scaling. \<0 on error*

### int rte\_power\_pmd\_mgmt\_get\_scaling\_freq\_max (unsigned int lcore)

*Get the current configured max frequency used for frequency scaling.*

**Note**

*Supported by: Pstate mode.*

**Parameters**

*lcore The ID of the lcore to get the max frequency for.*

**Returns**

*0 if no value has been configured via the 'set' API. \>0 if a maximum frequency has been configured. Value is the maximum frequency , in KiloHertz, used for frequency scaling. \<0 on error*

## Author

*Generated automatically by Doxygen for DPDK from the source code.*
