38 #define BIER_DISP_ENTRY_ID_HLEN_SHIFT 24 55 return (bde - bier_disp_entry_pool);
104 pool_put(bier_disp_entry_pool, bde);
136 pli = bde->
bde_pl[pproto];
174 pli = &bde->
bde_pl[pproto];
210 pli = &bde->
bde_pl[pproto];
251 u32 indent = va_arg(*args,
u32);
271 s =
format(s,
"\n%UForwarding:",
273 s =
format(s,
"\n%Urpf-id:%d",
294 "bier-disp-dispatch",
328 u32 indent = va_arg(*ap,
u32);
346 &bier_disp_entry_vft,
392 .path =
"show bier disp entry",
393 .short_help =
"show bier disp entry index",
void dpo_unlock(dpo_id_t *dpo)
Release a reference counting lock on the DPO.
u32 bde_locks
number of locks
dpo_lock_fn_t dv_lock
A reference counting lock function.
static void bier_disp_entry_dpo_unlock(dpo_id_t *dpo)
A virtual function table regisitered for a DPO type.
fib_node_index_t bde_pl[BIER_HDR_N_PROTO]
The path-lists used by per-payload protocol parents.
A representation of a path as described by a route producer.
dpo_proto_t bier_hdr_proto_to_dpo(bier_hdr_proto_id_t bproto)
Convert from BIER next-hop proto to DPO proto.
enum bier_show_flags_t_ bier_show_flags_t
Flags to control show output.
u8 * format_fib_path_list(u8 *s, va_list *args)
static void bier_disp_entry_dpo_mem_show(void)
void dpo_copy(dpo_id_t *dst, const dpo_id_t *src)
atomic copy a data-plane object.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
void bier_disp_entry_lock(index_t bdei)
void fib_path_list_walk(fib_node_index_t path_list_index, fib_path_list_walk_fn_t func, void *ctx)
static void bier_disp_entry_lock_i(bier_disp_entry_t *bde)
bier_disposition : The BIER disposition object
#define pool_len(p)
Number of elements in pool vector.
void bier_disp_entry_unlock(index_t bdei)
const dpo_id_t * drop_dpo_get(dpo_proto_t proto)
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
#define VLIB_INIT_FUNCTION(x)
clib_error_t * bier_disp_entry_db_module_init(vlib_main_t *vm)
int bier_disp_entry_path_remove(index_t bdei, bier_hdr_proto_id_t pproto, const fib_route_path_t *rpaths)
static void bier_disp_entry_dpo_lock(dpo_id_t *dpo)
void fib_show_memory_usage(const char *name, u32 in_use_elts, u32 allocd_elts, size_t size_elt)
Show the memory usage for a type.
fib_node_index_t fib_path_list_copy_and_path_add(fib_node_index_t orig_path_list_index, fib_path_list_flags_t flags, const fib_route_path_t *rpaths)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
static clib_error_t * show_bier_disp_entry(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static fib_path_list_walk_rc_t bier_disp_entry_path_list_walk(fib_node_index_t pl_index, fib_node_index_t path_index, void *arg)
fib_node_index_t fib_path_list_create(fib_path_list_flags_t flags, const fib_route_path_t *rpaths)
static const char *const bier_disp_entry_bier_nodes[]
#define pool_put(P, E)
Free an object E in pool P.
struct bier_disp_entry_t_::@55 bde_fwd[BIER_HDR_N_PROTO]
The DPO contributed from the per-payload protocol parents on cacheline 1.
void fib_path_list_lock(fib_node_index_t path_list_index)
static bier_disp_entry_t * bier_disp_entry_get(index_t bdi)
void bier_disp_entry_path_add(index_t bdei, bier_hdr_proto_id_t pproto, const fib_route_path_t *rpaths)
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P with alignment A.
fib_node_index_t fib_path_list_copy_and_path_remove(fib_node_index_t orig_path_list_index, fib_path_list_flags_t flags, const fib_route_path_t *rpaths)
struct bier_disp_entry_path_list_walk_ctx_t_ bier_disp_entry_path_list_walk_ctx_t
u8 * format_bier_disp_entry(u8 *s, va_list *args)
static u8 * format_bier_disp_entry_dpo(u8 *s, va_list *ap)
u32 fib_path_get_rpf_id(fib_node_index_t path_index)
u32 fib_node_index_t
A typedef of a node index.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
enum bier_hdr_proto_id_t_ bier_hdr_proto_id_t
BIER header protocol payload types.
void dpo_set(dpo_id_t *dpo, dpo_type_t type, dpo_proto_t proto, index_t index)
Set/create a DPO ID The DPO will be locked.
void fib_path_list_unlock(fib_node_index_t path_list_index)
#define VLIB_CLI_COMMAND(x,...)
#define FOR_EACH_BIER_HDR_PROTO(_proto)
static void bier_disp_entry_restack(bier_disp_entry_t *bde, bier_hdr_proto_id_t pproto)
u8 * format_dpo_id(u8 *s, va_list *args)
Format a DPO_id_t oject
enum fib_path_list_walk_rc_t_ fib_path_list_walk_rc_t
return code to control pat-hlist walk
index_t dpoi_index
the index of objects of that type
#define FIB_NODE_INDEX_INVALID
index_t bier_disp_entry_add_or_lock(void)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
void fib_path_list_contribute_forwarding(fib_node_index_t path_list_index, fib_forward_chain_type_t fct, fib_path_list_fwd_flags_t flags, dpo_id_t *dpo)
void bier_disp_entry_contribute_forwarding(index_t bdei, dpo_id_t *dpo)
bier_disp_entry_t * bier_disp_entry_pool
bier_disposition : The BIER disposition object
#define CLIB_CACHE_LINE_BYTES
static index_t bier_disp_entry_get_index(bier_disp_entry_t *bde)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
fib_forward_chain_type_t fib_forw_chain_type_from_dpo_proto(dpo_proto_t proto)
Convert from a payload-protocol to a chain type.
static const char *const *const bier_disp_entry_nodes[DPO_PROTO_NUM]
u8 * format_bier_hdr_proto(u8 *s, va_list *ap)
Format the header length field.
void dpo_stack(dpo_type_t child_type, dpo_proto_t child_proto, dpo_id_t *dpo, const dpo_id_t *parent)
Stack one DPO object on another, and thus establish a child-parent relationship.
static uword pool_elts(void *v)
Number of active elements in a pool.