DPDK  18.11.11
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

int __rte_experimental rte_power_empty_poll_stat_init (struct ep_params **eptr, uint8_t *freq_tlb, struct ep_policy *policy)
 
void __rte_experimental rte_power_empty_poll_stat_free (void)
 
int __rte_experimental rte_power_empty_poll_stat_update (unsigned int lcore_id)
 
int __rte_experimental rte_power_poll_stat_update (unsigned int lcore_id, uint8_t nb_pkt)
 
uint64_t __rte_experimental rte_power_empty_poll_stat_fetch (unsigned int lcore_id)
 
uint64_t __rte_experimental rte_power_poll_stat_fetch (unsigned int lcore_id)
 
void __rte_experimental 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

int __rte_experimental 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.
void __rte_experimental rte_power_empty_poll_stat_free ( void  )

Free the resource hold by power management system.

Examples:
examples/l3fwd-power/main.c.
int __rte_experimental 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.
int __rte_experimental 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.
uint64_t __rte_experimental 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.
uint64_t __rte_experimental 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.
void __rte_experimental 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.