DPDK  20.05.0
Functions
rte_power_empty_poll.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <rte_common.h>
#include <rte_byteorder.h>
#include <rte_log.h>
#include <rte_string_fns.h>
#include <rte_power.h>
#include <rte_timer.h>

Go to the source code of this file.

Functions

__rte_experimental int rte_power_empty_poll_stat_init (struct ep_params **eptr, uint8_t *freq_tlb, struct ep_policy *policy)
 
__rte_experimental void rte_power_empty_poll_stat_free (void)
 
__rte_experimental int rte_power_empty_poll_stat_update (unsigned int lcore_id)
 
__rte_experimental int rte_power_poll_stat_update (unsigned int lcore_id, uint8_t nb_pkt)
 
__rte_experimental uint64_t rte_power_empty_poll_stat_fetch (unsigned int lcore_id)
 
__rte_experimental uint64_t rte_power_poll_stat_fetch (unsigned int lcore_id)
 
__rte_experimental void rte_empty_poll_detection (struct rte_timer *tim, void *arg)
 

Detailed Description

RTE Power Management

Definition in file rte_power_empty_poll.h.

Function Documentation

__rte_experimental int rte_power_empty_poll_stat_init ( struct ep_params **  eptr,
uint8_t *  freq_tlb,
struct ep_policy *  policy 
)

Initialize the power management system.

Parameters
eptrthe structure of empty poll configuration
freq_tlbthe power state/frequency mapping table
policythe initialization policy from sample app
Returns
  • 0 on success.
  • Negative on error.
Examples:
examples/l3fwd-power/main.c.
__rte_experimental void rte_power_empty_poll_stat_free ( void  )

Free the resource hold by power management system.

Examples:
examples/l3fwd-power/main.c.
__rte_experimental int rte_power_empty_poll_stat_update ( unsigned int  lcore_id)

Update specific core empty poll counter It's not thread safe.

Parameters
lcore_idlcore id
Returns
  • 0 on success.
  • Negative on error.
Examples:
examples/l3fwd-power/main.c.
__rte_experimental int rte_power_poll_stat_update ( unsigned int  lcore_id,
uint8_t  nb_pkt 
)

Update specific core valid poll counter, not thread safe.

Parameters
lcore_idlcore id.
nb_pktThe packet number of one valid poll.
Returns
  • 0 on success.
  • Negative on error.
Examples:
examples/l3fwd-power/main.c.
__rte_experimental uint64_t rte_power_empty_poll_stat_fetch ( unsigned int  lcore_id)

Fetch specific core empty poll counter.

Parameters
lcore_idlcore id
Returns
Current lcore empty poll counter value.
__rte_experimental uint64_t rte_power_poll_stat_fetch ( unsigned int  lcore_id)

Fetch specific core valid poll counter.

Parameters
lcore_idlcore id
Returns
Current lcore valid poll counter value.
__rte_experimental void rte_empty_poll_detection ( struct rte_timer tim,
void *  arg 
)

Empty poll state change detection function

Parameters
timThe timer structure
argThe customized parameter
Examples:
examples/l3fwd-power/main.c.