|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
111 #define FIB_PATH_TYPES { \
112 [FIB_PATH_TYPE_ATTACHED_NEXT_HOP] = "attached-nexthop", \
113 [FIB_PATH_TYPE_ATTACHED] = "attached", \
114 [FIB_PATH_TYPE_RECURSIVE] = "recursive", \
115 [FIB_PATH_TYPE_SPECIAL] = "special", \
116 [FIB_PATH_TYPE_EXCLUSIVE] = "exclusive", \
117 [FIB_PATH_TYPE_DEAG] = "deag", \
118 [FIB_PATH_TYPE_INTF_RX] = "intf-rx", \
119 [FIB_PATH_TYPE_UDP_ENCAP] = "udp-encap", \
120 [FIB_PATH_TYPE_RECEIVE] = "receive", \
121 [FIB_PATH_TYPE_BIER_IMP] = "bier-imp", \
122 [FIB_PATH_TYPE_BIER_TABLE] = "bier-table", \
123 [FIB_PATH_TYPE_BIER_FMASK] = "bier-fmask", \
124 [FIB_PATH_TYPE_DVR] = "dvr", \
156 #define FIB_PATH_OPER_ATTRIBUTE_MAX (FIB_PATH_OPER_ATTRIBUTE_LAST + 1)
158 #define FIB_PATH_OPER_ATTRIBUTES { \
159 [FIB_PATH_OPER_ATTRIBUTE_RECURSIVE_LOOP] = "recursive-loop", \
160 [FIB_PATH_OPER_ATTRIBUTE_RESOLVED] = "resolved", \
161 [FIB_PATH_OPER_ATTRIBUTE_DROP] = "drop", \
164 #define FOR_EACH_FIB_PATH_OPER_ATTRIBUTE(_item) \
165 for (_item = FIB_PATH_OPER_ATTRIBUTE_FIRST; \
166 _item <= FIB_PATH_OPER_ATTRIBUTE_LAST; \
408 #define FIB_PATH_DBG(_p, _fmt, _args...) \
410 vlib_log_debug (fib_path_logger, \
412 format_fib_path, fib_path_get_index(_p), 0, \
413 FIB_PATH_FORMAT_FLAGS_ONE_LINE, \
446 u32 indent = va_arg (*args,
u32);
467 s =
format (s,
"pl-index:%d ",
path->fp_pl_index);
469 s =
format (s,
"weight=%d ",
path->fp_weight);
470 s =
format (s,
"pref=%d ",
path->fp_preference);
473 s =
format(s,
" oper-flags:");
475 if ((1<<oattr) &
path->fp_oper_flags) {
481 s =
format(s,
" cfg-flags:");
483 if ((1<<cattr) &
path->fp_cfg_flags) {
491 switch (
path->fp_type)
495 &
path->attached_next_hop.fp_nh,
499 s =
format (s,
" if_index:%d",
path->attached_next_hop.fp_interface);
508 path->attached_next_hop.fp_interface));
510 path->attached_next_hop.fp_interface))
521 s =
format(s,
"%s%U%U", eol,
530 s =
format (s,
"if_index:%d",
path->attached_next_hop.fp_interface);
539 path->attached.fp_interface));
545 s =
format (s,
"via %U %U",
547 path->recursive.fp_nh.fp_local_label,
549 path->recursive.fp_nh.fp_eos);
555 &
path->recursive.fp_nh.fp_ip,
558 s =
format (s,
" in fib:%d",
559 path->recursive.fp_tbl_id,
561 s =
format (s,
" via-fib:%d",
path->fp_via_fib);
562 s =
format (s,
" via-dpo:[%U:%d]",
564 path->fp_dpo.dpoi_index);
568 s =
format (s,
"UDP-encap ID:%d",
path->udp_encap.fp_udp_encap_id);
571 s =
format (s,
"via bier-table:[%U}",
573 &
path->bier_table.fp_bier_tbl);
574 s =
format (s,
" via-dpo:[%U:%d]",
576 path->fp_dpo.dpoi_index);
579 s =
format (s,
"via-fmask:%d",
path->bier_fmask.fp_bier_fmask);
580 s =
format (s,
" via-dpo:[%U:%d]",
582 path->fp_dpo.dpoi_index);
594 path->dvr.fp_interface));
597 s =
format (s,
" %sfib-index:%d",
599 path->deag.fp_tbl_id);
608 &
path->fp_dpo, indent+2);
640 path->attached_next_hop.fp_interface))
649 path->attached_next_hop.fp_interface);
654 &
path->attached_next_hop.fp_nh,
655 path->attached_next_hop.fp_interface);
690 path->attached_next_hop.fp_interface) ||
707 path->attached.fp_interface))
716 path->attached.fp_interface);
722 path->attached.fp_interface))
731 path->attached.fp_interface,
732 &
path->attached.fp_connected);
894 switch (
path->fp_type)
990 switch (
path->fp_type)
1101 path->attached_next_hop.fp_interface);
1292 path->fp_pl_index = pl_index;
1296 if (0 ==
path->fp_weight)
1302 path->fp_weight = 1;
1404 path->deag.fp_rpf_id = ~0;
1449 path->fp_pl_index = pl_index;
1450 path->fp_weight = 1;
1451 path->fp_preference = 0;
1452 path->fp_nh_proto = nh_proto;
1489 ASSERT(NULL != orig_path);
1500 path->fp_pl_index = path_list_index;
1589 res = (path1->
attached.fp_interface -
1606 res = (path1->
bier_imp.fp_bier_imp -
1614 res = (path1->
deag.fp_tbl_id - path2->
deag.fp_tbl_id);
1617 res = (path1->
deag.fp_rpf_id - path2->
deag.fp_rpf_id);
1621 res = (path1->
intf_rx.fp_interface - path2->
intf_rx.fp_interface);
1627 res = (path1->
dvr.fp_interface - path2->
dvr.fp_interface);
1707 switch (
path->fp_type)
1714 res = (
path->attached_next_hop.fp_interface -
1728 res =
path->recursive.fp_nh.fp_eos - rpath->
frp_eos;
1824 switch (
path->fp_type)
1833 if (*entry_index ==
path->fp_via_fib)
1928 switch (
path->fp_type)
1941 path->attached.fp_interface))
1985 path->recursive.fp_nh.fp_eos,
2002 path->fp_via_fib = fei;
2032 path->fp_via_bier_fmask =
path->bier_fmask.fp_bier_fmask;
2050 path->fp_via_bier_tbl =
2075 path->classify.fp_classify_table_id));
2127 path->receive.fp_interface,
2128 &
path->receive.fp_addr,
2142 path->intf_rx.fp_interface,
2164 switch (
path->fp_type)
2167 return (
path->attached_next_hop.fp_interface);
2169 return (
path->attached.fp_interface);
2171 return (
path->receive.fp_interface);
2179 return (
path->dvr.fp_interface);
2200 switch (
path->fp_type)
2212 return (
path->udp_encap.fp_udp_encap_id);
2214 return (
path->fp_via_fib);
2216 return (
path->bier_fmask.fp_bier_fmask);
2218 return (
path->fp_via_bier_tbl);
2220 return (
path->bier_imp.fp_bier_imp);
2234 return (
path->fp_dpo.dpoi_index);
2248 return (
path->fp_weight);
2260 return (
path->fp_preference);
2274 return (
path->deag.fp_rpf_id);
2297 switch (
path->fp_type)
2326 u32 rpf_sw_if_index;
2330 if (~0 != rpf_sw_if_index)
2365 switch (
path->fp_type)
2384 path->deag.fp_rpf_id,
2437 switch (
path->fp_type)
2576 path->attached.fp_interface))
2585 path->attached.fp_interface);
2591 path->attached.fp_interface);
2606 path->attached.fp_interface,
2728 switch (
path->fp_type)
2798 return (
path->fp_nh_proto);
2826 s =
format(s,
"\n children:");
2850 .path =
"show fib paths",
2852 .short_help =
"show fib paths",
static fib_forward_chain_type_t fib_path_to_chain_type(const fib_path_t *path)
int dpo_is_drop(const dpo_id_t *dpo)
The Drop DPO will drop all packets, no questions asked.
@ FIB_NODE_BW_REASON_FLAG_ADJ_DOWN
vlib_log_class_t fib_path_logger
the logger
fib_node_index_t fib_path_copy(fib_node_index_t path_index, fib_node_index_t path_list_index)
struct fib_path_t_::@301::@313 exclusive
u32 fp_sibling
the index of this path in the parent's child list.
@ FIB_PATH_CFG_FLAG_RESOLVE_HOST
u32 frp_fib_index
The FIB index to lookup the nexthop Only valid for recursive paths.
int bier_table_id_cmp(const bier_table_id_t *btid1, const bier_table_id_t *btid2)
Compare to BIER table IDs for equality.
@ FIB_PATH_CFG_FLAG_RESOLVE_ATTACHED
@ FIB_PATH_CFG_FLAG_POP_PW_CW
int dpo_cmp(const dpo_id_t *dpo1, const dpo_id_t *dpo2)
Compare two Data-path objects.
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
fib_path_type_t_
Enurmeration of path types.
void bier_table_contribute_forwarding(index_t bti, dpo_id_t *dpo)
fib_path_oper_flags_t_
Path flags from the attributes.
@ FIB_PATH_TYPE_RECEIVE
receive.
@ FIB_PATH_OPER_FLAG_DROP
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_UP
@ IP_NULL_ACTION_SEND_ICMP_PROHIBIT
const fib_prefix_t * fib_entry_get_prefix(fib_node_index_t fib_entry_index)
static int fib_path_is_permanent_drop(fib_path_t *path)
enum fib_node_back_walk_rc_t_ fib_node_back_walk_rc_t
Return code from a back walk function.
#define FIB_PATH_DBG(_p, _fmt, _args...)
index_t frp_bier_imp
A path via a BIER imposition object.
#define clib_memcpy(d, s, n)
const ip46_address_t zero_addr
#include <vnet/feature/feature.h>
void fib_entry_contribute_urpf(fib_node_index_t entry_index, index_t urpf)
Contribute the set of Adjacencies that this entry forwards with to build the uRPF list of its childre...
static void fib_path_bier_fmask_update(fib_path_t *path, dpo_id_t *dpo)
adj_index_t adj_nbr_add_or_lock(fib_protocol_t nh_proto, vnet_link_t link_type, const ip46_address_t *nh_addr, u32 sw_if_index)
Neighbour Adjacency sub-type.
Path encode context to use when walking a path-list to encode paths.
@ FIB_PATH_TYPE_DEAG
deag.
void load_balance_map_path_state_change(fib_node_index_t path_index)
the state of a path has changed (it has no doubt gone down).
@ FIB_NODE_BW_REASON_FLAG_ADJ_MTU
u8 frp_weight
[un]equal cost path weight
struct fib_path_t_::@301::@317 classify
u32 path_weight
weight for the path.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
enum fib_path_type_t_ fib_path_type_t
Enurmeration of path types.
static void fib_path_recursive_adj_update(fib_path_t *path, fib_forward_chain_type_t fct, dpo_id_t *dpo)
@ FIB_ROUTE_PATH_ICMP_PROHIBIT
static void fib_path_memory_show(void)
index_t fp_bier_fmask
BIER FMask ID.
struct fib_path_t_::@301::@305 attached_next_hop
void udp_encap_contribute_forwarding(index_t uei, dpo_proto_t proto, dpo_id_t *dpo)
ip46_address_t fp_ip
The next-hop.
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static const char * fib_path_oper_attribute_names[]
@ FIB_PATH_TYPE_UDP_ENCAP
Path resolves via a UDP encap object.
bier_table_id_t frp_bier_tbl
A path that resolves via a BIER Table.
u8 * format_fib_path(u8 *s, va_list *args)
index_t fp_via_bier_tbl
the resolving bier-table
@ FIB_FORW_CHAIN_TYPE_MPLS_EOS
Contribute an object that is to be used to forward end-of-stack MPLS packets.
@ FIB_PATH_CFG_FLAG_ICMP_UNREACH
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
@ FIB_PATH_OPER_FLAG_NONE
u32 dpo_get_urpf(const dpo_id_t *dpo)
Get a uRPF interface for the DPO.
adj_index_t adj_mcast_add_or_lock(fib_protocol_t proto, vnet_link_t link_type, u32 sw_if_index)
Mcast Adjacency.
vlib_main_t vlib_node_runtime_t * node
static int ip46_address_cmp(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
A FIB graph nodes virtual function table.
@ FIB_ENTRY_FLAG_ATTACHED
dpo_id_t fp_ex_dpo
The user provided 'exclusive' DPO.
#define FIB_NODE_INDEX_INVALID
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
index_t bier_table_ecmp_create_and_lock(const bier_table_id_t *btid)
enum fib_path_list_walk_rc_t_ fib_path_list_walk_rc_t
return code to control pat-hlist walk
ip46_address_t frp_addr
The next-hop address.
@ FIB_FORW_CHAIN_TYPE_MCAST_IP4
Contribute an object that is to be used to forward IP4 packets.
fib_rpf_id_t frp_rpf_id
The RPF-ID.
vl_api_tunnel_mode_t mode
static void fib_path_last_lock_gone(fib_node_t *node)
@ FIB_FORW_CHAIN_TYPE_ETHERNET
Contribute an object that is to be used to forward Ethernet packets.
void fib_path_destroy(fib_node_index_t path_index)
u8 * format_dpo_type(u8 *s, va_list *args)
format a DPO type
enum fib_path_format_flags_t_ fib_format_path_flags_t
#define pool_put(P, E)
Free an object E in pool P.
@ FIB_PATH_CFG_FLAG_INTF_RX
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.
mpls_eos_bit_t frp_eos
EOS bit for the resolving label.
u8 * fib_node_children_format(fib_node_list_t list, u8 *s)
@ FIB_PATH_TYPE_ATTACHED_NEXT_HOP
Attached-nexthop.
u32 frp_sw_if_index
The interface.
u32 adj_child_add(adj_index_t adj_index, fib_node_type_t child_type, fib_node_index_t child_index)
Add a child dependent to an adjacency.
void fib_path_module_init(void)
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
#define FOR_EACH_FIB_PATH_CFG_ATTRIBUTE(_item)
index_t frp_bier_fmask
Resolving via a BIER Fmask.
void fib_prefix_from_ip46_addr(const ip46_address_t *addr, fib_prefix_t *pfx)
Host prefix from ip.
u32 fp_classify_table_id
The UDP Encap object this path resolves through.
@ FIB_PATH_CFG_FLAG_ICMP_PROHIBIT
void fib_path_stack_mpls_disp(fib_node_index_t path_index, dpo_proto_t payload_proto, fib_mpls_lsp_mode_t mode, dpo_id_t *dpo)
static fib_path_cfg_flags_t fib_path_route_flags_to_cfg_flags(const fib_route_path_t *rpath)
format_function_t format_mpls_eos_bit
void bier_imp_unlock(index_t bii)
#define FIB_PATH_OPER_ATTRIBUTES
u32 fib_path_get_rpf_id(fib_node_index_t path_index)
index_t classify_dpo_create(dpo_proto_t proto, u32 classify_table_index)
dpo_proto_t frp_proto
The protocol of the address below.
enum fib_path_oper_flags_t_ fib_path_oper_flags_t
Path flags from the attributes.
u32 fp_udp_encap_id
The UDP Encap object this path resolves through.
@ FIB_PATH_TYPE_DVR
via a DVR.
int fib_path_is_recursive_constrained(fib_node_index_t path_index)
static fib_node_index_t fib_path_get_index(fib_path_t *path)
@ FIB_ROUTE_PATH_DVR
A path that resolves via a DVR DPO.
@ FIB_PATH_CFG_FLAG_RPF_ID
void adj_child_remove(adj_index_t adj_index, u32 sibling_index)
Remove a child dependent.
void fib_entry_contribute_forwarding(fib_node_index_t fib_entry_index, fib_forward_chain_type_t fct, dpo_id_t *dpo)
fib_node_index_t fp_tbl_id
The FIB table index in which to find the next-hop.
static fib_path_t * fib_path_from_fib_node(fib_node_t *node)
int load_balance_is_drop(const dpo_id_t *dpo)
fib_mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
dpo_proto_t vnet_link_to_dpo_proto(vnet_link_t linkt)
int fib_path_resolve(fib_node_index_t path_index)
@ FIB_FORW_CHAIN_TYPE_NSH
Contribute an object that is to be used to forward NSH packets.
@ FIB_PATH_OPER_ATTRIBUTE_LAST
Marker.
int fib_entry_is_resolved(fib_node_index_t fib_entry_index)
Return !0 is the entry is resolved, i.e.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
@ FIB_NODE_BW_REASON_FLAG_EVALUATE
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP4
Contribute an object that is to be used to forward IP4 packets.
@ FIB_PATH_FORMAT_FLAGS_NONE
u16 fib_path_get_preference(fib_node_index_t path_index)
#define STRUCT_OFFSET_OF(t, f)
int fib_path_cmp_for_sort(void *v1, void *v2)
void fib_table_entry_special_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Remove a 'special' entry from the FIB.
static const fib_node_vft_t fib_path_vft
struct fib_path_t_::@301::@316 udp_encap
dpo_proto_t fib_path_get_proto(fib_node_index_t path_index)
u32 fib_rpf_id_t
An RPF-ID is numerical value that is used RPF validate.
u32 fib_entry_child_add(fib_node_index_t fib_entry_index, fib_node_type_t child_type, fib_node_index_t child_index)
struct fib_path_t_::@301::@318 dvr
@ FIB_ROUTE_PATH_INTF_RX
A path that result in received traffic being recieved/recirculated so that it appears to have arrived...
void dvr_dpo_add_or_lock(u32 sw_if_index, dpo_proto_t dproto, dpo_id_t *dpo)
int vnet_sw_interface_is_p2p(vnet_main_t *vnm, u32 sw_if_index)
vnet_link_t dpo_proto_to_link(dpo_proto_t dp)
format a DPO protocol
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
fib_prefix_t fp_connected
The Connected local address.
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
fib_node_index_t path_index
The index of the FIB path.
vnet_link_t fib_forw_chain_type_to_link_type(fib_forward_chain_type_t fct)
Convert from a chain type to the adjacency's link type.
index_t fib_path_get_resolving_index(fib_node_index_t path_index)
dpo_proto_t fib_forw_chain_type_to_dpo_proto(fib_forward_chain_type_t fct)
Convert from a chain type to the DPO proto it will install.
vnet_main_t * vnet_get_main(void)
@ FIB_PATH_TYPE_BIER_TABLE
bier-fmask.
@ FIB_PATH_TYPE_BIER_IMP
bier-imp.
u32 fp_pl_index
The index of the path-list to which this path belongs.
@ FIB_ROUTE_PATH_BIER_TABLE
A path that resolves via a BIER [ECMP] Table.
@ FIB_PATH_OPER_FLAG_RESOLVED
STRUCT_MARK(path_hash_start)
This marks the start of the memory area used to hash the path.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
@ FIB_PATH_OPER_FLAG_RECURSIVE_LOOP
@ FIB_ROUTE_PATH_SOURCE_LOOKUP
A deag path using the packet's source not destination address.
u32 fib_node_index_t
A typedef of a node index.
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_create_special(fib_node_index_t pl_index, dpo_proto_t nh_proto, fib_path_cfg_flags_t flags, const dpo_id_t *dpo)
@ FIB_PATH_CFG_FLAG_ATTACHED
struct fib_path_t_::@301::@309 bier_table
@ FIB_ROUTE_PATH_RESOLVE_VIA_HOST
Recursion constraint of via a host prefix.
#define STRUCT_MARK_PTR(v, f)
static int dpo_id_is_valid(const dpo_id_t *dpoi)
Return true if the DPO object is valid, i.e.
u32 frp_classify_table_id
Classify table ID.
bier_table_id_t fp_bier_tbl
The BIER table's ID.
int fib_path_is_exclusive(fib_node_index_t path_index)
@ FIB_ROUTE_PATH_DEAG
A path that resolves via another table.
fib_path_cfg_flags_t fp_cfg_flags
Configuration Flags.
void pw_cw_dpo_create(const dpo_id_t *parent, dpo_id_t *dpo)
Create an PW CW pop.
void udp_encap_unlock(index_t uei)
enum fib_mpls_lsp_mode_t_ fib_mpls_lsp_mode_t
MPLS LSP mode - only valid at the head and tail.
void mpls_disp_dpo_create(dpo_proto_t payload_proto, fib_rpf_id_t rpf_id, fib_mpls_lsp_mode_t mode, const dpo_id_t *parent, dpo_id_t *dpo)
Create an MPLS label object.
int fib_path_is_looped(fib_node_index_t path_index)
@ FIB_ROUTE_PATH_UDP_ENCAP
A path via a UDP encap object.
void bier_table_ecmp_unlock(index_t bti)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
index_t fp_via_bier_fmask
the resolving bier-fmask
index_t fp_bier_imp
The BIER imposition object this is part of the path's key, since the index_t of an imposition object ...
@ FIB_NODE_BW_REASON_FLAG_ADJ_UPDATE
#define VLIB_CLI_COMMAND(x,...)
@ FIB_ROUTE_PATH_RPF_ID
A local path with a RPF-ID => multicast traffic.
void fib_path_contribute_forwarding(fib_node_index_t path_index, fib_forward_chain_type_t fct, dpo_id_t *dpo)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
u32 fib_path_get_resolving_interface(fib_node_index_t path_index)
void bier_imp_contribute_forwarding(index_t bii, dpo_proto_t proto, dpo_id_t *dpo)
@ LOOKUP_TABLE_FROM_CONFIG
u32 fib_entry_get_resolving_interface(fib_node_index_t entry_index)
void fib_node_register_type(fib_node_type_t type, const fib_node_vft_t *vft)
fib_node_register_type
dpo_id_t fp_dpo
The Data-path objects through which this path resolves for IP.
@ FIB_PATH_FORMAT_FLAGS_ONE_LINE
int fib_path_is_deag(fib_node_index_t path_index)
@ FIB_PATH_TYPE_SPECIAL
special.
fib_path_oper_attribute_t_
Enurmeration of path operational (i.e.
__clib_export uword hash_memory(void *p, word n_bytes, uword state)
u32 fp_interface
The interface.
@ FIB_NODE_BACK_WALK_CONTINUE
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
u8 * format_dpo_id(u8 *s, va_list *args)
Format a DPO_id_t oject.
fib_node_index_t fib_path_create(fib_node_index_t pl_index, const fib_route_path_t *rpath)
@ FIB_PATH_CFG_FLAG_LOCAL
@ FIB_PATH_CFG_FLAG_EXCLUSIVE
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_DOWN
int adj_is_up(adj_index_t ai)
Return true if the adjacency is 'UP', i.e.
@ FIB_PATH_LIST_WALK_CONTINUE
static u8 ip46_address_is_zero(const ip46_address_t *ip46)
struct fib_path_t_::@301::@314 receive
@ FIB_PATH_TYPE_RECURSIVE
recursive.
void bier_imp_lock(index_t bii)
int fib_entry_recursive_loop_detect(fib_node_index_t entry_index, fib_node_index_t **entry_indicies)
adj_index_t adj_glean_add_or_lock(fib_protocol_t proto, vnet_link_t linkt, u32 sw_if_index, const fib_prefix_t *conn)
Glean Adjacency.
fib_rpf_id_t fp_rpf_id
The RPF-ID to tag the packets with.
struct fib_path_t_::@301::@315 intf_rx
@ IP_NULL_ACTION_SEND_ICMP_UNREACH
struct fib_path_t_::@301::@307 recursive
#define vec_free(V)
Free vector's memory (no header).
static void fib_path_unresolve(fib_path_t *path)
static void fib_path_attached_get_adj(fib_path_t *path, vnet_link_t link, dpo_id_t *dpo)
#define pool_len(p)
Number of elements in pool vector.
@ FIB_PATH_EXT_MPLS
An MPLS extension that maintains the path's outgoing labels,.
static clib_error_t * show_fib_path_command(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
@ FIB_ROUTE_PATH_RESOLVE_VIA_ATTACHED
Recursion constraint of via an attahced prefix.
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_PATH_TYPE_EXCLUSIVE
exclusive.
@ FIB_PATH_OPER_ATTRIBUTE_RESOLVED
The path is resolved.
ip46_address_t fp_nh
The next-hop.
static fib_path_t * fib_path_attached_next_hop_get_adj(fib_path_t *path, vnet_link_t link, dpo_id_t *dpo)
fib_route_path_flags_t frp_flags
flags on the path
#define pool_foreach_index(i, v)
fib_path_ext_type_t fpe_type
The type of path extension.
fib_protocol_t dpo_proto_to_fib(dpo_proto_t dpo_proto)
struct fib_path_t_::@301::@310 bier_imp
enum fib_path_cfg_attribute_t_ fib_path_cfg_attribute_t
Given a route of the form; q.r.s.t/Y via <interface> <next-hop>
int vnet_sw_interface_is_nbma(vnet_main_t *vnm, u32 sw_if_index)
@ FIB_ROUTE_PATH_POP_PW_CW
Pop a Psuedo Wire Control Word.
@ FIB_PATH_OPER_ATTRIBUTE_DROP
The path has become a permanent drop.
description fragment has unexpected format
@ FIB_PATH_CFG_FLAG_DEAG_SRC
dpo_id_t dpo
Exclusive DPO.
format_function_t format_ip46_address
void fib_urpf_list_append(index_t ui, u32 sw_if_index)
Append another interface to the list.
static fib_path_t * fib_path_get(fib_node_index_t index)
@ FIB_PATH_CFG_FLAG_CLASSIFY
void fib_table_lock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Release a reference counting lock on the table.
fib_path_oper_flags_t fp_oper_flags
Members in this last section represent information that is dervied during resolution.
#define MPLS_FIB_DEFAULT_TABLE_ID
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 * fib_path_cfg_attribute_names[]
fib_route_path_t fpe_path
A description of the path that is being extended.
A representation of a path as described by a route producer.
load_balance_path_t * fib_path_append_nh_for_multipath_hash(fib_node_index_t path_index, fib_forward_chain_type_t fct, load_balance_path_t *hash_key)
fib_path_list_walk_rc_t fib_path_encode(fib_node_index_t path_list_index, fib_node_index_t path_index, const fib_path_ext_t *path_ext, void *args)
struct fib_path_t_::@301::@311 deag
u8 fp_preference
A path preference.
#define vec_foreach(var, vec)
Vector iterator.
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_DELETE
@ FIB_PATH_TYPE_INTF_RX
interface receive.
int fib_path_is_resolved(fib_node_index_t path_index)
@ FIB_ROUTE_PATH_ICMP_UNREACH
enum lookup_input_t_ lookup_input_t
Switch to use the packet's source or destination address for lookup.
fib_entry_flag_t fib_entry_get_flags(fib_node_index_t fib_entry_index)
void interface_rx_dpo_add_or_lock(dpo_proto_t proto, u32 sw_if_index, dpo_id_t *dpo)
static uword pool_elts(void *v)
Number of active elements in a pool.
struct fib_path_t_ fib_path_t
A FIB path.
#define FIB_PATH_CFG_ATTRIBUTES
int fib_path_cmp(fib_node_index_t pi1, fib_node_index_t pi2)
enum lookup_cast_t_ lookup_cast_t
Switch to use the packet's source or destination address for lookup.
@ FIB_ROUTE_PATH_ATTACHED
Attached path.
@ FIB_FORW_CHAIN_TYPE_BIER
Contribute an object that is to be used to forward BIER packets.
u8 * format_bier_imp(u8 *s, va_list *args)
@ FIB_FORW_CHAIN_TYPE_MCAST_IP6
Contribute an object that is to be used to forward IP6 packets.
An node in the FIB graph.
struct fib_path_t_::@301::@308 bier_fmask
u32 adj_index_t
An index for adjacencies.
u8 fp_weight
UCMP [unnormalised] weigth.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
fib_path_type_t fp_type
The type of the path.
void fib_path_contribute_urpf(fib_node_index_t path_index, index_t urpf)
Contribute the path's adjacency to the list passed.
adj_index_t fib_path_get_adj(fib_node_index_t path_index)
const dpo_id_t * drop_dpo_get(dpo_proto_t proto)
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
void fib_node_init(fib_node_t *node, fib_node_type_t type)
void receive_dpo_add_or_lock(dpo_proto_t proto, u32 sw_if_index, const ip46_address_t *nh_addr, dpo_id_t *dpo)
u8 * format_dpo_proto(u8 *s, va_list *args)
format a DPO protocol
void fib_prefix_from_mpls_label(mpls_label_t label, mpls_eos_bit_t eos, fib_prefix_t *prf)
ip46_address_t fp_addr
The next-hop.
static int fib_path_cmp_i(const fib_path_t *path1, const fib_path_t *path2)
struct fib_path_t_::@301::@312 special
@ FIB_ROUTE_PATH_GLEAN
A path that resolves via a glean adjacency.
@ FIB_PATH_OPER_ATTRIBUTE_FIRST
Marker.
void lookup_dpo_add_or_lock_w_table_id(u32 table_id, dpo_proto_t proto, lookup_cast_t cast, lookup_input_t input, lookup_table_t table_config, dpo_id_t *dpo)
@ FIB_PATH_TYPE_FIRST
Marker.
int dpo_is_adj(const dpo_id_t *dpo)
Return TRUE is the DPO is any type of adjacency.
u32 bier_fmask_child_add(fib_node_index_t bfmi, fib_node_type_t child_type, fib_node_index_t child_index)
A path extension is a per-entry addition to the forwarding information when packets are sent for that...
void fib_table_unlock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Take a reference counting lock on the table.
fib_node_t fp_node
A path is a node in the FIB graph.
u8 * format_bier_table_id(u8 *s, va_list *ap)
Format a BIER table ID.
Context passed between object during a back walk.
@ FIB_SOURCE_RR
Recursive resolution source.
@ FIB_ROUTE_PATH_DROP
A Drop path - resolve the path on the drop DPO.
@ FIB_PATH_CFG_FLAG_GLEAN
static uword vnet_sw_interface_is_up(vnet_main_t *vnm, u32 sw_if_index)
void ip_null_dpo_add_and_lock(dpo_proto_t proto, ip_null_dpo_action_t action, dpo_id_t *dpo)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
static const char * fib_path_type_names[]
u32 mpls_label_t
A label value only, i.e.
static fib_node_t * fib_path_get_node(fib_node_index_t index)
u8 frp_preference
A path preference.
int fib_path_cmp_w_route_path(fib_node_index_t path_index, const fib_route_path_t *rpath)
u32 frp_udp_encap_id
UDP encap ID.
@ FIB_ROUTE_PATH_EXCLUSIVE
Don't resolve the path, use the DPO the client provides.
void fib_node_deinit(fib_node_t *node)
dpo_id_t path_dpo
ID of the Data-path object.
@ FIB_ROUTE_PATH_BIER_IMP
A path that resolves via a BIER impostion object.
struct fib_path_t_::@301::@306 attached
int adj_recursive_loop_detect(adj_index_t ai, fib_node_index_t **entry_indicies)
descend the FIB graph looking for loops
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP6
Contribute an object that is to be used to forward IP6 packets.
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_back_walk(fib_node_index_t path_list_index, fib_node_back_walk_ctx_t *ctx)
@ FIB_ROUTE_PATH_BIER_FMASK
A path that resolves via a BIER F-Mask.
u16 fib_path_get_weight(fib_node_index_t path_index)
static vlib_cli_command_t show_fib_path
(constructor) VLIB_CLI_COMMAND (show_fib_path)
fib_node_index_t fib_table_entry_special_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags)
Add a 'special' entry to the FIB.
enum mpls_eos_bit_t_ mpls_eos_bit_t
dpo_proto_t fp_nh_proto
The protocol of the next-hop, i.e.
static fib_path_t * fib_path_pool
void fib_entry_child_remove(fib_node_index_t fib_entry_index, u32 sibling_index)
void bier_disp_table_contribute_forwarding(index_t bdti, dpo_id_t *dpo)
static void fib_path_attached_next_hop_set(fib_path_t *path)
enum fib_path_cfg_flags_t_ fib_path_cfg_flags_t
Path config flags from the attributes.
format_function_t format_mpls_unicast_label
void bier_fmask_child_remove(fib_node_index_t bfmi, u32 sibling_index)
@ FIB_PATH_OPER_ATTRIBUTE_RECURSIVE_LOOP
The path forms part of a recursive loop.
static fib_node_back_walk_rc_t fib_path_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
One path from an [EU]CMP set that the client wants to add to a load-balance object.
void lookup_dpo_add_or_lock_w_fib_index(fib_node_index_t fib_index, dpo_proto_t proto, lookup_cast_t cast, lookup_input_t input, lookup_table_t table_config, dpo_id_t *dpo)
mpls_label_t frp_local_label
The MPLS local Label to reursively resolve through.
void udp_encap_lock(index_t uei)
#define FOR_EACH_FIB_PATH_OPER_ATTRIBUTE(_item)
int fib_path_recursive_loop_detect(fib_node_index_t path_index, fib_node_index_t **entry_indicies)
enum fib_path_oper_attribute_t_ fib_path_oper_attribute_t
Enurmeration of path operational (i.e.
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
fib_prefix_t frp_connected
Glean prefix on a glean path.
u8 * format_fib_node_bw_reason(u8 *s, va_list *args)
uword fib_path_hash(fib_node_index_t path_index)
Aggregate type for a prefix.
fib_source_t fib_entry_get_best_source(fib_node_index_t entry_index)
@ FIB_ROUTE_PATH_LOCAL
A for-us/local path.
@ FIB_PATH_TYPE_BIER_FMASK
bier-fmask.
mpls_label_t fp_local_label
The local label to resolve through.
mpls_eos_bit_t fp_eos
The EOS bit of the resolving label.
format_function_t format_vnet_sw_interface_name
@ FIB_PATH_TYPE_ATTACHED
attached.
fib_node_index_t fp_via_fib
the resolving via fib.
vl_api_wireguard_peer_flags_t flags