rte_keepalive.h(3)
π rte_keepalive.h π
okay so bestie, you've wandered into the manual page for rte_keepalive.h β it's part of the Library Functions Manual and it's literally the DPDK LCore keepalive monitor. no cap, this header is the whole vibe check for figuring out which cores are alive and which ones ghosted you. π«Ά
πΈ NAME πΈ
rte_keepalive.h β the header itself, that's the whole name, short and iconic
β¨ SYNOPSIS β¨
Pull it in like this, bestie:
#include <rte_config.h>
#include <rte_memory.h>
π Macros
#define RTE_KEEPALIVE_MAXCORES RTE_MAX_LCORE
π¦ Typedefs
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)
π 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)
void rte_keepalive_mark_sleep (struct rte_keepalive *keepcfg)
void rte_keepalive_register_relay_callback (struct rte_keepalive
*keepcfg, rte_keepalive_relay_callback_t callback, void *data)
π Detailed Description π
DPDK RTE LCore Keepalive Monitor. that's it, that's the energy. π
Defined in the file rte_keepalive.h.
π Macro Definition Documentation π
#define RTE_KEEPALIVE_MAXCORES RTE_MAX_LCORE
Number of cores to track. just, like, how many besties we're keeping an eye on. π
Note β this must be larger than the highest core id. like, if your highest core id is 15 and you only track 4, that's giving chaos, and it will not slay. β οΈ
Definition at line 24 of file rte_keepalive.h.
π§ Typedef Documentation π§
typedef void(* rte_keepalive_failure_callback_t) (void *data, const int id_core)
Keepalive failure callback. this is the "uh oh, someone's not responding" alarm bell. ππ
It receives a data pointer that you passed into rte_keepalive_create() and the id of the failed core.
Parameters
dataβ Data pointer passed torte_keepalive_create()id_coreβ ID of the core that has failed
Definition at line 45 of file rte_keepalive.h.
typedef void(* rte_keepalive_relay_callback_t) (void *data, const int id_core, enum rte_keepalive_state core_state, uint64_t last_seen)
Keepalive relay callback. β¨
It receives a data pointer passed to rte_keepalive_register_relay_callback(), the id of the core whose state is being forwarded, and the deets on the current core state.
Parameters
dataβ Data pointer passed torte_keepalive_register_relay_callback()id_coreβ ID of the core for which state is being reportedcore_stateβ The current state of the corelast_seenβ Timestamp of when core was last seen alive
Definition at line 60 of file rte_keepalive.h.
π₯ Function Documentation π₯
struct rte_keepalive * rte_keepalive_create (rte_keepalive_failure_callback_t callback, void * data)
Initialise keepalive sub-system. the origin story, fr fr. π±
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. (yes bestie, it literally returns "structure success" β we said what we said π)
void rte_keepalive_dispatch_pings (void * ptr_timer, void * ptr_data)
Checks & handles keepalive state of monitored cores. this is the main-character function that does the rounds. π«
Parameters
*ptr_timerβ Triggering timer (unused)*ptr_dataβ Data pointer (keepalive structure)
void rte_keepalive_register_core (struct rte_keepalive * keepcfg, const int id_core)
Registers a core for keepalive checks. adding a bestie to the group chat, essentially. π²β¨
Parameters
*keepcfgβ Keepalive structure pointerid_coreβ ID number of core to register.
void rte_keepalive_mark_alive (struct rte_keepalive * keepcfg)
Per-core keepalive check. "hey bestie, still here!" π£
Parameters
*keepcfgβ Keepalive structure pointer
This function needs to be called from within the main process loop of the LCore to be checked. don't skip it, no cap.
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.
okay so this one matters a LOT bestie β skip it and your sleeping core gets read as gone, which is giving tragic misunderstanding. call it before you nap. ππ
void rte_keepalive_register_relay_callback (struct rte_keepalive * keepcfg, rte_keepalive_relay_callback_t callback, void * data)
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. so it's not just about the heartbreak β it's also about the flirty little "still alive" moments. π
Parameters
*keepcfgβ Keepalive structure pointercallbackβ Function called upon detection of a dead core.dataβ Data pointer to be passed to function callback.
π Author π
Generated automatically by Doxygen for DPDK from the source code. (not a human author, it's the Doxygen girlies doing their thing π€β¨)
aaaand that's the whole page, bestie. this one's from DPDK, Version 25.11.3 β mwah, go keep those cores alive, you ate. π ππ¦
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms