API Reference Manual  1.45.1
odp_debug.c

This example application demonstrates the usage of various debug print functions of ODP API.

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2020-2022 Nokia
*/
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <getopt.h>
#include <odp_api.h>
#include <odp/helper/odph_api.h>
#define MAX_NAME_LEN 128
typedef struct test_global_t {
int system;
int shm;
int pool;
int queue;
int pktio;
int ipsec;
int timer;
int stash;
char pktio_name[MAX_NAME_LEN];
} test_global_t;
static test_global_t test_global;
static void print_usage(void)
{
printf("This example prints out debug information on various ODP objects.\n"
"Select debug functions to be called with options. All listed functions\n"
"are called when no options are given.\n"
"\n"
"OPTIONS:\n"
" -S, --system Call odp_sys_info_print() and odp_sys_config_print()\n"
" -s, --shm Create a SHM and call odp_shm_print()\n"
" -p, --pool Create various types of pools and call odp_pool_print()\n"
" -q, --queue Create various types of queues and call odp_queue_print()\n"
" -i, --interface <name> Start a packet IO interface, and call odp_pktio_print(),\n"
" odp_pktio_extra_stats_print(), etc. Uses loop interface by default.\n"
" -I, --ipsec Call odp_ipsec_print()\n"
" -t, --timer Call timer pool, timer and timeout print functions\n"
" -a, --stash Create stash and call odp_stash_print()\n"
" -h, --help Display help and exit.\n\n");
}
static int parse_options(int argc, char *argv[], test_global_t *global)
{
int opt, long_index;
char *str;
uint32_t str_len = 0;
const struct option longopts[] = {
{"system", no_argument, NULL, 'S'},
{"shm", no_argument, NULL, 's'},
{"pool", no_argument, NULL, 'p'},
{"queue", no_argument, NULL, 'q'},
{"interface", required_argument, NULL, 'i'},
{"ipsec", no_argument, NULL, 'I'},
{"timer", no_argument, NULL, 't'},
{"stash", no_argument, NULL, 'a'},
{"help", no_argument, NULL, 'h'},
{NULL, 0, NULL, 0}
};
const char *shortopts = "+Sspqi:Itah";
int ret = 0;
while (1) {
opt = getopt_long(argc, argv, shortopts, longopts, &long_index);
if (opt == -1)
break; /* No more options */
switch (opt) {
case 'S':
global->system = 1;
break;
case 's':
global->shm = 1;
break;
case 'p':
global->pool = 1;
break;
case 'q':
global->queue = 1;
break;
case 'i':
global->pktio = 1;
str = optarg;
str_len = strlen(str);
if (str_len && str_len < MAX_NAME_LEN)
strcpy(global->pktio_name, str);
break;
case 'I':
global->ipsec = 1;
break;
case 't':
global->timer = 1;
break;
case 'a':
global->stash = 1;
break;
case 'h':
default:
print_usage();
return -1;
}
}
if (global->pktio && (str_len == 0 || str_len >= MAX_NAME_LEN)) {
ODPH_ERR("Bad interface name length: %u\n", str_len);
ret = -1;
}
return ret;
}
static int shm_debug(void)
{
const char *name = "debug_shm";
shm = odp_shm_reserve(name, 8 * 1024, 64, 0);
if (shm == ODP_SHM_INVALID) {
ODPH_ERR("SHM reserve failed: %s\n", name);
return -1;
}
printf("\n");
printf("\n");
if (odp_shm_free(shm)) {
ODPH_ERR("SHM free failed: %s\n", name);
return -1;
}
return 0;
}
static int buffer_debug(odp_pool_t pool)
{
if (buf == ODP_BUFFER_INVALID) {
ODPH_ERR("Buffer alloc failed\n");
return -1;
}
printf("\n");
return 0;
}
static int packet_debug(odp_pool_t pool, int len)
{
odp_packet_t pkt = odp_packet_alloc(pool, len);
if (pkt == ODP_PACKET_INVALID) {
ODPH_ERR("Packet alloc failed\n");
return -1;
}
printf("\n");
printf("\n");
odp_packet_print_data(pkt, 0, len);
return 0;
}
static int pool_debug(void)
{
odp_pool_t pool;
const char *name;
int pkt_len = 100;
name = "debug_buffer_pool";
param.buf.num = 10;
param.buf.size = 1000;
pool = odp_pool_create(name, &param);
if (pool == ODP_POOL_INVALID) {
ODPH_ERR("Pool create failed: %s\n", name);
return -1;
}
printf("\n");
if (buffer_debug(pool))
return -1;
if (odp_pool_destroy(pool)) {
ODPH_ERR("Pool destroy failed: %s\n", name);
return -1;
}
name = "debug_packet_pool";
param.pkt.num = 10;
param.pkt.len = pkt_len;
param.pkt.max_len = 1000;
pool = odp_pool_create(name, &param);
if (pool == ODP_POOL_INVALID) {
ODPH_ERR("Pool create failed: %s\n", name);
return -1;
}
printf("\n");
if (packet_debug(pool, pkt_len))
return -1;
if (odp_pool_destroy(pool)) {
ODPH_ERR("Pool destroy failed: %s\n", name);
return -1;
}
name = "debug_tmo_pool";
param.tmo.num = 10;
pool = odp_pool_create(name, &param);
if (pool == ODP_POOL_INVALID) {
ODPH_ERR("Pool create failed: %s\n", name);
return -1;
}
printf("\n");
if (odp_pool_destroy(pool)) {
ODPH_ERR("Pool destroy failed: %s\n", name);
return -1;
}
return 0;
}
static int queue_debug(void)
{
const char *name;
int i;
int num = 3;
odp_queue_t queue[num];
name = "plain_queue";
queue[0] = odp_queue_create(name, &param);
if (queue[0] == ODP_QUEUE_INVALID) {
ODPH_ERR("Queue create failed: %s\n", name);
return -1;
}
printf("\n");
odp_queue_print(queue[0]);
name = "parallel_sched_queue";
queue[1] = odp_queue_create(name, &param);
if (queue[1] == ODP_QUEUE_INVALID) {
ODPH_ERR("Queue create failed: %s\n", name);
return -1;
}
printf("\n");
odp_queue_print(queue[1]);
name = "atomic_sched_queue";
queue[2] = odp_queue_create(name, &param);
if (queue[2] == ODP_QUEUE_INVALID) {
ODPH_ERR("Queue create failed: %s\n", name);
return -1;
}
printf("\n");
odp_queue_print(queue[2]);
printf("\n");
printf("\n");
for (i = 0; i < num; i++) {
if (odp_queue_destroy(queue[i])) {
ODPH_ERR("Queue destroy failed: %i\n", i);
return -1;
}
}
return 0;
}
static int pktio_debug(test_global_t *global)
{
odp_pool_t pool;
odp_pool_param_t pool_param;
odp_pktio_t pktio;
uint8_t mac[ODPH_ETHADDR_LEN];
int pkt_len = 100;
odp_pool_param_init(&pool_param);
pool_param.type = ODP_POOL_PACKET;
pool_param.pkt.num = 10;
pool_param.pkt.len = pkt_len;
pool = odp_pool_create("debug_pktio_pool", &pool_param);
if (pool == ODP_POOL_INVALID) {
ODPH_ERR("Pool create failed\n");
return -1;
}
pktio = odp_pktio_open(global->pktio_name, pool, NULL);
if (pktio == ODP_PKTIO_INVALID) {
ODPH_ERR("Pktio open failed\n");
return -1;
}
/* Start interface with default config */
if (odp_pktin_queue_config(pktio, NULL)) {
ODPH_ERR("Packet input queue config failed\n");
return -1;
}
if (odp_pktout_queue_config(pktio, NULL)) {
ODPH_ERR("Packet output queue config failed\n");
return -1;
}
if (odp_pktio_start(pktio)) {
ODPH_ERR("Pktio start failed\n");
return -1;
}
printf("\nWaiting link up");
/* Wait max 5 seconds for link up */
for (int i = 0; i < 25; i++) {
break;
printf(".");
fflush(NULL);
}
printf("\n\n");
printf("Packet IO\n---------\n");
printf(" index: %i\n", odp_pktio_index(pktio));
printf(" handle: 0x%" PRIx64 "\n", odp_pktio_to_u64(pktio));
if (odp_pktio_mac_addr(pktio, mac, ODPH_ETHADDR_LEN) == ODPH_ETHADDR_LEN) {
printf(" mac address: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2],
mac[3], mac[4], mac[5]);
}
printf(" input maxlen: %u\n", odp_pktin_maxlen(pktio));
printf(" output maxlen: %u\n", odp_pktout_maxlen(pktio));
printf(" promisc mode: %i\n", odp_pktio_promisc_mode(pktio));
printf(" timestamp res: %" PRIu64 " Hz\n\n", odp_pktio_ts_res(pktio));
if (odp_pktio_link_info(pktio, &info) == 0) {
printf("Link info\n---------\n");
printf(" auto neg: %i\n", info.autoneg);
printf(" duplex: %i\n", info.duplex);
printf(" media: %s\n", info.media);
printf(" pause_rx: %i\n", info.pause_rx);
printf(" pause_tx: %i\n", info.pause_tx);
printf(" speed: %u Mbit/s\n", info.speed);
printf(" status: %i\n", info.status);
}
printf("\n");
printf("\n");
if (odp_pktio_stop(pktio)) {
ODPH_ERR("Pktio stop failed\n");
return -1;
}
if (odp_pktio_close(pktio)) {
ODPH_ERR("Pktio close failed\n");
return -1;
}
if (odp_pool_destroy(pool)) {
ODPH_ERR("Pool destroy failed\n");
return -1;
}
return 0;
}
static int ipsec_debug(void)
{
printf("\n");
return 0;
}
static int timer_debug(void)
{
odp_pool_t pool;
odp_pool_param_t pool_param;
odp_timeout_t timeout;
odp_timer_pool_t timer_pool;
odp_timer_start_t start_param;
odp_timer_t timer;
odp_queue_t queue;
odp_queue_param_t queue_param;
odp_event_t event;
uint64_t tick;
uint64_t max_tmo = ODP_TIME_SEC_IN_NS;
uint64_t res = 100 * ODP_TIME_MSEC_IN_NS;
int started = 0;
odp_pool_param_init(&pool_param);
pool_param.type = ODP_POOL_TIMEOUT;
pool_param.tmo.num = 10;
pool = odp_pool_create("debug_timer", &pool_param);
if (pool == ODP_POOL_INVALID) {
ODPH_ERR("Pool create failed\n");
return -1;
}
timeout = odp_timeout_alloc(pool);
if (timeout == ODP_TIMEOUT_INVALID) {
ODPH_ERR("Timeout alloc failed\n");
return -1;
}
ODPH_ERR("Timer capa failed\n");
return -1;
}
if (timer_capa.max_tmo.max_tmo < max_tmo)
max_tmo = timer_capa.max_tmo.max_tmo;
memset(&timer_res_capa, 0, sizeof(odp_timer_res_capability_t));
timer_res_capa.max_tmo = max_tmo;
ODPH_ERR("Timer resolution capability failed\n");
return -1;
}
if (timer_res_capa.res_ns > res)
res = timer_res_capa.res_ns;
timer_param.res_ns = res;
timer_param.min_tmo = max_tmo / 10;
timer_param.max_tmo = max_tmo;
timer_param.num_timers = 10;
timer_param.clk_src = ODP_CLOCK_DEFAULT;
timer_pool = odp_timer_pool_create("debug_timer", &timer_param);
if (timer_pool == ODP_TIMER_POOL_INVALID) {
ODPH_ERR("Timer pool create failed\n");
return -1;
}
if (odp_timer_pool_start_multi(&timer_pool, 1) != 1) {
ODPH_ERR("Timer pool start failed\n");
return -1;
}
odp_queue_param_init(&queue_param);
if (timer_capa.queue_type_sched)
queue_param.type = ODP_QUEUE_TYPE_SCHED;
queue = odp_queue_create("debug_timer", &queue_param);
if (queue == ODP_QUEUE_INVALID) {
ODPH_ERR("Queue create failed.\n");
return -1;
}
printf("\n");
odp_timer_pool_print(timer_pool);
tick = odp_timer_ns_to_tick(timer_pool, max_tmo / 2);
timer = odp_timer_alloc(timer_pool, queue, (void *)(uintptr_t)0xdeadbeef);
printf("\n");
event = odp_timeout_to_event(timeout);
start_param.tick = tick;
start_param.tmo_ev = event;
if (odp_timer_start(timer, &start_param) == ODP_TIMER_SUCCESS)
started = 1;
else
ODPH_ERR("Timer start failed.\n");
printf("\n");
if (started && odp_timer_cancel(timer, &event) != ODP_TIMER_SUCCESS) {
ODPH_ERR("Timer cancel failed\n");
return -1;
} else {
timeout = odp_timeout_from_event(event);
printf("\n");
odp_timeout_free(timeout);
}
if (odp_timer_free(timer)) {
ODPH_ERR("Timer free failed\n");
return -1;
}
if (odp_queue_destroy(queue)) {
ODPH_ERR("Queue destroy failed\n");
return -1;
}
if (odp_pool_destroy(pool)) {
ODPH_ERR("Pool destroy failed\n");
return -1;
}
return 0;
}
static int stash_debug(void)
{
odp_stash_t stash;
uint32_t val = 0xdeadbeef;
param.num_obj = 10;
param.obj_size = 4;
stash = odp_stash_create("debug_stash", &param);
if (stash == ODP_STASH_INVALID) {
ODPH_ERR("Stash create failed\n");
return -1;
}
if (odp_stash_put_u32(stash, &val, 1) != 1) {
ODPH_ERR("Stash put failed\n");
return -1;
}
printf("\n");
if (odp_stash_get_u32(stash, &val, 1) != 1) {
ODPH_ERR("Stash get failed\n");
return -1;
}
if (odp_stash_destroy(stash)) {
ODPH_ERR("Stash destroy failed\n");
return -1;
}
return 0;
}
int main(int argc, char *argv[])
{
test_global_t *global = &test_global;
printf("ODP debug example\n\n");
memset(global, 0, sizeof(test_global_t));
if (argc < 2) {
/* If not arguments, run all test cases */
global->system = 1;
global->shm = 1;
global->pool = 1;
global->queue = 1;
global->pktio = 1;
global->ipsec = 1;
global->timer = 1;
global->stash = 1;
strcpy(global->pktio_name, "loop");
} else {
if (parse_options(argc, argv, global))
exit(EXIT_FAILURE);
}
if (odp_init_global(&inst, NULL, NULL)) {
ODPH_ERR("Global init failed.\n");
exit(EXIT_FAILURE);
}
ODPH_ERR("Local init failed.\n");
exit(EXIT_FAILURE);
}
/* Configure scheduler before creating any scheduled queues */
if (odp_schedule_config(NULL)) {
ODPH_ERR("Schedule config failed\n");
exit(EXIT_FAILURE);
}
if (global->system) {
printf("\n");
printf("\n");
}
if (global->shm && shm_debug()) {
ODPH_ERR("SHM debug failed.\n");
exit(EXIT_FAILURE);
}
if (global->pool && pool_debug()) {
ODPH_ERR("Pool debug failed.\n");
exit(EXIT_FAILURE);
}
if (global->queue && queue_debug()) {
ODPH_ERR("Queue debug failed.\n");
exit(EXIT_FAILURE);
}
if (global->pktio && pktio_debug(global)) {
ODPH_ERR("Packet debug failed.\n");
exit(EXIT_FAILURE);
}
if (global->ipsec && ipsec_debug()) {
ODPH_ERR("IPSEC debug failed.\n");
exit(EXIT_FAILURE);
}
if (global->timer && timer_debug()) {
ODPH_ERR("Timer debug failed.\n");
exit(EXIT_FAILURE);
}
if (global->stash && stash_debug()) {
ODPH_ERR("Stash debug failed.\n");
exit(EXIT_FAILURE);
}
if (odp_term_local()) {
ODPH_ERR("Local term failed.\n");
exit(EXIT_FAILURE);
}
if (odp_term_global(inst)) {
ODPH_ERR("Global term failed.\n");
exit(EXIT_FAILURE);
}
return 0;
}
odp_buffer_t odp_buffer_alloc(odp_pool_t pool)
Buffer alloc.
void odp_buffer_free(odp_buffer_t buf)
Buffer free.
#define ODP_BUFFER_INVALID
Invalid buffer.
void odp_buffer_print(odp_buffer_t buf)
Print buffer metadata to STDOUT.
int odp_init_local(odp_instance_t instance, odp_thread_type_t thr_type)
Thread local ODP initialization.
int odp_init_global(odp_instance_t *instance, const odp_init_t *params, const odp_platform_init_t *platform_params)
Global ODP initialization.
int odp_term_local(void)
Thread local ODP termination.
int odp_term_global(odp_instance_t instance)
Global ODP termination.
uint64_t odp_instance_t
ODP instance ID.
void odp_ipsec_print(void)
Print global IPSEC configuration info.
int odp_pktio_mac_addr(odp_pktio_t pktio, void *mac_addr, int size)
Get the default MAC address of a packet IO interface.
uint64_t odp_pktio_ts_res(odp_pktio_t pktio)
Packet IO timestamp resolution in hertz.
int odp_pktio_promisc_mode(odp_pktio_t pktio)
Determine if promiscuous mode is enabled for a packet IO interface.
int odp_pktio_close(odp_pktio_t pktio)
Close a packet IO interface.
uint32_t odp_pktin_maxlen(odp_pktio_t pktio)
Maximum frame length at packet input.
int odp_pktio_link_info(odp_pktio_t pktio, odp_pktio_link_info_t *info)
Retrieve information about packet IO link status.
uint32_t odp_pktout_maxlen(odp_pktio_t pktio)
Maximum frame length at packet output.
void odp_pktio_extra_stats_print(odp_pktio_t pktio)
Print extra statistics for a packet IO interface.
odp_pktio_t odp_pktio_open(const char *name, odp_pool_t pool, const odp_pktio_param_t *param)
Open a packet IO interface.
void odp_pktio_print(odp_pktio_t pktio)
Print pktio info to the console.
int odp_pktio_start(odp_pktio_t pktio)
Start packet receive and transmit.
#define ODP_PKTIO_INVALID
Invalid packet IO handle.
int odp_pktio_stop(odp_pktio_t pktio)
Stop packet receive and transmit.
int odp_pktio_index(odp_pktio_t pktio)
Get pktio interface index.
odp_pktio_link_status_t odp_pktio_link_status(odp_pktio_t pktio)
Determine pktio link is up or down for a packet IO interface.
uint64_t odp_pktio_to_u64(odp_pktio_t pktio)
Get printable value for an odp_pktio_t.
int odp_pktin_queue_config(odp_pktio_t pktio, const odp_pktin_queue_param_t *param)
Configure packet input queues.
int odp_pktout_queue_config(odp_pktio_t pktio, const odp_pktout_queue_param_t *param)
Configure packet output queues.
@ ODP_PKTIO_LINK_STATUS_UP
Link status is up.
void odp_packet_print_data(odp_packet_t pkt, uint32_t offset, uint32_t len)
Print packet data.
odp_packet_t odp_packet_alloc(odp_pool_t pool, uint32_t len)
Allocate a packet from a packet pool.
void odp_packet_free(odp_packet_t pkt)
Free packet.
#define ODP_PACKET_INVALID
Invalid packet.
void odp_packet_print(odp_packet_t pkt)
Print packet debug information.
odp_pool_t odp_pool_create(const char *name, const odp_pool_param_t *param)
Create a pool.
void odp_pool_param_init(odp_pool_param_t *param)
Initialize pool params.
int odp_pool_destroy(odp_pool_t pool)
Destroy a pool previously created by odp_pool_create()
void odp_pool_print(odp_pool_t pool)
Print pool info.
#define ODP_POOL_INVALID
Invalid pool.
@ ODP_POOL_TIMEOUT
Timeout pool.
@ ODP_POOL_BUFFER
Buffer pool.
@ ODP_POOL_PACKET
Packet pool.
void odp_queue_param_init(odp_queue_param_t *param)
Initialize queue params.
#define ODP_QUEUE_INVALID
Invalid queue.
void odp_queue_print_all(void)
Print debug info about all queues.
odp_queue_t odp_queue_create(const char *name, const odp_queue_param_t *param)
Queue create.
void odp_queue_print(odp_queue_t queue)
Print queue info.
int odp_queue_destroy(odp_queue_t queue)
Destroy ODP queue.
@ ODP_QUEUE_TYPE_SCHED
Scheduled queue.
@ ODP_QUEUE_TYPE_PLAIN
Plain queue.
#define ODP_SCHED_SYNC_ATOMIC
Atomic queue synchronization.
int odp_schedule_max_prio(void)
Maximum scheduling priority level.
int odp_schedule_config(const odp_schedule_config_t *config)
Global schedule configuration.
void odp_schedule_print(void)
Print debug info about scheduler.
void odp_shm_print_all(void)
Print all shared memory blocks.
int odp_shm_free(odp_shm_t shm)
Free a contiguous block of shared memory.
void odp_shm_print(odp_shm_t shm)
Print shared memory block info.
#define ODP_SHM_INVALID
Invalid shared memory block.
odp_shm_t odp_shm_reserve(const char *name, uint64_t size, uint64_t align, uint32_t flags)
Reserve a contiguous block of shared memory.
#define ODP_STASH_INVALID
Invalid stash handle.
void odp_stash_param_init(odp_stash_param_t *param)
Initialize stash params.
int odp_stash_destroy(odp_stash_t stash)
Destroy a stash.
int32_t odp_stash_put_u32(odp_stash_t stash, const uint32_t val[], int32_t num)
Put 32-bit integers into a stash.
int32_t odp_stash_get_u32(odp_stash_t stash, uint32_t val[], int32_t num)
Get 32-bit integers from a stash.
void odp_stash_print(odp_stash_t stash)
Print debug information about the stash.
odp_stash_t odp_stash_create(const char *name, const odp_stash_param_t *param)
Create a stash.
void odp_sys_info_print(void)
Print system info.
void odp_sys_config_print(void)
Print configuration.
@ ODP_THREAD_CONTROL
Control thread.
#define ODP_TIME_SEC_IN_NS
A second in nanoseconds.
void odp_time_wait_ns(uint64_t ns)
Wait the specified number of nanoseconds.
#define ODP_TIME_MSEC_IN_NS
A millisecond in nanoseconds.
void odp_timeout_free(odp_timeout_t tmo)
Timeout free.
int odp_timer_pool_start_multi(odp_timer_pool_t timer_pool[], int num)
Start timer pools.
void odp_timer_pool_print(odp_timer_pool_t timer_pool)
Print timer pool debug information.
void odp_timer_print(odp_timer_t timer)
Print timer debug information.
odp_timeout_t odp_timeout_alloc(odp_pool_t pool)
Timeout alloc.
int odp_timer_free(odp_timer_t timer)
Free a timer.
odp_timeout_t odp_timeout_from_event(odp_event_t ev)
Get timeout handle from a ODP_EVENT_TIMEOUT type event.
#define ODP_TIMER_POOL_INVALID
Invalid timer pool handle.
odp_timer_pool_t odp_timer_pool_create(const char *name, const odp_timer_pool_param_t *params)
Create a timer pool.
int odp_timer_cancel(odp_timer_t timer, odp_event_t *tmo_ev)
Cancel a timer.
int odp_timer_capability(odp_timer_clk_src_t clk_src, odp_timer_capability_t *capa)
Query timer capabilities per clock source.
uint64_t odp_timer_ns_to_tick(odp_timer_pool_t timer_pool, uint64_t ns)
Convert nanoseconds to timer ticks.
int odp_timer_start(odp_timer_t timer, const odp_timer_start_t *start_param)
Start a timer.
int odp_timer_res_capability(odp_timer_clk_src_t clk_src, odp_timer_res_capability_t *res_capa)
Timer resolution capability.
void odp_timeout_print(odp_timeout_t tmo)
Print timeout debug information.
odp_event_t odp_timeout_to_event(odp_timeout_t tmo)
Convert timeout handle to event handle.
#define ODP_TIMEOUT_INVALID
Invalid timeout handle.
odp_timer_t odp_timer_alloc(odp_timer_pool_t timer_pool, odp_queue_t queue, const void *user_ptr)
Allocate a timer.
#define ODP_CLOCK_DEFAULT
The default clock source.
void odp_timer_pool_param_init(odp_timer_pool_param_t *param)
Initialize timer pool parameters.
void odp_timer_pool_destroy(odp_timer_pool_t timer_pool)
Destroy a timer pool.
@ ODP_TIMER_SUCCESS
Timer operation succeeded.
@ ODP_TIMER_TICK_REL
Relative ticks.
The OpenDataPlane API.
Pool parameters.
uint32_t num
Number of buffers in the pool.
struct odp_pool_param_t::@122 buf
Parameters for buffer pools.
uint32_t max_len
Maximum packet length that will be allocated from the pool.
struct odp_pool_param_t::@124 tmo
Parameters for timeout pools.
uint32_t size
Minimum buffer size in bytes.
odp_pool_type_t type
Pool type.
struct odp_pool_param_t::@123 pkt
Parameters for packet pools.
uint32_t len
Minimum length of 'num' packets.
ODP Queue parameters.
odp_schedule_param_t sched
Scheduler parameters.
odp_queue_type_t type
Queue type.
odp_schedule_prio_t prio
Priority level.
odp_schedule_sync_t sync
Synchronization method.
Stash parameters.
uint32_t obj_size
Object handle size in bytes.
uint64_t num_obj
Number of object handles.
odp_timer_res_capability_t max_tmo
Maximum timeout length.
odp_bool_t queue_type_sched
Scheduled queue destination support.
Timer pool parameters.
uint64_t res_ns
Timeout resolution in nanoseconds.
uint64_t min_tmo
Minimum relative timeout in nanoseconds.
uint32_t num_timers
Number of timers in the pool.
odp_timer_clk_src_t clk_src
Clock source for timers.
uint64_t max_tmo
Maximum relative timeout in nanoseconds.
Timer resolution capability.
uint64_t max_tmo
Maximum relative timeout in nanoseconds.
uint64_t res_ns
Timeout resolution in nanoseconds.
Timer start parameters.
uint64_t tick
Expiration time in ticks.
odp_event_t tmo_ev
Timeout event.
odp_timer_tick_type_t tick_type
Tick type.