36 s =
format (s,
"%s: sw_if_index %d, next_index %d, table %d, offset %d",
37 is_output ?
"OUTACL" :
"INACL",
59 #define foreach_ip_inacl_error \
60 _(MISS, "input ACL misses") \
61 _(HIT, "input ACL hits") \
62 _(CHAIN_HIT, "input ACL hits after chain walk")
64 #define foreach_ip_outacl_error \
65 _(MISS, "output ACL misses") \
66 _(HIT, "output ACL hits") \
67 _(CHAIN_HIT, "output ACL hits after chain walk")
71 #define _(sym,str) IP_INACL_ERROR_##sym,
79 #define _(sym,string) string,
86 #define _(sym,str) IP_OUTACL_ERROR_##sym,
94 #define _(sym,string) string,
121 n_next_nodes =
node->n_next_nodes;
143 am->classify_table_index_by_sw_if_index[is_output][tid]
146 am->classify_table_index_by_sw_if_index[is_output][tid]
185 vnet_buffer (
b[0])->l2_classify.table_index = table_index[2];
186 vnet_buffer (
b[1])->l2_classify.table_index = table_index[3];
211 table_index[0] = table_index[2];
212 table_index[1] = table_index[3];
236 am->classify_table_index_by_sw_if_index[is_output][tid]
239 am->classify_table_index_by_sw_if_index[is_output][tid]
280 vnet_buffer (
b[2])->l2_classify.table_index = table_index[2];
281 vnet_buffer (
b[3])->l2_classify.table_index = table_index[3];
309 = e[0]->opaque_index;
312 _next[0] = (e[0]->next_index < n_next_nodes) ?
319 (is_output ? IP4_ERROR_OUTACL_SESSION_DENY :
320 IP4_ERROR_INACL_SESSION_DENY) : IP4_ERROR_NONE;
323 (is_output ? IP6_ERROR_OUTACL_SESSION_DENY :
324 IP6_ERROR_INACL_SESSION_DENY) : IP6_ERROR_NONE;
347 t[0]->miss_next_index : _next[0];
353 (is_output ? IP4_ERROR_OUTACL_TABLE_MISS :
354 IP4_ERROR_INACL_TABLE_MISS) : IP4_ERROR_NONE;
357 (is_output ? IP6_ERROR_OUTACL_TABLE_MISS :
358 IP6_ERROR_INACL_TABLE_MISS) : IP6_ERROR_NONE;
382 = e[0]->opaque_index;
384 _next[0] = (e[0]->next_index < n_next_nodes) ?
391 (is_output ? IP4_ERROR_OUTACL_SESSION_DENY :
392 IP4_ERROR_INACL_SESSION_DENY) : IP4_ERROR_NONE;
395 (is_output ? IP6_ERROR_OUTACL_SESSION_DENY :
396 IP6_ERROR_INACL_SESSION_DENY) : IP6_ERROR_NONE;
425 = e[1]->opaque_index;
428 _next[1] = (e[1]->next_index < n_next_nodes) ?
435 (is_output ? IP4_ERROR_OUTACL_SESSION_DENY :
436 IP4_ERROR_INACL_SESSION_DENY) : IP4_ERROR_NONE;
439 (is_output ? IP6_ERROR_OUTACL_SESSION_DENY :
440 IP6_ERROR_INACL_SESSION_DENY) : IP6_ERROR_NONE;
463 t[1]->miss_next_index : _next[1];
469 (is_output ? IP4_ERROR_OUTACL_TABLE_MISS :
470 IP4_ERROR_INACL_TABLE_MISS) : IP4_ERROR_NONE;
473 (is_output ? IP6_ERROR_OUTACL_TABLE_MISS :
474 IP6_ERROR_INACL_TABLE_MISS) : IP6_ERROR_NONE;
498 = e[1]->opaque_index;
500 _next[1] = (e[1]->next_index < n_next_nodes) ?
507 (is_output ? IP4_ERROR_OUTACL_SESSION_DENY :
508 IP4_ERROR_INACL_SESSION_DENY) : IP4_ERROR_NONE;
511 (is_output ? IP6_ERROR_OUTACL_SESSION_DENY :
512 IP6_ERROR_INACL_SESSION_DENY) : IP6_ERROR_NONE;
534 if (do_trace &&
b[0]->
flags & VLIB_BUFFER_IS_TRACED)
546 if (do_trace &&
b[1]->
flags & VLIB_BUFFER_IS_TRACED)
593 am->classify_table_index_by_sw_if_index[is_output][tid][sw_if_index0];
615 vnet_buffer (
b[0])->l2_classify.table_index = table_index0;
641 vnet_buffer (
b[0])->l2_classify.opaque_index = e0->opaque_index;
644 next0 = (e0->next_index < n_next_nodes) ?
645 e0->next_index : next0;
651 (is_output ? IP4_ERROR_OUTACL_SESSION_DENY :
652 IP4_ERROR_INACL_SESSION_DENY) : IP4_ERROR_NONE;
655 (is_output ? IP6_ERROR_OUTACL_SESSION_DENY :
656 IP6_ERROR_INACL_SESSION_DENY) : IP6_ERROR_NONE;
684 (is_output ? IP4_ERROR_OUTACL_TABLE_MISS :
685 IP4_ERROR_INACL_TABLE_MISS) : IP4_ERROR_NONE;
688 (is_output ? IP6_ERROR_OUTACL_TABLE_MISS :
689 IP6_ERROR_INACL_TABLE_MISS) : IP6_ERROR_NONE;
707 (t0, (
u8 *) h0, hash0,
now);
713 next0 = (e0->next_index < n_next_nodes) ?
714 e0->next_index : next0;
719 (is_output ? IP4_ERROR_OUTACL_SESSION_DENY :
720 IP4_ERROR_INACL_SESSION_DENY) : IP4_ERROR_NONE;
723 (is_output ? IP6_ERROR_OUTACL_SESSION_DENY :
724 IP6_ERROR_INACL_SESSION_DENY) : IP6_ERROR_NONE;
745 if (do_trace &&
b[0]->
flags & VLIB_BUFFER_IS_TRACED)
771 is_output ? IP_OUTACL_ERROR_MISS :
772 IP_INACL_ERROR_MISS, misses);
774 is_output ? IP_OUTACL_ERROR_HIT :
775 IP_INACL_ERROR_HIT, hits);
777 is_output ? IP_OUTACL_ERROR_CHAIN_HIT :
778 IP_INACL_ERROR_CHAIN_HIT, chain_hits);
804 return frame->n_vectors;
829 return frame->n_vectors;
835 .vector_size =
sizeof (
u32),
847 .name =
"ip4-outacl",
848 .vector_size =
sizeof (
u32),
882 return frame->n_vectors;
907 return frame->n_vectors;
913 .vector_size =
sizeof (
u32),
925 .name =
"ip6-outacl",
926 .vector_size =
sizeof (
u32),
938 #ifndef CLIB_MARCH_VARIANT