|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
61 .ip4.data_u32 = 0xf0000000,
77 .ip4.data_u32 = 0xe0000000,
92 .ip4.data_u32 = 0xffffffff,
114 prefix.fp_addr.ip4.data_u32 =
115 clib_host_to_net_u32(
prefix.fp_addr.ip4.data_u32);
137 prefix.fp_addr.ip4.data_u32 =
138 clib_host_to_net_u32(
prefix.fp_addr.ip4.data_u32);
287 .ifsw_indicies = NULL,
324 s =
format(s,
"%=30s %=6d\n",
336 u64 total_mtrie_memory, total_hash_memory;
337 int verbose, matching, mtrie,
memory;
339 u32 fib_index, matching_mask = 32;
340 int i,
table_id = -1, user_fib_index = ~0;
344 matching = mtrie =
memory = 0;
345 total_hash_memory = total_mtrie_memory = 0;
372 else if (
unformat (input,
"index %d", &user_fib_index))
387 if (user_fib_index != ~0 && user_fib_index != fib_index)
392 uword mtrie_size, hash_size;
413 total_mtrie_memory += mtrie_size;
414 total_hash_memory += hash_size;
418 s =
format(s,
"%U, fib_index:%d, flow hash:[%U] epoch:%d flags:%U locks:[",
428 if (0 != fib_table->
ft_locks[source])
465 matching_mask, detail);
474 total_mtrie_memory + total_hash_memory);
625 .path =
"show ip fib",
626 .short_help =
"show ip fib [summary] [table <table-id>] [index <fib-id>] [<ip4-addr>[/<mask>]] [mtrie] [detail]",
u32 ip4_fib_table_find_or_create_and_lock(u32 table_id, fib_source_t src)
Get or create an IPv4 fib.
#define hash_set(h, key, value)
static clib_error_t * ip4_show_fib(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
ip4_main_t ip4_main
Global ip4 main structure.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
int fib_entry_cmp_for_sort(void *i1, void *i2)
#define FIB_ENTRY_FORMAT_DETAIL
ip4_fib_hash_t hash
The hash table DB.
u32 ft_epoch
Epoch - number of resyncs performed.
#define FIB_ENTRY_FORMAT_DETAIL2
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P with alignment A.
__clib_export uword hash_bytes(void *v)
ip4_mtrie_8_t mtrie
Mtrie for fast lookups.
void ip4_fib_hash_load_specials(u32 fib_index)
void fib_table_assert_empty(const fib_table_t *fib_table)
Debug function.
u8 * format_ip_flow_hash_config(u8 *s, va_list *args)
u8 * format_fib_table_name(u8 *s, va_list *ap)
Format the description/name of the table.
static uword hash_elts(void *v)
uword * fib_index_by_table_id
Hash table mapping table id to fib index.
#define pool_put(P, E)
Free an object E in pool P.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u32 ip4_fib_table_create_and_lock(fib_source_t src)
#define ip4_fib_table_walk
static vlib_cli_command_t ip4_show_fib_command
(constructor) VLIB_CLI_COMMAND (ip4_show_fib_command)
#define hash_unset(h, key)
u32 * fib_index_by_sw_if_index
Table index indexed by software interface.
static void ip4_fib_table_show_all(ip4_fib_t *fib, vlib_main_t *vm)
A protocol Independent FIB table.
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.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
enum fib_entry_flag_t_ fib_entry_flag_t
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
fib_node_index_t ft_index
Index into FIB vector.
struct ip4_fib_table_special_prefix_t_ ip4_fib_table_special_prefix_t
vhost_user_memory_t memory
u32 ft_table_id
Table ID (hash key) for this FIB.
u32 ft_total_route_counts
Total route counters.
fib_node_index_t * ifsw_indicies
u32 * ft_locks
per-source number of locks on the table
u8 * format_fib_source(u8 *s, va_list *args)
#define IP_FLOW_HASH_DEFAULT
Default: 5-tuple + flowlabel without the "reverse" bit.
#define ip4_fib_table_free
u32 fib_node_index_t
A typedef of a node index.
#define vec_foreach_index(var, v)
Iterate over vector indices.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
fib_table_flags_t ft_flags
Table flags.
manual_print typedef address
#define VLIB_CLI_COMMAND(x,...)
static const ip4_fib_table_special_prefix_t ip4_specials[]
#define ip4_fib_table_init
#define CLIB_CACHE_LINE_BYTES
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
void ip4_fib_table_destroy(u32 fib_index)
#define ip4_mtrie_memory_usage
fib_entry_flag_t ift_flag
#define vec_free(V)
Free vector's memory (no header).
u8 * format_ip4_fib_table_memory(u8 *s, va_list *args)
u32 ft_flow_hash_config
flow hash configuration
#define pool_foreach_index(i, v)
description fragment has unexpected format
@ FIB_SOURCE_DEFAULT_ROUTE
The default route source.
void ip4_fib_hash_flush_specials(u32 fib_index)
void fib_table_lock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Release a reference counting lock on the table.
u32 ip4_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
enum fib_table_walk_rc_t_ fib_table_walk_rc_t
return code controlling how a table walk proceeds
struct fib_table_t_ * fibs
Vector of FIBs.
#define ip4_fib_table_lookup
#define vec_foreach(var, vec)
Vector iterator.
uword * fib_entry_by_dst_address[33]
static fib_table_walk_rc_t ip4_fib_show_walk_cb(fib_node_index_t fib_entry_index, void *arg)
static uword pool_elts(void *v)
Number of active elements in a pool.
#define FIB_ENTRY_FORMAT_BRIEF
@ FIB_SOURCE_SPECIAL
Special sources.
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
static u32 ip4_fib_index_from_table_id(u32 table_id)
@ FIB_TABLE_WALK_CONTINUE
Continue on to the next entry.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u8 * format_fib_table_flags(u8 *s, va_list *args)
enum fib_source_t_ fib_source_t
The different sources that can create a route.
static void ip4_fib_table_show_one(ip4_fib_t *fib, vlib_main_t *vm, ip4_address_t *address, u32 mask_len, int detail)
fib_protocol_t ft_proto
Which protocol this table serves.
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.
u32 * ft_src_route_counts
Per-source route counters.
vl_api_interface_index_t sw_if_index
Aggregate type for a prefix.
struct ip4_fib_show_walk_ctx_t_ ip4_fib_show_walk_ctx_t
Walk show context.
static u32 ip4_create_fib_with_table_id(u32 table_id, fib_source_t src)
u8 * format_fib_entry(u8 *s, va_list *args)