33 s =
format (s,
"INACL: sw_if_index %d, next_index %d, table %d, offset %d",
41 #define foreach_ip_inacl_error \ 42 _(MISS, "input ACL misses") \ 43 _(HIT, "input ACL hits") \ 44 _(CHAIN_HIT, "input ACL hits after chain walk") 47 #define _(sym,str) IP_INACL_ERROR_##sym, 54 #define _(sym,string) string, 64 u32 n_left_from, * from, * to_next;
94 while (n_left_from > 2)
99 u32 sw_if_index0, sw_if_index1;
100 u32 table_index0, table_index1;
144 vnet_buffer(b0)->l2_classify.table_index = table_index0;
146 vnet_buffer(b1)->l2_classify.table_index = table_index1;
152 while (n_left_from > 0)
172 vnet_buffer(b0)->l2_classify.table_index = table_index0;
183 while (n_left_from > 0)
188 to_next, n_left_to_next);
191 while (n_left_from > 0 && n_left_to_next > 0)
198 vnet_classify_entry_t * e0;
211 table_index1 =
vnet_buffer(p1)->l2_classify.table_index;
231 table_index0 =
vnet_buffer(b0)->l2_classify.table_index;
254 next0 = (e0->next_index < n_next_nodes)?
255 e0->next_index:next0;
261 IP4_ERROR_INACL_SESSION_DENY:IP4_ERROR_NONE;
264 IP6_ERROR_INACL_SESSION_DENY:IP6_ERROR_NONE;
283 IP4_ERROR_INACL_TABLE_MISS:IP4_ERROR_NONE;
286 IP6_ERROR_INACL_TABLE_MISS:IP6_ERROR_NONE;
293 (t0, (
u8 *) h0, hash0, now);
299 next0 = (e0->next_index < n_next_nodes)?
300 e0->next_index:next0;
306 IP4_ERROR_INACL_SESSION_DENY:IP4_ERROR_NONE;
309 IP6_ERROR_INACL_SESSION_DENY:IP6_ERROR_NONE;
330 to_next, n_left_to_next,
344 IP_INACL_ERROR_CHAIN_HIT,
361 .vector_size =
sizeof (
u32),
384 .vector_size =
sizeof (
u32),
u64 vnet_classify_hash_packet(vnet_classify_table_t *t, u8 *h)
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
u32 * classify_table_index_by_sw_if_index[INPUT_ACL_N_TABLES]
struct _vlib_node_registration vlib_node_registration_t
vnet_classify_main_t * vnet_classify_main
#define VLIB_INIT_FUNCTION(x)
static void vnet_classify_prefetch_bucket(vnet_classify_table_t *t, u64 hash)
always_inline void * vlib_frame_vector_args(vlib_frame_t *f)
static void vnet_classify_prefetch_entry(vnet_classify_table_t *t, u64 hash)
#define pool_elt_at_index(p, i)
vlib_node_registration_t ip4_input_node
(constructor) VLIB_REGISTER_NODE (ip4_input_node)
vlib_node_registration_t ip6_input_node
(constructor) VLIB_REGISTER_NODE (ip6_input_node)
always_inline void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
vnet_config_main_t * vnet_config_main[INPUT_ACL_N_TABLES]
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
static uword vnet_classify_get_offset(vnet_classify_table_t *t, vnet_classify_entry_t *v)
#define CLIB_PREFETCH(addr, size, type)
struct _vnet_classify_main vnet_classify_main_t
#define VLIB_NODE_FLAG_TRACE
#define VLIB_BUFFER_IS_TRACED
always_inline void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
always_inline void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define VLIB_REGISTER_NODE(x,...)
always_inline vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
always_inline f64 vlib_time_now(vlib_main_t *vm)
#define CLIB_CACHE_LINE_BYTES
always_inline void * vnet_get_config_data(vnet_config_main_t *cm, u32 *config_index, u32 *next_index, u32 n_data_bytes)
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
always_inline vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
vnet_classify_entry_t * vnet_classify_find_entry(vnet_classify_table_t *t, u8 *h, u64 hash, f64 now)