|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __FIB_ENTRY_SRC_H__
17 #define __FIB_ENTRY_SRC_H__
28 #define FIB_ENTRY_DBG(_e, _fmt, _args...) \
30 vlib_log_debug(fib_entry_logger, \
31 "[@%d:[%U]:%U:%U]: " _fmt, \
32 fib_entry_get_index(_e), \
35 format_fib_entry_flags, \
36 fib_entry_get_flags_i(_e), \
38 fib_entry_get_source_i(_e), \
218 #define FOR_EACH_SRC_ADDED(_entry, _src, _source, action) \
220 vec_foreach(_src, (_entry)->fe_srcs) \
222 if (_src->fes_flags & FIB_ENTRY_SRC_FLAG_ADDED) { \
223 _source = (_src)->fes_src; \
229 #define FIB_ENTRY_SRC_VFT_INVOKE(_fe, esrc, func, args) \
231 const fib_entry_src_vft_t *_vft; \
232 fib_node_index_t _fei = fib_entry_get_index(_fe); \
233 _vft = fib_entry_src_get_vft(esrc); \
235 (esrc)->fes_flags &= ~FIB_ENTRY_SRC_FLAG_STALE; \
238 _fe = fib_entry_get(_fei); \
241 #define FIB_ENTRY_SRC_VFT_INVOKE_AND_RETURN(esrc, func, args) \
243 const fib_entry_src_vft_t *_vft; \
244 _vft = fib_entry_src_get_vft(esrc); \
246 (esrc)->fes_flags &= ~FIB_ENTRY_SRC_FLAG_STALE; \
247 return (_vft->func args); \
251 #define FIB_ENTRY_SRC_VFT_EXISTS(esrc, func) \
252 (fib_entry_src_get_vft(esrc)->func != 0)
Result from a cover update/change.
u8 *(* fib_entry_src_format_t)(fib_entry_src_t *src, u8 *s)
format.
fib_entry_t * fib_entry_src_action_update(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
fib_forward_chain_type_t fib_entry_get_default_chain_type(const fib_entry_t *fib_entry)
fib_entry_src_path_add_t fesv_path_add
fib_entry_src_deinit_t fesv_deinit
fib_entry_src_get_data_t fesv_get_data
fib_entry_t * fib_entry_src_action_path_swap(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *path)
struct fib_entry_src_vft_t_ fib_entry_src_vft_t
Virtual function table each FIB entry source will register.
void fib_entry_src_adj_register(void)
fib_entry_src_cover_res_t(* fib_entry_src_cover_change_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Cover changed.
Information related to the source of a FIB entry.
void fib_entry_src_lisp_register(void)
enum fib_node_bw_reason_flag_t_ fib_node_bw_reason_flag_t
Flags enum constructed from the reaons.
int(* fib_entry_src_reactivate_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Source re-activation.
fib_entry_src_reactivate_t fesv_reactivate
const typedef dpo_id_t *(* fib_entry_src_contribute_interpose_t)(const fib_entry_src_t *src, const fib_entry_t *fib_entry)
Contribute forwarding to interpose inthe chain.
int(* fib_entry_src_activate_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Source activation.
enum fib_path_list_flags_t_ fib_path_list_flags_t
fib_entry_src_cover_change_t fesv_cover_change
void fib_entry_src_action_install(fib_entry_t *fib_entry, fib_source_t source)
void(* fib_entry_src_path_remove_t)(fib_entry_src_t *src, fib_path_list_flags_t pl_flags, const fib_route_path_t *path)
Source path remove the source is remoinvg a path.
Virtual function table each FIB entry source will register.
void(* fib_entry_src_flag_change_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry, fib_entry_flag_t new_flags)
The fib entry flags for this source are changing.
enum fib_entry_flag_t_ fib_entry_flag_t
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
fib_entry_src_flag_change_t fesv_flags_change
fib_entry_src_path_swap_t fesv_path_swap
fib_entry_src_cover_res_t fib_entry_src_action_cover_update(fib_entry_t *fib_entry, fib_entry_src_t *esrc)
void fib_entry_src_action_reactivate(fib_entry_t *fib_entry, fib_source_t source)
void(* fib_entry_src_add_t)(fib_entry_src_t *src, const fib_entry_t *entry, fib_entry_flag_t flags, dpo_proto_t proto, const dpo_id_t *dpo)
Source Add.
void(* fib_entry_src_installed_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Installed.
u8 * fib_entry_src_format(fib_entry_t *entry, fib_source_t source, u8 *s)
fib_entry_src_format_t fesv_format
fib_entry_src_cover_res_t fib_entry_src_action_cover_change(fib_entry_t *entry, fib_entry_src_t *esrc)
fib_protocol_t fib_entry_get_proto(const fib_entry_t *fib_entry)
vlib_log_class_t fib_entry_logger
Debug macro.
enum fib_entry_src_flag_t_ fib_entry_src_flag_t
struct fib_entry_src_cover_res_t_ fib_entry_src_cover_res_t
Result from a cover update/change.
void(* fib_entry_src_deactivate_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Source Deactivate.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
fib_entry_src_path_remove_t fesv_path_remove
fib_entry_src_cover_update_t fesv_cover_update
enum fib_source_behaviour_t_ fib_source_behaviour_t
Each source has a defined behaviour that controls how entries behave that have that source.
void fib_entry_src_module_init(void)
const fib_entry_src_vft_t * fib_entry_src_get_vft(const fib_entry_src_t *esrc)
Get the VFT for a given source.
fib_entry_src_t * fib_entry_src_find(const fib_entry_t *fib_entry, fib_source_t source)
void(* fib_entry_src_remove_t)(fib_entry_src_t *src)
Source Remove.
void fib_entry_src_simple_register(void)
fib_entry_src_add_t fesv_add
fib_entry_src_fwd_update_t fesv_fwd_update
void fib_entry_src_inherit(const fib_entry_t *cover, fib_entry_t *covered)
const typedef void *(* fib_entry_src_get_data_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Get source specific opaque data.
void(* fib_entry_src_path_swap_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry, fib_path_list_flags_t pl_flags, const fib_route_path_t *path)
Source path replace/swap the source is providing a new set of paths.
fib_entry_t * fib_entry_src_action_path_add(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *path)
fib_entry_src_flag_t fib_entry_src_action_remove_or_update_inherit(fib_entry_t *fib_entry, fib_source_t source)
fib_entry_src_flag_t fib_entry_src_action_path_remove(fib_entry_t *fib_entry, fib_source_t source, const fib_route_path_t *path)
void(* fib_entry_src_copy_t)(const fib_entry_src_t *orig_src, const fib_entry_t *fib_entry, fib_entry_src_t *copy_src)
The fib entry flags for this source are changing.
fib_entry_t * fib_entry_src_action_add(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
void(* fib_entry_src_path_add_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry, fib_path_list_flags_t pl_flags, const fib_route_path_t *path)
Source path add the source is adding a new path.
void fib_entry_src_rr_register(void)
void fib_entry_src_behaviour_register(fib_source_behaviour_t source, const fib_entry_src_vft_t *vft)
fib_forward_chain_type_t fib_entry_chain_type_fixup(const fib_entry_t *entry, fib_forward_chain_type_t fct)
Turn the chain type requested by the client into the one they really wanted.
fib_path_list_flags_t fib_entry_src_flags_2_path_list_flags(fib_entry_flag_t eflags)
A representation of a path as described by a route producer.
fib_source_t fib_entry_get_source_i(const fib_entry_t *fib_entry)
fib_entry_src_installed_t fesv_installed
fib_entry_src_remove_t fesv_remove
fib_entry_src_deactivate_t fesv_deactivate
void fib_entry_src_action_activate(fib_entry_t *fib_entry, fib_source_t source)
fib_node_bw_reason_flag_t bw_reason
void fib_entry_src_interpose_register(void)
void(* fib_entry_src_fwd_update_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry, fib_source_t best_source)
Forwarding updated.
fib_entry_flag_t fib_entry_get_flags_i(const fib_entry_t *fib_entry)
fib_entry_src_init_t fesv_init
void(* fib_entry_src_init_t)(fib_entry_src_t *src)
Source initialisation Function.
void fib_entry_src_mk_lb(fib_entry_t *fib_entry, fib_source_t source, fib_forward_chain_type_t fct, dpo_id_t *dpo_lb)
fib_entry_t * fib_entry_src_action_installed(fib_entry_t *fib_entry, fib_source_t source)
fib_entry_src_activate_t fesv_activate
void(* fib_entry_src_set_data_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry, const void *data)
Set source specific opaque data.
fib_entry_src_cover_res_t(* fib_entry_src_cover_update_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Cover updated.
fib_entry_src_copy_t fesv_copy
enum fib_source_t_ fib_source_t
The different sources that can create a route.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
void fib_entry_source_change(fib_entry_t *fib_entry, fib_source_t old_source, fib_source_t new_source)
void fib_entry_src_api_register(void)
void fib_entry_src_action_deactivate(fib_entry_t *fib_entry, fib_source_t source)
void fib_entry_src_action_uninstall(fib_entry_t *fib_entry)
void fib_entry_src_drop_register(void)
fib_entry_src_flag_t fib_entry_src_action_remove(fib_entry_t *fib_entry, fib_source_t source)
void(* fib_entry_src_deinit_t)(fib_entry_src_t *src)
Source deinitialisation Function.
dpo_proto_t fib_entry_get_dpo_proto(const fib_entry_t *fib_entry)
void fib_entry_src_interface_register(void)
void fib_entry_src_mpls_register(void)
fib_entry_src_set_data_t fesv_set_data
fib_entry_src_contribute_interpose_t fesv_contribute_interpose
void fib_entry_src_default_register(void)
vl_api_wireguard_peer_flags_t flags