|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
28 BVT (clib_bihash) lcp_adj_tbl;
33 lcp_adj_mk_key (adj->rewrite_header.data, adj->rewrite_header.data_bytes,
34 adj->rewrite_header.sw_if_index,
key);
40 return (
format (s,
"lcp"));
51 lcp_adj_mk_key_adj (adj, &kv.
k);
75 u8 save_adj, key_changed;
86 if (!adj_key && !save_adj)
92 lcp_adj_mk_key_adj (adj, &kv.
k);
95 key_changed = (
clib_memcmp (adj_key, &kv.
k, sizeof (*adj_key)) != 0);
99 if (adj_key && ((save_adj && key_changed) || (!save_adj)))
141 lcp_adj_mk_key_adj (adj, &kv.
k);
156 BVT (clib_bihash_kv) *kv = va_arg (*args,
BVT (clib_bihash_kv) *);
183 .path =
"show lcp adj",
185 .short_help =
"show lcp adj",
static void lcp_adj_delegate_adj_deleted(adj_delegate_t *aed)
index_t ad_index
The index passed by the provider to identify its delegate instance.
An ADJ delegate virtual function table.
static_always_inline void lcp_adj_mk_key(const u8 *rewrite, u8 len, u32 sw_if_index, lcp_adj_key_t *key)
static vlib_cli_command_t lcp_itf_pair_show_cmd_node
(constructor) VLIB_CLI_COMMAND (lcp_itf_pair_show_cmd_node)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define clib_memcmp(s1, s2, m1)
u8 * format_lcp_adj_kvp(u8 *s, va_list *args)
static void lcp_adj_delegate_adj_modified(adj_delegate_t *aed)
#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.
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
#define pool_put_index(p, i)
Free pool element with given index.
static clib_error_t * lcp_adj_show_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int adj_delegate_add(ip_adjacency_t *adj, adj_delegate_type_t adt, index_t adi)
Add a delegate to an adjacency.
void clib_bihash_init(clib_bihash *h, char *name, u32 nbuckets, uword memory_size)
initialize a bounded index extensible hash table
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
enum adj_delegate_type_t_ adj_delegate_type_t
A Delagate is a means to implement the Delagation design pattern; the extension of an object's functi...
vnet_main_t * vnet_get_main(void)
adj_index_t ad_adj_index
The ADJ entry object to which the delagate is attached.
static clib_error_t * lcp_adj_init(vlib_main_t *vm)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define static_always_inline
@ IP_LOOKUP_NEXT_REWRITE
This packet is to be rewritten and forwarded to the next processing node.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
adj_delegate_type_t adj_delegate_register_new_type(const adj_delegate_vft_t *vft)
adj_delegate_register_new_type
#define VLIB_CLI_COMMAND(x,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
BVT(clib_bihash)
The table of adjacencies indexed by the rewrite string.
format_function_t format_vnet_sw_if_index_name
description fragment has unexpected format
static void lcp_adj_delegate_adj_created(adj_index_t ai)
#define VLIB_INIT_FUNCTION(x)
int clib_bihash_add_del(clib_bihash *h, clib_bihash_kv *add_v, int is_add)
Add or delete a (key,value) pair from a bi-hash table.
u32 adj_index_t
An index for adjacencies.
const adj_delegate_vft_t lcp_adj_vft
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static u8 * lcp_adj_delegate_format(const adj_delegate_t *aed, u8 *s)
static adj_delegate_type_t adj_type
static lcp_adj_key_t * adj_keys
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
u8 * format_adj_nbr(u8 *s, va_list *ap)
Format a neigbour (REWRITE) adjacency.
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
adj_delegate_format_t adv_format