DPDK
25.11.0
Toggle main menu visibility
Loading...
Searching...
No Matches
rte_keepalive.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright 2015-2016 Intel Corporation.
3
*/
4
9
10
#ifndef RTE_KEEPALIVE_H
11
#define RTE_KEEPALIVE_H
12
13
#include <rte_config.h>
14
#include <
rte_memory.h
>
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
20
#ifndef RTE_KEEPALIVE_MAXCORES
24
#define RTE_KEEPALIVE_MAXCORES RTE_MAX_LCORE
25
#endif
26
27
enum
rte_keepalive_state {
28
RTE_KA_STATE_UNUSED = 0,
29
RTE_KA_STATE_ALIVE = 1,
30
RTE_KA_STATE_MISSING = 4,
31
RTE_KA_STATE_DEAD = 2,
32
RTE_KA_STATE_GONE = 3,
33
RTE_KA_STATE_DOZING = 5,
34
RTE_KA_STATE_SLEEP = 6
35
};
36
45
typedef
void (*
rte_keepalive_failure_callback_t
)(
46
void
*data,
47
const
int
id_core);
48
60
typedef
void (*
rte_keepalive_relay_callback_t
)(
61
void
*data,
62
const
int
id_core,
63
enum
rte_keepalive_state core_state,
64
uint64_t last_seen
65
);
66
71
struct
rte_keepalive;
72
82
struct
rte_keepalive *
rte_keepalive_create
(
83
rte_keepalive_failure_callback_t
callback,
84
void
*data);
85
91
void
rte_keepalive_dispatch_pings
(
void
*ptr_timer,
void
*ptr_data);
92
100
void
rte_keepalive_register_core
(
struct
rte_keepalive *keepcfg,
101
const
int
id_core);
102
111
void
112
rte_keepalive_mark_alive
(
struct
rte_keepalive *keepcfg);
113
123
void
124
rte_keepalive_mark_sleep
(
struct
rte_keepalive *keepcfg);
125
140
void
141
rte_keepalive_register_relay_callback
(
struct
rte_keepalive *keepcfg,
142
rte_keepalive_relay_callback_t
callback,
143
void
*data);
144
145
#ifdef __cplusplus
146
}
147
#endif
148
149
#endif
/* RTE_KEEPALIVE_H */
rte_keepalive_register_relay_callback
void rte_keepalive_register_relay_callback(struct rte_keepalive *keepcfg, rte_keepalive_relay_callback_t callback, void *data)
rte_keepalive_create
struct rte_keepalive * rte_keepalive_create(rte_keepalive_failure_callback_t callback, void *data)
rte_keepalive_mark_sleep
void rte_keepalive_mark_sleep(struct rte_keepalive *keepcfg)
rte_keepalive_register_core
void rte_keepalive_register_core(struct rte_keepalive *keepcfg, const int id_core)
rte_keepalive_failure_callback_t
void(* rte_keepalive_failure_callback_t)(void *data, const int id_core)
Definition
rte_keepalive.h:45
rte_keepalive_mark_alive
void rte_keepalive_mark_alive(struct rte_keepalive *keepcfg)
rte_keepalive_dispatch_pings
void rte_keepalive_dispatch_pings(void *ptr_timer, void *ptr_data)
rte_keepalive_relay_callback_t
void(* rte_keepalive_relay_callback_t)(void *data, const int id_core, enum rte_keepalive_state core_state, uint64_t last_seen)
Definition
rte_keepalive.h:60
rte_memory.h
lib
eal
include
rte_keepalive.h
Generated by
1.17.0