logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rte_keepalive.h

Author

       Generated automatically by Doxygen for DPDK from the source code.

DPDK                                             Version 24.11.2                              rte_keepalive.h(3)

Detailed Description

       DPDK RTE LCore Keepalive Monitor.

       Definition in file rte_keepalive.h.

Function Documentation

structrte_keepalive*rte_keepalive_create(rte_keepalive_failure_callback_tcallback,void*data)
       Initialise keepalive sub-system.

       Parameterscallback Function called upon detection of a dead core.
           data Data pointer to be passed to function callback.

       Returns
           Keepalive structure success, NULL on failure.

   voidrte_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)

   voidrte_keepalive_register_core(structrte_keepalive*keepcfg,constintid_core)
       Registers a core for keepalive checks.

       Parameters*keepcfg Keepalive structure pointer
           id_core ID number of core to register.

   voidrte_keepalive_mark_alive(structrte_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.

   voidrte_keepalive_mark_sleep(structrte_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.

   voidrte_keepalive_register_relay_callback(structrte_keepalive*keepcfg,rte_keepalive_relay_callback_tcallback,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.

       Parameters*keepcfg Keepalive structure pointer
           callback Function called upon detection of a dead core.
           data Data pointer to be passed to function callback.

Macro Definition Documentation

#defineRTE_KEEPALIVE_MAXCORESRTE_MAX_LCORE
       Number of cores to track.

       Note
           Must be larger than the highest core id.

       Definition at line 24 of file rte_keepalive.h.

Name

       rte_keepalive.h

Synopsis

       #include <rte_config.h>
       #include <rte_memory.h>

   Macros
       #define RTE_KEEPALIVE_MAXCORES   RTE_MAX_LCORE

   Typedefstypedef 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)

Typedef Documentation

typedefvoid(*rte_keepalive_failure_callback_t)(void*data,constintid_core)
       Keepalive failure callback.

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

       Parametersdata Data pointer passed to rte_keepalive_create()id_core ID of the core that has failed

       Definition at line 45 of file rte_keepalive.h.

   typedefvoid(*rte_keepalive_relay_callback_t)(void*data,constintid_core,enumrte_keepalive_statecore_state,uint64_tlast_seen)
       Keepalive relay callback.

       Receives a data pointer passed to rte_keepalive_register_relay_callback(), the id of the core for which
       state is to be forwarded, and details of the current core state.

       Parametersdata Data pointer passed to rte_keepalive_register_relay_callback()id_core ID of the core for which state is being reported
           core_state The current state of the core
           last_seen Timestamp of when core was last seen alive

       Definition at line 60 of file rte_keepalive.h.

See Also