Sponsor:

Your company here, and a link to your site. Click to find out more.

rte_cycles.h - Man Page

Synopsis

#include <stdint.h>
#include <rte_debug.h>
#include <rte_atomic.h>

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)
static void rte_delay_ms (unsigned ms)
void rte_delay_us_block (unsigned int us)
void rte_delay_us_sleep (unsigned int us)
void rte_delay_us_callback_register (void(*userfunc)(unsigned int))

Variables

void(* rte_delay_us )(unsigned int us)

Detailed Description

Simple Time Reference Functions (Cycles and HPET).

Definition in file rte_cycles.h.

Function Documentation

uint64_t rte_get_tsc_hz (void)

Get the measured frequency of the RDTSC counter

Returns

The TSC frequency for this lcore

static uint64_t rte_get_tsc_cycles (void) [inline], [static]

Return the number of TSC cycles since boot

Returns

the number of cycles

static uint64_t rte_get_timer_cycles (void) [inline], [static]

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

Returns

The number of cycles

Definition at line 93 of file rte_cycles.h.

static uint64_t rte_get_timer_hz (void) [inline], [static]

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

Returns

The number of cycles in one second.

Definition at line 115 of file rte_cycles.h.

static void rte_delay_ms (unsigned ms) [inline], [static]

Wait at least ms milliseconds.

Parameters

ms The number of milliseconds to wait.

Definition at line 147 of file rte_cycles.h.

void rte_delay_us_block (unsigned int us)

Blocking delay function.

Parameters

us Number of microseconds to wait.

void rte_delay_us_sleep (unsigned int us)

Delay function that uses system sleep. Does not block the CPU core.

Parameters

us Number of microseconds to wait.

void rte_delay_us_callback_register (void(*)(unsigned int) userfunc)

Replace rte_delay_us with user defined function.

Parameters

userfunc User function which replaces rte_delay_us. rte_delay_us_block restores builtin block delay function.

Variable Documentation

void(* rte_delay_us) (unsigned int us) (unsigned int us) [extern]

Wait at least us microseconds. This function can be replaced with user-defined function.

See also

rte_delay_us_callback_register

Parameters

us The number of microseconds to wait.

Author

Generated automatically by Doxygen for DPDK from the source code.

Referenced By

The man pages rte_delay_ms(3), rte_delay_us(3), rte_delay_us_block(3), rte_delay_us_callback_register(3), rte_delay_us_sleep(3), rte_get_timer_cycles(3), rte_get_timer_hz(3), rte_get_tsc_cycles(3) and rte_get_tsc_hz(3) are aliases of rte_cycles.h(3).

Version 23.11.0 DPDK