|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
50 return format (s,
"SRv6-AM-rewrite: src %U dst %U",
62 #define foreach_srv6_am_rewrite_counter \
63 _(PROCESSED, "srv6-am rewritten packets") \
64 _(NO_SRH, "(Error) No SRH.")
68 #define _(sym,str) SRV6_AM_REWRITE_COUNTER_##sym,
75 #define _(sym,string) string,
109 ip6_address_t *new_dst0;
128 new_dst0 = (ip6_address_t *) (sr0->
segments);
205 n_left_to_next, bi0, next0);
213 return frame->n_vectors;
219 .name =
"srv6-am-localsid",
220 .vector_size =
sizeof (
u32),
245 b0->
error =
node->errors[SRV6_AM_REWRITE_COUNTER_NO_SRH];
253 ip6_address_t *new_dst0;
310 sizeof tr->
src.as_u8);
312 sizeof tr->
dst.as_u8);
316 n_left_to_next, bi0, next0);
326 SRV6_AM_REWRITE_COUNTER_PROCESSED,
329 return frame->n_vectors;
335 .name =
"srv6-am-rewrite",
336 .vector_size =
sizeof (
u32),
vlib_combined_counter_main_t sr_ls_valid_counters
@ SRV6_AM_LOCALSID_NEXT_ERROR
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
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.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
@ SRV6_AM_LOCALSID_N_NEXT
@ VLIB_NODE_TYPE_INTERNAL
vlib_main_t vlib_node_runtime_t * node
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
vlib_combined_counter_main_t sr_ls_invalid_counters
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define foreach_srv6_am_rewrite_counter
static uword srv6_am_localsid_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Graph node for applying SRv6 masquerading.
static_always_inline void end_am_processing(vlib_buffer_t *b0, ip6_header_t *ip0, ip6_sr_header_t *sr0, ip6_sr_localsid_t *ls0, u32 *next0)
SRv6 masquerading.
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static uword srv6_am_rewrite_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Graph node for applying SRv6 de-masquerading.
#define static_always_inline
@ SRV6_AM_LOCALSID_NEXT_REWRITE
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
@ SRV6_AM_REWRITE_NEXT_ERROR
struct _vlib_node_registration vlib_node_registration_t
u32 nh_adj
Next_adj for xconnect usage only.
ip6_sr_localsid_t * localsids
static u8 * format_srv6_am_localsid_trace(u8 *s, va_list *args)
Segment Routing main datastructure.
#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.
vlib_node_registration_t srv6_am_rewrite_node
(constructor) VLIB_REGISTER_NODE (srv6_am_rewrite_node)
@ SRV6_AM_REWRITE_N_COUNTERS
description fragment has unexpected format
static u8 * format_srv6_am_rewrite_trace(u8 *s, va_list *args)
vlib_put_next_frame(vm, node, next_index, 0)
@ SRV6_AM_REWRITE_NEXT_LOOKUP
#define ROUTING_HEADER_TYPE_SR
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.
static_always_inline void end_am_rewriting(vlib_node_runtime_t *node, vlib_buffer_t *b0, ip6_header_t *ip0, ip6_sr_header_t *sr0, u32 *next0)
SRv6 de-masquerading.
static char * srv6_am_rewrite_counter_strings[]
vlib_node_registration_t srv6_am_localsid_node
(constructor) VLIB_REGISTER_NODE (srv6_am_localsid_node)
#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
vlib_increment_combined_counter(ccm, ti, sw_if_index, n_buffers, n_bytes)
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,...)