DPDK  16.04.0
Macros | Typedefs | Functions
rte_keepalive.h File Reference
#include <rte_memory.h>

Go to the source code of this file.

Macros

#define RTE_KEEPALIVE_MAXCORES   RTE_MAX_LCORE

Typedefs

typedef void(* rte_keepalive_failure_callback_t )(void *data, const int id_core)

Functions

struct rte_keepalive * rte_keepalive_create (rte_keepalive_failure_callback_t callback, void *data)
void rte_keepalive_dispatch_pings (void *ptr_timer, void *ptr_data)
void rte_keepalive_register_core (struct rte_keepalive *keepcfg, const int id_core)
void rte_keepalive_mark_alive (struct rte_keepalive *keepcfg)

Detailed Description

DPDK RTE LCore Keepalive Monitor.

Definition in file rte_keepalive.h.

Macro Definition Documentation

#define RTE_KEEPALIVE_MAXCORES   RTE_MAX_LCORE

Number of cores to track.

Note
Must be larger than the highest core id.

Definition at line 48 of file rte_keepalive.h.

Typedef Documentation

typedef void(* rte_keepalive_failure_callback_t)(void *data, const int id_core)

Keepalive failure callback.

Receives a data pointer passed to rte_keepalive_create() and the id of the failed core.

Definition at line 57 of file rte_keepalive.h.

Function Documentation

struct rte_keepalive* rte_keepalive_create ( rte_keepalive_failure_callback_t  callback,
void *  data 
)
read

Initialise keepalive sub-system.

Parameters
callbackFunction called upon detection of a dead core.
dataData pointer to be passed to function callback.
Returns
Keepalive structure success, NULL on failure.
Examples:
l2fwd-keepalive/main.c.
void rte_keepalive_dispatch_pings ( void *  ptr_timer,
void *  ptr_data 
)

Checks & handles keepalive state of monitored cores.

Parameters
*ptr_timerTriggering timer (unused)
*ptr_dataData pointer (keepalive structure)
Examples:
l2fwd-keepalive/main.c.
void rte_keepalive_register_core ( struct rte_keepalive *  keepcfg,
const int  id_core 
)

Registers a core for keepalive checks.

Parameters
*keepcfgKeepalive structure pointer
id_coreID number of core to register.
Examples:
l2fwd-keepalive/main.c.
void rte_keepalive_mark_alive ( struct rte_keepalive *  keepcfg)

Per-core keepalive check.

Parameters
*keepcfgKeepalive structure pointer

This function needs to be called from within the main process loop of the LCore to be checked.

Examples:
l2fwd-keepalive/main.c.