|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
26 #include <vpp/app/version.h>
35 int add_options (
u8 * opt,
38 nsh_tlv_header_t * opt),
40 nsh_tlv_header_t * old_opt,
41 nsh_tlv_header_t * new_opt),
43 nsh_tlv_header_t * opt),
44 u8 *
trace (
u8 * s, nsh_tlv_header_t * opt))
65 nsh_option->
option_id = nsh_option -
nm->nsh_option_mappings;
70 nsh_option -
nm->nsh_option_mappings);
76 nm->options_size[nsh_option->
option_id] = option_size;
77 nm->add_options[nsh_option->
option_id] = add_options;
79 nm->swap_options[nsh_option->
option_id] = swap_options;
80 nm->pop_options[nsh_option->
option_id] = pop_options;
114 nsh_tlv_header_t * opt),
115 u8 *
trace (
u8 * s, nsh_tlv_header_t * opt))
141 key_copy = (
void *) (hp->
key);
145 pool_put (
nm->nsh_option_mappings, nsh_option);
162 u32 dev_instance = va_arg (*args,
u32);
163 s =
format (s,
"unimplemented dev %u", dev_instance);
199 nm->nsh_mapping_by_mapped_key
204 nm->nsh_proxy_session_by_key
208 nm->nsh_option_map_by_key
216 nm->nsh_input_node_index =
node->index;
219 nm->nsh_proxy_node_index =
node->index;
222 nm->nsh_classifier_node_index =
node->index;
228 nm->nsh_input_node_index);
230 nm->nsh_proxy_node_index);
236 nm->nsh_input_node_index);
238 nm->nsh_proxy_node_index);
258 nm->nsh_classifier_node_index);
260 nm->nsh_classifier_node_index);
262 nm->nsh_classifier_node_index);
266 nm->nsh_input_node_index);
275 .version = VPP_BUILD_VER,
276 .description =
"Network Service Header (NSH)",
vlib_node_registration_t l2_input_classify_node
(constructor) VLIB_REGISTER_NODE (l2_input_classify_node)
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
clib_error_t * nsh_api_init(vlib_main_t *vm, nsh_main_t *nm)
static uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
vlib_node_registration_t ip6_classify_node
(constructor) VLIB_REGISTER_NODE (ip6_classify_node)
#define clib_memcpy(d, s, n)
static u8 * format_nsh_tunnel_with_length(u8 *s, va_list *args)
Formatting function for tracing VXLAN GPE with length.
vnet_hw_interface_class_t nsh_hw_class
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vlib_node_registration_t vxlan6_input_node
(constructor) VLIB_REGISTER_NODE (vxlan6_input_node)
#define MAX_NSH_OPTION_LEN
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P with alignment A.
static void clib_mem_free(void *p)
vlib_main_t vlib_node_runtime_t * node
#define hash_get_pair(h, key)
#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.
void nsh_md2_set_next_ioam_export_override(uword next)
VNET_HW_INTERFACE_CLASS(nsh_hw_class)
vlib_node_registration_t ip4_classify_node
(constructor) VLIB_REGISTER_NODE (ip4_classify_node)
vnet_main_t * vnet_get_main(void)
#define hash_create_mem(elts, key_bytes, value_bytes)
#define hash_set_mem(h, key, value)
vlib_node_registration_t vxlan4_input_node
(constructor) VLIB_REGISTER_NODE (vxlan4_input_node)
clib_error_t * nsh_init(vlib_main_t *vm)
nsh_option_map_t * nsh_md2_lookup_option(u16 class, u8 type)
#define CLIB_CACHE_LINE_BYTES
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
int nsh_md2_register_option(u16 class, u8 type, u8 option_size, int add_options(u8 *opt, u8 *opt_size), int options(vlib_buffer_t *b, nsh_tlv_header_t *opt), int swap_options(vlib_buffer_t *b, nsh_tlv_header_t *old_opt, nsh_tlv_header_t *new_opt), int pop_options(vlib_buffer_t *b, nsh_tlv_header_t *opt), u8 *trace(u8 *s, nsh_tlv_header_t *opt))
#define hash_get_mem(h, key)
description fragment has unexpected format
#define VLIB_INIT_FUNCTION(x)
int nsh_md2_unregister_option(u16 class, u8 type, int options(vlib_buffer_t *b, nsh_tlv_header_t *opt), u8 *trace(u8 *s, nsh_tlv_header_t *opt))
static struct option options[]
uword decap_v4_next_override
vlib_node_registration_t gre6_input_node
(constructor) VLIB_REGISTER_NODE (gre6_input_node)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
#define hash_unset_mem(h, key)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
void vxlan_gpe_register_decap_protocol(u8 protocol_id, uword next_node_index)
u8 * default_build_rewrite(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
Return a complete, zero-length (aka placeholder) rewrite.
@ VNET_HW_INTERFACE_CLASS_FLAG_P2P
a point 2 point interface
vlib_node_registration_t gre4_input_node
(constructor) VLIB_REGISTER_NODE (gre4_input_node)
vlib_node_registration_t nsh_aware_vnf_proxy_node
(constructor) VLIB_REGISTER_NODE (nsh_aware_vnf_proxy_node)
vlib_node_registration_t vxlan4_gpe_input_node
(constructor) VLIB_REGISTER_NODE (vxlan4_gpe_input_node)
static void * clib_mem_alloc(uword size)
vl_api_fib_path_type_t type
void ethernet_register_input_type(vlib_main_t *vm, ethernet_type_t type, u32 node_index)
vlib_node_registration_t vxlan6_gpe_input_node
(constructor) VLIB_REGISTER_NODE (vxlan6_gpe_input_node)
VLIB buffer representation.