|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
65 s =
format (s,
"CACHE: flow_label %d, next index %d",
70 #define foreach_cache_error \
71 _(RECORDED, "ip6 iOAM headers cached")
75 #define _(sym,str) CACHE_ERROR_##sym,
82 #define _(sym,string) string,
131 if (IP_PROTOCOL_TCP ==
145 (tcp0->dst_port), hbh0,
147 (tcp0->seq_number) + 1))
155 if (p0->
flags & VLIB_BUFFER_IS_TRACED)
167 to_next, n_left_to_next,
175 CACHE_ERROR_RECORDED, recorded);
176 return frame->n_vectors;
186 .name =
"ip6-ioam-cache",
187 .vector_size =
sizeof (
u32),
220 #define foreach_ip6_add_from_cache_hbh_error \
221 _(PROCESSED, "Pkts w/ added ip6 hop-by-hop options")
225 #define _(sym,str) IP6_ADD_FROM_CACHE_HBH_ERROR_##sym,
232 #define _(sym,string) string,
237 #define foreach_ip6_ioam_cache_input_next \
238 _(IP6_LOOKUP, "ip6-lookup") \
239 _(DROP, "error-drop")
243 #define _(s,n) IP6_IOAM_CACHE_INPUT_NEXT_##s,
280 u64 *copy_src0, *copy_dst0;
286 next0 = IP6_IOAM_CACHE_INPUT_NEXT_IP6_LOOKUP;
298 if (IP_PROTOCOL_TCP !=
314 (tcp0->ack_number))))
321 next0 = IP6_IOAM_CACHE_INPUT_NEXT_DROP;
330 copy_dst0 = (
u64 *) (((
u8 *) ip0) - (rewrite_len + sr_rewrite_len));
331 copy_src0 = (
u64 *) ip0;
333 copy_dst0[0] = copy_src0[0];
334 copy_dst0[1] = copy_src0[1];
335 copy_dst0[2] = copy_src0[2];
336 copy_dst0[3] = copy_src0[3];
337 copy_dst0[4] = copy_src0[4];
348 sizeof (ip6_address_t));
351 sizeof (ip6_address_t));
354 sizeof (ip6_address_t));
362 clib_net_to_host_u16 (ip0->payload_length) + rewrite_len +
364 ip0->payload_length = clib_host_to_net_u16 (new_l0);
368 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
377 to_next, n_left_to_next,
385 IP6_ADD_FROM_CACHE_HBH_ERROR_PROCESSED,
387 return frame->n_vectors;
392 .name =
"ip6-add-from-cache-hop-by-hop",
393 .vector_size =
sizeof (
u32),
402 #define _(s,n) [IP6_IOAM_CACHE_INPUT_NEXT_##s] = n,
#define foreach_cache_error
static ioam_cache_entry_t * ioam_cache_lookup(ip6_header_t *ip0, u16 src_port, u16 dst_port, u32 seq_no)
ioam_cache_main_t ioam_cache_main
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static char * ip6_add_from_cache_hbh_error_strings[]
@ IOAM_CACHE_NEXT_POP_HBYH
nat44_ei_hairpin_src_next_t next_index
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static char * cache_error_strings[]
struct _tcp_header tcp_header_t
@ VLIB_NODE_TYPE_INTERNAL
vlib_main_t vlib_node_runtime_t * node
#define IPPROTO_IPV6_ROUTE
#define foreach_ip6_ioam_cache_input_next
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 foreach_ip6_add_from_cache_hbh_error
ip6_add_from_cache_hbh_error_t
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define VLIB_NODE_FN(node)
static u8 * format_ip6_add_from_cache_hbh_trace(u8 *s, va_list *args)
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static u8 * format_cache_trace(u8 *s, va_list *args)
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
vnet_feature_config_main_t * cm
static int ip6_locate_header(vlib_buffer_t *p0, ip6_header_t *ip0, int find_hdr_type, u32 *offset)
ip6_ioam_cache_input_next_t
static int ioam_cache_add(vlib_buffer_t *b0, ip6_header_t *ip0, u16 src_port, u16 dst_port, ip6_hop_by_hop_header_t *hbh0, u32 seq_no)
struct _vlib_node_registration vlib_node_registration_t
ip_lookup_next_t
An adjacency is a representation of an attached L3 peer.
static uword ip6_ioam_cache_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
vlib_node_registration_t ip6_add_from_cache_hbh_node
(constructor) VLIB_REGISTER_NODE (ip6_add_from_cache_hbh_node)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
static void ioam_cache_entry_free(ioam_cache_entry_t *entry)
vlib_node_registration_t ioam_cache_node
(constructor) VLIB_REGISTER_NODE (ioam_cache_node)
@ IP6_ADD_FROM_CACHE_HBH_N_ERROR
@ IP6_IOAM_CACHE_INPUT_N_NEXT
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
vl_api_fib_path_type_t type
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)