|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
64 s =
format (s,
"%s: sw_if_index %d, next_index %d, table %d, offset %d",
65 is_output ?
"OUTACL" :
"INACL",
84 #ifndef CLIB_MARCH_VARIANT
91 #define foreach_l2_inacl_error \
92 _(NONE, "valid input ACL packets") \
93 _(MISS, "input ACL misses") \
94 _(HIT, "input ACL hits") \
95 _(CHAIN_HIT, "input ACL hits after chain walk") \
96 _(TABLE_MISS, "input ACL table-miss drops") \
97 _(SESSION_DENY, "input ACL session deny drops")
99 #define foreach_l2_outacl_error \
100 _(NONE, "valid output ACL packets") \
101 _(MISS, "output ACL misses") \
102 _(HIT, "output ACL hits") \
103 _(CHAIN_HIT, "output ACL hits after chain walk") \
104 _(TABLE_MISS, "output ACL table-miss drops") \
105 _(SESSION_DENY, "output ACL session deny drops")
110 #define _(sym,str) L2_INACL_ERROR_##sym,
117 #define _(sym,string) string,
124 #define _(sym,str) L2_OUTACL_ERROR_##sym,
131 #define _(sym,string) string,
163 u32 sw_if_index0, sw_if_index1;
164 u32 table_index0, table_index1;
189 am->classify_table_index_by_sw_if_index[is_output][tid][sw_if_index0];
194 am->classify_table_index_by_sw_if_index[is_output][tid][sw_if_index1];
220 vnet_buffer (b0)->l2_classify.table_index = table_index0;
222 vnet_buffer (b1)->l2_classify.table_index = table_index1;
243 am->classify_table_index_by_sw_if_index[is_output][tid][sw_if_index0];
255 vnet_buffer (b0)->l2_classify.table_index = table_index0;
293 table_index1 =
vnet_buffer (p1)->l2_classify.table_index;
313 table_index0 =
vnet_buffer (b0)->l2_classify.table_index;
322 is_output ? L2OUTPUT_FEAT_ACL :
345 e0->next_index : next0;
351 L2_OUTACL_ERROR_SESSION_DENY : L2_INACL_ERROR_NONE;
354 L2_OUTACL_ERROR_SESSION_DENY : L2_OUTACL_ERROR_NONE;
375 L2_OUTACL_ERROR_TABLE_MISS :
376 L2_OUTACL_ERROR_NONE;
379 L2_INACL_ERROR_TABLE_MISS : L2_INACL_ERROR_NONE;
394 (t0, (
u8 *) h0, hash0,
now);
399 e0->next_index : next0;
405 L2_OUTACL_ERROR_SESSION_DENY :
406 L2_OUTACL_ERROR_NONE;
409 L2_INACL_ERROR_SESSION_DENY :
419 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
432 to_next, n_left_to_next,
440 is_output ? L2_OUTACL_ERROR_MISS :
441 L2_INACL_ERROR_MISS, misses);
443 is_output ? L2_OUTACL_ERROR_HIT :
444 L2_INACL_ERROR_HIT, hits);
446 is_output ? L2_OUTACL_ERROR_CHAIN_HIT :
447 L2_INACL_ERROR_CHAIN_HIT, chain_hits);
448 return frame->n_vectors;
469 .name =
"l2-input-acl",
470 .vector_size =
sizeof (
u32),
486 .name =
"l2-output-acl",
487 .vector_size =
sizeof (
u32),
504 #ifndef CLIB_MARCH_VARIANT
@ CLASSIFY_FLAG_USE_CURR_DATA
struct _vnet_classify_entry vnet_classify_entry_t
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
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.
#define foreach_l2_inacl_error
@ 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 u8 * format_l2_inacl_trace(u8 *s, va_list *args)
vnet_classify_entry_t * vnet_classify_find_entry(vnet_classify_table_t *t, u8 *h, u64 hash, f64 now)
@ IN_OUT_ACL_INPUT_TABLE_GROUP
static char * l2_inacl_error_strings[]
#define CLIB_PREFETCH(addr, size, type)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define VLIB_NODE_FN(node)
#define foreach_l2_outacl_error
static uword l2_in_out_acl_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_output)
char ** l2output_get_feat_names(void)
l2_in_out_acl_main_t l2_in_out_acl_main
vnet_main_t * vnet_get_main(void)
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static void vnet_classify_prefetch_entry(vnet_classify_table_t *t, u64 hash)
if(node->flags &VLIB_NODE_FLAG_TRACE) vnet_interface_output_trace(vm
static void vnet_classify_prefetch_bucket(vnet_classify_table_t *t, u64 hash)
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
static char * l2_outacl_error_strings[]
@ IN_OUT_ACL_OUTPUT_TABLE_GROUP
#define CLIB_CACHE_LINE_BYTES
struct _vlib_node_registration vlib_node_registration_t
vlib_node_registration_t l2_outacl_node
(constructor) VLIB_REGISTER_NODE (l2_outacl_node)
static u32 vnet_l2_feature_next(vlib_buffer_t *b, u32 *next_nodes, u32 feat_bit)
Return the graph node index for the feature corresponding to the next set bit after clearing the curr...
#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)
#define VLIB_INIT_FUNCTION(x)
vlib_node_registration_t l2_inacl_node
(constructor) VLIB_REGISTER_NODE (l2_inacl_node)
struct _vnet_classify_main vnet_classify_main_t
u64 vnet_classify_hash_packet(vnet_classify_table_t *t, u8 *h)
static uword vnet_classify_get_offset(vnet_classify_table_t *t, vnet_classify_entry_t *v)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static u8 * format_l2_outacl_trace(u8 *s, va_list *args)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
clib_error_t * l2_in_out_acl_init(vlib_main_t *vm)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
@ IN_OUT_ACL_N_TABLE_GROUPS
u32 feat_next_node_index[IN_OUT_ACL_N_TABLE_GROUPS][32]
static f64 vlib_time_now(vlib_main_t *vm)
vnet_classify_flags_t current_data_flag
in_out_acl_main_t in_out_acl_main
#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).
static u8 * format_l2_in_out_acl_trace(u8 *s, u32 is_output, va_list *args)
static void feat_bitmap_init_next_nodes(vlib_main_t *vm, u32 node_index, u32 num_features, char **feat_names, u32 *next_nodes)
Initialize the feature next-node indexes of a graph node.
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,...)