|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
30 BVT (clib_bihash) lcp_adj_tbl;
35 lcp_adj_mk_key (adj->rewrite_header.data, adj->rewrite_header.data_bytes,
36 adj->rewrite_header.sw_if_index,
key);
42 return (
format (s,
"lcp"));
53 lcp_adj_mk_key_adj (adj, &kv.
k);
77 u8 save_adj, key_changed;
88 if (!adj_key && !save_adj)
94 lcp_adj_mk_key_adj (adj, &kv.
k);
97 key_changed = (
clib_memcmp (adj_key, &kv.
k, sizeof (*adj_key)) != 0);
101 if (adj_key && ((save_adj && key_changed) || (!save_adj)))
153 lcp_adj_mk_key_adj (adj, &kv.
k);
168 BVT (clib_bihash_kv) *kv = va_arg (*args,
BVT (clib_bihash_kv) *);
189 &lcp_adj_tbl, verbose);
195 .path =
"show lcp adj",
197 .short_help =
"show lcp adj",
213 BV (
clib_bihash_init) (&lcp_adj_tbl,
"linux-cp adjacencies", 1024, 1 << 24);
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)
lcp_itf_pair_t * lcp_itf_pair_get(u32 index)
Get an interface-pair object from its VPP index.
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,...)
lip_host_type_t lip_host_type
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 index_t lcp_itf_pair_find_by_phy(u32 phy_sw_if_index)
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