|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
347 u32 indent = va_arg(*ap,
u32);
354 return (
format(s,
"No BIER f-mask %d", bfmi));
359 s =
format(s,
"fmask: nh:%U bs:%U locks:%d ",
370 s =
format (s,
" to:[%Ld:%Ld]]",
to.packets,
to.bytes);
376 s =
format(s,
" output-label:%U",
382 s =
format(s,
" output-bfit:[%U]",
575 .path =
"show bier fmask",
576 .short_help =
"show bier fmask",
int dpo_is_drop(const dpo_id_t *dpo)
The Drop DPO will drop all packets, no questions asked.
void bier_fmask_link(index_t bfmi, bier_bp_t bp)
bier_bift_id_t bier_bift_id_encode(bier_table_set_id_t set, bier_table_sub_domain_id_t sd, bier_hdr_len_id_t bsl)
Encode a BIFT-ID as per draft-wijnandsxu-bier-non-mpls-bift-encoding-00.txt.
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
static const char *const bier_fmask_attr_names[]
enum fib_node_back_walk_rc_t_ fib_node_back_walk_rc_t
Return code from a back walk function.
static void bier_fmask_dpo_mem_show(void)
bier_bit_string_t bfmb_input_reset_string
each bit in the mask needs to be reference counted and set/cleared on the 0->1 and 1->0 transitions.
static void bier_fmask_init(bier_fmask_t *bfm, const bier_fmask_id_t *fmid, const fib_route_path_t *rpath)
#define FOR_EACH_BIER_FMASK_ATTR(_item)
u8 * fib_path_list_format(fib_node_index_t path_list_index, u8 *s)
void bier_fmask_encode(index_t bfmi, bier_table_id_t *btid, fib_route_path_t *rpath)
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P with alignment A.
static void clib_mem_free(void *p)
vlib_main_t vlib_node_runtime_t * node
A FIB graph nodes virtual function table.
void bier_bit_string_clear_bit(bier_bit_string_t *bit_string, bier_bp_t bp)
u32 bier_hdr_len_id_to_num_buckets(bier_hdr_len_id_t id)
Conversion functions for the enumerated bit-string length values, to bit and bytes.
index_t bfmi_bti
The BIER table this fmask is in.
static void bier_fmask_stack(bier_fmask_t *bfm)
const bier_table_id_t * bier_table_get_id(index_t bti)
ip46_address_t frp_addr
The next-hop address.
u32 fn_locks
Number of dependents on this node.
void vlib_validate_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
validate a combined counter
#define pool_put(P, E)
Free an object E in pool P.
vlib_combined_counter_main_t bier_fmask_counters
Stats for each BIER fmask object.
void bier_fmask_contribute_forwarding(index_t bfmi, dpo_id_t *dpo)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u32 frp_sw_if_index
The interface.
static u32 vnet_mpls_uc_get_label(mpls_label_t label_exp_s_ttl)
void bier_fmask_unlink(index_t bfmi, bier_bp_t bp)
u32 bier_bp_t
A bit positon as assigned to egress PEs.
static vlib_cli_command_t show_bier_fmask
(constructor) VLIB_CLI_COMMAND (show_bier_fmask)
const static char *const *const bier_fmask_nodes[DPO_PROTO_NUM]
static void vnet_mpls_uc_set_label(mpls_label_t *label_exp_s_ttl, u32 value)
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
u8 * format_bier_bift_id(u8 *s, va_list *ap)
enum bier_fmask_attributes_t_ bier_fmask_attributes_t
Flags on fmask.
u8 * format_bier_bit_string(u8 *string, va_list *args)
@ FIB_NODE_TYPE_BIER_FMASK
u32 bfmi_id
ID of the next-hop object, e.g.
u8 * format_bier_fmask(u8 *s, va_list *ap)
static void bier_fmask_dpo_lock(dpo_id_t *dpo)
fib_mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
u16 bbs_len
The length of the string in BYTES.
#define STRUCT_OFFSET_OF(t, f)
bier_fmask : The BIER fmask
mpls_label_t bfm_label
The MPLS label to paint on the header during forwarding.
#define pool_foreach(VAR, POOL)
Iterate through pool.
bier_fmask_flags_t bfm_flags
operational/state flags on the fmask
bier_fmask_t * bier_fmask_pool
bier_nh_type_t bfmi_nh_type
Union discriminator.
void bier_fmask_db_remove(const bier_fmask_id_t *fmid)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
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.
bier_table_sub_domain_id_t bti_sub_domain
The Sub-Domain-ID The control plane has the configuration option to specify multiple domains or topol...
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
static void vnet_mpls_uc_set_s(mpls_label_t *label_exp_s_ttl, u32 eos)
Combined counter to hold both packets and byte differences.
@ FIB_PATH_LIST_FLAG_SHARED
static fib_node_back_walk_rc_t bier_fmask_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
static clib_error_t * bier_fmask_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
ip46_address_t bfmi_nh
next-hop of the peer
u32 fib_node_index_t
A typedef of a node index.
u32 bfmb_count
The total number of references to bits set on this mask in effect a count of the number of children.
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.
void bier_fmask_lock(index_t bfmi)
static void vlib_zero_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
Clear a combined counter Clears the set of per-thread counters.
static index_t bier_fmask_get_index(const bier_fmask_t *bfm)
index_t bier_fmask_create_and_lock(const bier_fmask_id_t *fmid, const fib_route_path_t *rpath)
@ FIB_ROUTE_PATH_UDP_ENCAP
A path via a UDP encap object.
#define VLIB_CLI_COMMAND(x,...)
@ BIER_NH_UDP
BIER header in non-MPLS networks.
static bier_fmask_t * bier_fmask_get_from_node(fib_node_t *node)
dpo_lock_fn_t dv_lock
A reference counting lock function.
bier_fmask_id_t * bfm_id
The key to this fmask - used for store/lookup in the DB.
u32 fib_path_list_child_add(fib_node_index_t path_list_index, fib_node_type_t child_type, fib_node_index_t child_index)
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 fib_node_register_type(fib_node_type_t type, const fib_node_vft_t *vft)
fib_node_register_type
#define CLIB_CACHE_LINE_BYTES
static void vnet_mpls_uc_set_exp(mpls_label_t *label_exp_s_ttl, u32 exp)
@ FIB_NODE_BACK_WALK_CONTINUE
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
bier_hdr_len_id_t bti_hdr_len
The size of the bit string processed by this table.
const static dpo_vft_t bier_fmask_dpo_vft
u8 * format_dpo_id(u8 *s, va_list *args)
Format a DPO_id_t oject.
static u8 ip46_address_is_zero(const ip46_address_t *ip46)
mpls_label_t fml_value
The label value.
static void bier_fmask_dpo_unlock(dpo_id_t *dpo)
enum bier_hdr_len_id_t_ bier_hdr_len_id_t
bier_hdr_len_id_t enumerator
void fib_walk_sync(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_back_walk_ctx_t *ctx)
Back walk all the children of a FIB node.
static fib_node_t * bier_fmask_get_node(fib_node_index_t index)
static void vlib_get_combined_counter(const vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
Get the value of a combined counter, never called in the speed path Scrapes the entire set of per-thr...
#define vec_free(V)
Free vector's memory (no header).
#define pool_len(p)
Number of elements in pool vector.
void bier_fmask_get_stats(index_t bfmi, u64 *packets, u64 *bytes)
void dpo_copy(dpo_id_t *dst, const dpo_id_t *src)
atomic copy a data-plane object.
@ FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS
Contribute an object that is to be used to forward non-end-of-stack MPLS packets.
fib_route_path_flags_t frp_flags
flags on the path
static const fib_node_vft_t bier_fmask_vft
@ BIER_FMASK_FLAG_FORWARDING
description fragment has unexpected format
A collection of combined counters.
format_function_t format_ip46_address
#define VLIB_INIT_FUNCTION(x)
dpo_id_t bfm_dpo
The index into the adj table for the adj that this fmask resolves via.
u32 bier_hdr_len_id_to_num_bits(bier_hdr_len_id_t id)
A representation of a path as described by a route producer.
u32 bfm_sibling
the index of this fmask in the parent's child list.
#define BIER_BP_TO_INDEX(bp)
static void vnet_mpls_uc_set_ttl(mpls_label_t *label_exp_s_ttl, u32 ttl)
void fib_node_lock(fib_node_t *node)
static uword pool_elts(void *v)
Number of active elements in a pool.
@ FIB_FORW_CHAIN_TYPE_BIER
Contribute an object that is to be used to forward BIER packets.
void fib_path_list_child_remove(fib_node_index_t path_list_index, u32 si)
An node in the FIB graph.
u32 bier_bift_id_t
The BIER universal 'label'.
bier_bit_mask_bucket_t * bbs_buckets
The buckets in the string.
void bier_bit_string_set_bit(bier_bit_string_t *bit_string, bier_bp_t bp)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
bier_fmask_bits_t bfm_bits
The bits, and their ref counts, that are set on this mask This mask changes as BIER entries link to a...
const dpo_id_t * drop_dpo_get(dpo_proto_t proto)
void fib_node_init(fib_node_t *node, fib_node_type_t type)
A virtual function table regisitered for a DPO type.
void fib_node_unlock(fib_node_t *node)
fib_node_index_t bfm_pl
The path-list.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
u32 bier_fmask_child_add(fib_node_index_t bfmi, fib_node_type_t child_type, fib_node_index_t child_index)
@ FIB_PATH_LIST_FLAG_NO_URPF
Context passed between object during a back walk.
const static char *const bier_fmask_mpls_nodes[]
void fib_node_child_remove(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_index_t sibling_index)
static void bier_fmask_last_lock_gone(fib_node_t *node)
static void * clib_mem_alloc_aligned(uword size, uword align)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
u32 mpls_label_t
A label value only, i.e.
clib_error_t * bier_fmask_module_init(vlib_main_t *vm)
@ BIER_NH_IP
BIER Header in MPLS networks.
u32 frp_udp_encap_id
UDP encap ID.
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.
static void bier_fmask_destroy(bier_fmask_t *bfm)
static void bier_fmask_bits_init(bier_fmask_bits_t *bits, bier_hdr_len_id_t hlid)
bier_table_set_id_t bti_set
The SET-ID The control plane divdies the bit-position space into sets in the case the max bit-positio...
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
#define BIER_FMASK_ATTR_NAMES
format_function_t format_mpls_unicast_label
void bier_fmask_child_remove(fib_node_index_t bfmi, u32 sibling_index)
fib_node_index_t fib_path_list_create(fib_path_list_flags_t flags, const fib_route_path_t *rpaths)
A key/ID for a BIER forwarding Mas (FMask).
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
static void * clib_mem_alloc(uword size)
u32 fib_node_child_add(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_type_t type, fib_node_index_t index)
fib_node_t bfm_node
The BIER fmask is a child of a FIB entry in the FIB graph.
static bier_fmask_t * bier_fmask_get(u32 index)
@ FIB_PATH_LIST_FWD_FLAG_COLLAPSE
void bier_fmask_unlock(index_t bfmi)
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register: