Go to the source code of this file.
Detailed Description
DPDK RTE LCore Keepalive Monitor.
Definition in file rte_keepalive.h.
Macro Definition Documentation
#define RTE_KEEPALIVE_MAXCORES RTE_MAX_LCORE |
Typedef Documentation
typedef void(* rte_keepalive_failure_callback_t)(void *data, const int id_core) |
typedef void(* rte_keepalive_relay_callback_t)(void *data, const int id_core, enum rte_keepalive_state core_state, uint64_t last_seen) |
Function Documentation
Initialise keepalive sub-system.
- Parameters
-
callback | Function called upon detection of a dead core. |
data | Data pointer to be passed to function callback. |
- Returns
- Keepalive structure success, NULL on failure.
- Examples:
- 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_timer | Triggering timer (unused) |
*ptr_data | Data pointer (keepalive structure) |
- Examples:
- 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
-
*keepcfg | Keepalive structure pointer |
id_core | ID number of core to register. |
- Examples:
- examples/l2fwd-keepalive/main.c.
void rte_keepalive_mark_alive |
( |
struct rte_keepalive * |
keepcfg | ) |
|
Per-core keepalive check.
- Parameters
-
*keepcfg | Keepalive structure pointer |
This function needs to be called from within the main process loop of the LCore to be checked.
- Examples:
- examples/l2fwd-keepalive/main.c.
void rte_keepalive_mark_sleep |
( |
struct rte_keepalive * |
keepcfg | ) |
|
Per-core sleep-time indication.
- Parameters
-
*keepcfg | Keepalive structure pointer |
If CPU idling is enabled, this function needs to be called from within the main process loop of the LCore going to sleep, in order to avoid the LCore being mis-detected as dead.
Registers a 'live core' callback.
The complement of the 'dead core' callback. This is called when a core is known to be alive, and is intended for cases when an app needs to know 'liveness' beyond just knowing when a core has died.
- Parameters
-
*keepcfg | Keepalive structure pointer |
callback | Function called upon detection of a dead core. |
data | Data pointer to be passed to function callback. |
- Examples:
- examples/l2fwd-keepalive/main.c.