DPDK  16.07.2
Functions
rte_cycles.h File Reference
#include <stdint.h>
#include <rte_debug.h>
#include <rte_atomic.h>

Go to the source code of this file.

Functions

uint64_t rte_get_tsc_hz (void)
static uint64_t rte_get_tsc_cycles (void)
static uint64_t rte_get_timer_cycles (void)
static uint64_t rte_get_timer_hz (void)
void rte_delay_us (unsigned us)
static void rte_delay_ms (unsigned ms)

Detailed Description

Simple Time Reference Functions (Cycles and HPET).

Definition in file rte_cycles.h.

Function Documentation

uint64_t rte_get_tsc_hz ( void  )
static uint64_t rte_get_tsc_cycles ( void  )
inlinestatic

Return the number of TSC cycles since boot

Returns
the number of cycles
Examples:
ip_pipeline/init.c, and ip_pipeline/thread.c.
static uint64_t rte_get_timer_cycles ( void  )
inlinestatic

Get the number of cycles since boot from the default timer.

Returns
The number of cycles
Examples:
l2fwd-jobstats/main.c.

Definition at line 151 of file rte_cycles.h.

static uint64_t rte_get_timer_hz ( void  )
inlinestatic

Get the number of cycles in one second for the default timer.

Returns
The number of cycles in one second.
Examples:
l2fwd-jobstats/main.c, l2fwd-keepalive/main.c, l2fwd/main.c, l3fwd-power/main.c, qos_sched/init.c, and timer/main.c.

Definition at line 171 of file rte_cycles.h.

void rte_delay_us ( unsigned  us)

Wait at least us microseconds.

Parameters
usThe number of microseconds to wait.
Examples:
bond/main.c, l3fwd-power/main.c, ptpclient/ptpclient.c, tep_termination/main.c, and vhost/main.c.
static void rte_delay_ms ( unsigned  ms)
inlinestatic