29 #ifndef CLIB_MARCH_VARIANT 39 s =
format (s,
"CT6_OUT2IN: sw_if_index %d, next index %d session %d\n",
48 #define foreach_ct6_out2in_error \ 49 _(PROCESSED, "ct6 packets processed") \ 50 _(NO_SESSION, "ct6 no session drops") 55 #define _(sym,str) CT6_OUT2IN_ERROR_##sym, 61 #ifndef CLIB_MARCH_VARIANT 63 #define _(sym,string) string, 80 u32 n_left_from, *from;
96 while (n_left_from >= 4)
119 if (b[0]->
flags & VLIB_BUFFER_IS_TRACED)
122 t->next_index = next[0];
125 if (b[1]->
flags & VLIB_BUFFER_IS_TRACED)
128 t->next_index = next[1];
131 if (b[2]->
flags & VLIB_BUFFER_IS_TRACED)
134 t->next_index = next[2];
137 if (b[3]->
flags & VLIB_BUFFER_IS_TRACED)
140 t->next_index = next[3];
151 while (n_left_from > 0)
154 ct6_session_key_t *key0;
156 u32 session_index0 = ~0;
185 key0 = (ct6_session_key_t *) & kvp0;
187 sizeof (ip6_address_t));
189 sizeof (ip6_address_t));
197 if (clib_bihash_search_48_8 (&cmp->
session_hash, &kvp0, &kvp0) < 0)
201 b[0]->
error = node->
errors[CT6_OUT2IN_ERROR_NO_SESSION];
208 session_index0 = kvp0.
value;
215 if (b[0]->
flags & VLIB_BUFFER_IS_TRACED)
233 CT6_OUT2IN_ERROR_PROCESSED, frame->
n_vectors);
235 CT6_OUT2IN_ERROR_NO_SESSION, dropped);
250 #ifndef CLIB_MARCH_VARIANT 253 .name =
"ct6-out2in",
254 .vector_size =
sizeof (
u32),
vl_api_wireguard_peer_flags_t flags
#define clib_memcpy_fast(a, b, c)
static f64 vlib_time_now(vlib_main_t *vm)
static char * ct6_out2in_error_strings[]
#define VLIB_NODE_FN(node)
vlib_error_t * errors
Vector of errors for this node.
ct6_session_t ** sessions
description fragment has unexpected format
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
vl_api_fib_path_type_t type
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u32 node_index
Node index.
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
static uword ct6_out2in_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_trace)
#define VLIB_REGISTER_NODE(x,...)
#define foreach_ct6_out2in_error
#define CLIB_PREFETCH(addr, size, type)
static_always_inline void vlib_buffer_enqueue_to_next(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 *nexts, uword count)
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
static void * ip6_next_header(ip6_header_t *i)
vlib_main_t vlib_node_runtime_t * node
static u8 * format_ct6_out2in_trace(u8 *s, va_list *args)
static void ct6_update_session_hit(ct6_main_t *cmp, ct6_session_t *s0, f64 now)
struct _vlib_node_registration vlib_node_registration_t
static uword ip6_address_is_global_unicast(const ip6_address_t *a)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
clib_bihash_48_8_t session_hash
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static_always_inline void vlib_get_buffers(vlib_main_t *vm, u32 *bi, vlib_buffer_t **b, int count)
Translate array of buffer indices into buffer pointers.
#define VLIB_NODE_FLAG_TRACE
#define CLIB_CACHE_LINE_BYTES
vlib_node_registration_t ct6_out2in_node
(constructor) VLIB_REGISTER_NODE (ct6_out2in_node)