37 s =
format(s,
"uPRF-list:%d len:%d itfs:[",
42 s =
format(s,
"%d, ", *swi);
48 s =
format(s,
"uRPF-list: None");
64 return (urpf - fib_urpf_list_pool);
235 .path =
"show fib uRPF",
237 .short_help =
"show fib uRPF",
static int fib_urpf_itf_cmp_for_sort(void *v1, void *v2)
Sort the interface indicies.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
void fib_urpf_list_show_mem(void)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define pool_len(p)
Number of elements in pool vector.
index_t fib_urpf_list_alloc_and_lock(void)
void fib_urpf_list_lock(index_t ui)
static fib_urpf_list_t * fib_urpf_list_get(index_t 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.
adj_index_t * furpf_itfs
The list of interfaces that comprise the allowed accepting interfaces.
void fib_urpf_list_append(index_t ui, u32 sw_if_index)
Append another interface to the list.
fib_urpf_list_flag_t furpf_flags
flags
Set to indicated that the uRPF list has already been baked.
static clib_error_t * show_fib_urpf_list_command(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define pool_put(P, E)
Free an object E in pool P.
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
void fib_urpf_list_bake(index_t ui)
Convert the uRPF list from the itf set obtained during the walk to a unique list. ...
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
u32 adj_index_t
An index for adjacencies.
#define VLIB_CLI_COMMAND(x,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
void fib_urpf_list_combine(index_t ui1, index_t ui2)
Combine to interface lists.
#define vec_append(v1, v2)
Append v2 after v1.
fib_urpf_list_t * fib_urpf_list_pool
pool of all fib_urpf_list
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
u8 * format_fib_urpf_list(u8 *s, va_list *args)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
u32 furpf_locks
uRPF lists are shared amongst many entries so we require a locking mechanism.
void fib_urpf_list_unlock(index_t ui)
#define vec_foreach(var, vec)
Vector iterator.
#define pool_foreach_index(i, v, body)
Iterate pool by index.
vl_api_interface_index_t sw_if_index
static uword pool_elts(void *v)
Number of active elements in a pool.