25 #include <vpp/app/version.h> 44 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 50 #define vl_api_version(n,v) static u32 api_version=(v); 59 #define REPLY_MSG_ID_BASE am->msg_id_base 71 #define foreach_acl_plugin_api_msg \ 72 _(ACL_PLUGIN_GET_VERSION, acl_plugin_get_version) \ 73 _(ACL_PLUGIN_CONTROL_PING, acl_plugin_control_ping) \ 74 _(ACL_ADD_REPLACE, acl_add_replace) \ 76 _(ACL_INTERFACE_ADD_DEL, acl_interface_add_del) \ 77 _(ACL_INTERFACE_SET_ACL_LIST, acl_interface_set_acl_list) \ 78 _(ACL_DUMP, acl_dump) \ 79 _(ACL_INTERFACE_LIST_DUMP, acl_interface_list_dump) \ 80 _(MACIP_ACL_ADD, macip_acl_add) \ 81 _(MACIP_ACL_ADD_REPLACE, macip_acl_add_replace) \ 82 _(MACIP_ACL_DEL, macip_acl_del) \ 83 _(MACIP_ACL_INTERFACE_ADD_DEL, macip_acl_interface_add_del) \ 84 _(MACIP_ACL_DUMP, macip_acl_dump) \ 85 _(MACIP_ACL_INTERFACE_GET, macip_acl_interface_get) \ 86 _(MACIP_ACL_INTERFACE_LIST_DUMP, macip_acl_interface_list_dump) \ 87 _(ACL_INTERFACE_SET_ETYPE_WHITELIST, acl_interface_set_etype_whitelist) \ 88 _(ACL_INTERFACE_ETYPE_WHITELIST_DUMP, acl_interface_etype_whitelist_dump) \ 89 _(ACL_PLUGIN_GET_CONN_TABLE_MAX_ENTRIES,acl_plugin_get_conn_table_max_entries) 94 .version = VPP_BUILD_VER,
95 .description =
"Access Control Lists (ACL)",
106 u16 *v = va_arg (*va,
u16 *);
107 char *fmt = va_arg (*va,
char *);
109 for (i = 0; i <
vec_len (v); i++)
113 s =
format (s, fmt, v[i]);
126 u64 per_worker_slack = 1000000LL;
127 u64 per_worker_size =
130 u64 per_worker_size_with_slack = per_worker_slack + per_worker_size;
131 u64 main_slack = 2000000LL;
135 per_worker_size_with_slack * tm->
n_vlib_mains + bihash_size +
141 clib_warning (
"ACL heap size requested: %lld, max possible %lld",
151 (
"ACL plugin failed to allocate main heap of %U bytes, abort",
170 #if USE_DLMALLOC == 0 190 #if USE_DLMALLOC == 0 208 int msg_size =
sizeof (*rmp);
218 ntohs (VL_API_ACL_PLUGIN_GET_VERSION_REPLY + am->
msg_id_base);
237 rmp->
vpe_pid = ntohl (getpid ());
263 u8 *out0 =
format (0,
"acl-index %u count %u tag {%s}\n", acl_index,
270 out0 =
format (out0,
" %9d: %s ", j, r->
is_ipv6 ?
"ipv6" :
"ipv4");
295 out0 =
format (out0,
"\n");
306 int msg_size =
sizeof (*rmp);
316 memset (rmp, 0, msg_size);
318 ntohs (VL_API_ACL_PLUGIN_GET_CONN_TABLE_MAX_ENTRIES_REPLY +
342 u32 **ppolicy_epoch_by_swi =
358 if (acl_num <
vec_len (*p_swi_vec_by_acl))
380 u32 * acl_list_index,
u8 * tag)
389 clib_warning (
"API dbg: acl_add_list index %d tag %s", *acl_list_index,
392 if (*acl_list_index != ~0)
399 (
"acl-plugin-error: Trying to replace nonexistent ACL %d (tag %s)",
400 *acl_list_index, tag);
401 return VNET_API_ERROR_NO_SUCH_ENTRY;
407 (
"acl-plugin-warning: supplied no rules for ACL %d (tag %s)",
408 *acl_list_index, tag);
417 for (i = 0; i <
count; i++)
444 if (~0 == *acl_list_index)
450 *acl_list_index = a - am->
acls;
454 a = am->
acls + *acl_list_index;
459 a->
rules = acl_new_rules;
461 memcpy (a->
tag, tag, sizeof (a->
tag));
479 if (acl_index <
vec_len (foo_index_vec_by_acl))
497 return VNET_API_ERROR_NO_SUCH_ENTRY;
500 return VNET_API_ERROR_ACL_IN_USE_INBOUND;
502 return VNET_API_ERROR_ACL_IN_USE_OUTBOUND;
505 return VNET_API_ERROR_ACL_IN_USE_BY_LOOKUP_CONTEXT;
528 while ((0ULL == *p64) && ((
u8 *) p64 - p) <
size)
532 return (p64 - (
u64 *) p) / 2;
537 u32 mask_len,
u32 next_table_index,
538 u32 miss_next_index,
u32 * table_index,
544 u32 match = (mask_len / 16) - skip;
545 u8 *skip_mask_ptr = mask + 16 * skip;
546 u32 current_data_flag = 0;
547 int current_data_offset = 0;
554 memory_size, skip, match,
555 next_table_index, miss_next_index,
556 table_index, current_data_flag,
557 current_data_offset, is_add,
570 return vec_len (whitelist) > 0;
593 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
603 sw_if_index, enable_disable, 0, 0);
607 sw_if_index, enable_disable, 0, 0);
613 "acl-plugin-in-nonip-l2", sw_if_index,
614 enable_disable, 0, 0);
633 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
644 sw_if_index, enable_disable, 0, 0);
649 sw_if_index, enable_disable, 0, 0);
654 "acl-plugin-out-nonip-l2", sw_if_index,
655 enable_disable, 0, 0);
668 int is_input,
int enable_disable)
684 u8 is_input,
u32 * vec_acl_list_index,
685 int *may_clear_sessions)
688 uword *seen_acl_bitmap = 0;
689 uword *old_seen_acl_bitmap = 0;
690 uword *change_acl_bitmap = 0;
697 (
"API dbg: acl_interface_set_inout_acl_list: sw_if_index %d is_input %d acl_vec: [%U]",
698 sw_if_index, is_input,
format_vec32, vec_acl_list_index,
"%d");
706 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
712 clib_warning (
"ERROR: ACL %d being applied twice", *pacln);
713 rv = VNET_API_ERROR_ENTRY_ALREADY_EXISTS;
720 u32 **pinout_lc_index_by_sw_if_index =
724 u32 ***pinout_acl_vec_by_sw_if_index =
728 u32 ***pinout_sw_if_index_vec_by_acl =
732 vec_validate ((*pinout_acl_vec_by_sw_if_index), sw_if_index);
736 vec_foreach (pacln, (*pinout_acl_vec_by_sw_if_index)[sw_if_index])
738 old_seen_acl_bitmap =
clib_bitmap_set (old_seen_acl_bitmap, *pacln, 1);
744 clib_warning (
"bitmaps: old seen %U new seen %U changed %U",
745 format_bitmap_hex, old_seen_acl_bitmap, format_bitmap_hex,
746 seen_acl_bitmap, format_bitmap_hex, change_acl_bitmap);
752 if (acln <
vec_len((*pinout_sw_if_index_vec_by_acl))) {
753 int index =
vec_search((*pinout_sw_if_index_vec_by_acl)[acln], sw_if_index);
754 vec_del1((*pinout_sw_if_index_vec_by_acl)[acln], index);
759 vec_add1((*pinout_sw_if_index_vec_by_acl)[acln], sw_if_index);
764 vec_free ((*pinout_acl_vec_by_sw_if_index)[sw_if_index]);
776 if (may_clear_sessions && *may_clear_sessions
780 *may_clear_sessions = 0;
789 if (
vec_len (vec_acl_list_index) > 0)
796 acl_plugin.register_user_module (
"interface ACL",
"sw_if_index",
800 sw_if_index, is_input);
801 (*pinout_lc_index_by_sw_if_index)[
sw_if_index] = lc_index;
803 acl_plugin.set_acl_vec_for_context (lc_index, vec_acl_list_index);
807 if (~0 != (*pinout_lc_index_by_sw_if_index)[sw_if_index])
809 acl_plugin.put_lookup_context_index ((*pinout_lc_index_by_sw_if_index)[sw_if_index]);
810 (*pinout_lc_index_by_sw_if_index)[
sw_if_index] = ~0;
816 vec_len (vec_acl_list_index) > 0);
827 int *may_clear_sessions)
843 int may_clear_sessions = 1;
845 int error_already_applied = is_input ? VNET_API_ERROR_ACL_IN_USE_INBOUND
846 : VNET_API_ERROR_ACL_IN_USE_OUTBOUND;
848 u32 ***pinout_acl_vec_by_sw_if_index =
856 vec_validate ((*pinout_acl_vec_by_sw_if_index), sw_if_index);
857 u32 index =
vec_search ((*pinout_acl_vec_by_sw_if_index)[sw_if_index],
862 rv = error_already_applied;
866 acl_vec =
vec_dup ((*pinout_acl_vec_by_sw_if_index)[sw_if_index]);
871 if (sw_if_index >=
vec_len (*pinout_acl_vec_by_sw_if_index))
873 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
877 u32 index =
vec_search ((*pinout_acl_vec_by_sw_if_index)[sw_if_index],
882 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
886 acl_vec =
vec_dup ((*pinout_acl_vec_by_sw_if_index)[sw_if_index]);
891 &may_clear_sessions);
965 for (i = 0; i <
vec_len (mv); i++)
967 if ((mv[i].prefix_len == prefix_len) && (mv[
i].
is_ipv6 == is_ipv6)
968 && (0 == memcmp (mv[i].mac_mask, mac_mask, 6)))
983 unsigned int mac_bits_set = 0;
984 unsigned int mac_byte;
986 for (i = 0; i < 6; i++)
989 for (; mac_byte; mac_byte >>= 1)
990 mac_bits_set += mac_byte & 1;
1040 return (is_permit == 3);
1050 u32 match_type_index;
1057 for (i = 0; i < a->
count; i++)
1065 match_type_index =
vec_len (mvec);
1067 memcpy (mvec[match_type_index].mac_mask,
1085 mvec[match_type_index].
count++;
1093 out_last_table = ~0;
1100 u32 *last_tag_table;
1101 u32 *out_last_tag_table;
1133 for (tags = 2; tags >= 0; tags--)
1137 memcpy (&mask[6], mt->
mac_mask, 6);
1163 memcpy (&mask[l3_offset + 8], mt->
mac_mask, 6);
1166 mask[l3_offset + 14 + i] = 0xff;
1168 mask[l3_offset + 14 + (mt->
prefix_len / 8)] =
1169 0xff - ((1 << (8 - mt->
prefix_len % 8)) - 1);
1171 mask_len = ((l3_offset + 14 + ((mt->
prefix_len + 7) / 8) +
1175 (~0 == last_table) ? 0 : ~0,
1177 last_table = *last_tag_table;
1208 mask_len = ((l3_offset +
1214 out_last_table) ? 0 : ~0,
1215 out_last_tag_table, 1);
1216 out_last_table = *out_last_tag_table;
1229 u32 *last_tag_table;
1230 u32 *out_last_tag_table;
1235 for (tags = 2; tags >= 0; tags--)
1238 memcpy (&mask[6], mt->
mac_mask, 6);
1261 mask[l3_src_offs +
i] = 0xff;
1266 0xff - ((1 << (8 - mt->
prefix_len % 8)) - 1);
1272 mask_len = ((l3_src_offs + ((mt->
prefix_len + 7) / 8) +
1275 (~0 == last_table) ? 0 : ~0,
1277 last_table = *last_tag_table;
1281 for (tags = 2; tags >= 0; tags--)
1285 memcpy (&mask[0], mt->
mac_mask, 6);
1308 mask[l3_dst_offs +
i] = 0xff;
1313 0xff - ((1 << (8 - mt->
prefix_len % 8)) - 1);
1319 mask_len = ((l3_dst_offs + ((mt->
prefix_len + 7) / 8) +
1324 (~0 == out_last_table) ? 0 : ~0,
1325 out_last_tag_table, 1);
1326 out_last_table = *out_last_tag_table;
1339 for (i = 0; i < a->
count; i++)
1353 ASSERT (match_type_index != ~0);
1355 for (tags = 2; tags >= 0; tags--)
1386 mask[eth + 1] = 0xdd;
1392 mask[eth + 1] = 0x00;
1398 i, 0, action, metadata, 1);
1403 if (!is6 && (mvec[match_type_index].arp_table_index != ~0))
1408 for (tags = 2; tags >= 0; tags--)
1439 memcpy (&mask[l3_src_offs + 8], a->
rules[i].
src_mac, 6);
1444 i, 0, action, metadata, 1);
1450 for (tags = 2; tags >= 0; tags--)
1483 mask[eth + 1] = 0xdd;
1490 mask[eth + 1] = 0x00;
1497 i, 0, action, metadata, 1);
1502 if (!is6 && (mvec[match_type_index].out_arp_table_index != ~0))
1504 for (tags = 2; tags >= 0; tags--)
1538 rules[i].is_permit ? ~0 : 0,
1539 i, 0, action, metadata, 1);
1620 u32 * acl_list_index,
u8 * tag)
1629 if (*acl_list_index != ~0)
1636 (
"acl-plugin-error: Trying to replace nonexistent MACIP ACL %d (tag %s)",
1637 *acl_list_index, tag);
1638 return VNET_API_ERROR_NO_SUCH_ENTRY;
1645 (
"acl-plugin-warning: Trying to create empty MACIP ACL (tag %s)",
1649 if (~0 != *acl_list_index)
1656 for (i = 0; i <
count; i++)
1658 r = &acl_new_rules[
i];
1663 if (rules[i].is_ipv6)
1670 if (~0 == *acl_list_index)
1688 a->
rules = acl_new_rules;
1690 memcpy (a->
tag, tag, sizeof (a->
tag));
1712 u32 macip_acl_index;
1717 return VNET_API_ERROR_NO_SUCH_ENTRY;
1721 if (~0 == macip_acl_index)
1722 return VNET_API_ERROR_NO_SUCH_ENTRY;
1747 u32 macip_acl_index)
1753 return VNET_API_ERROR_NO_SUCH_ENTRY;
1785 return VNET_API_ERROR_NO_SUCH_ENTRY;
1850 if (supplied_len < expected_len)
1852 clib_warning (
"%s: Supplied message length %d is less than expected %d",
1853 where, supplied_len, expected_len);
1871 u32 expected_len =
sizeof (*mp) + acl_count *
sizeof (mp->
r[0]);
1879 rv = VNET_API_ERROR_INVALID_VALUE;
1894 vl_api_acl_del_reply_t *rmp;
1908 vl_api_acl_interface_add_del_reply_t *rmp;
1912 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
1926 vl_api_acl_interface_set_acl_list_reply_t *rmp;
1933 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
1936 int may_clear_sessions = 1;
1937 for (i = 0; i < mp->
count; i++)
1942 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
1949 u32 *in_acl_vec = 0;
1950 u32 *out_acl_vec = 0;
1951 for (i = 0; i < mp->
count; i++)
1952 if (i < mp->n_input)
1953 vec_add1 (in_acl_vec, clib_net_to_host_u32 (mp->
acls[i]));
1955 vec_add1 (out_acl_vec, clib_net_to_host_u32 (mp->
acls[i]));
1959 &may_clear_sessions);
1963 &may_clear_sessions);
1970 REPLY_MACRO (VL_API_ACL_INTERFACE_SET_ACL_LIST_REPLY);
2006 int msg_size =
sizeof (*mp) +
sizeof (mp->
r[0]) * acl->
count;
2011 mp->_vl_msg_id = ntohs (VL_API_ACL_DETAILS + am->
msg_id_base);
2017 memcpy (mp->
tag, acl->
tag, sizeof (mp->
tag));
2020 for (i = 0; i < acl->
count; i++)
2049 send_acl_details(am, reg, acl, mp->context);
2090 count = n_input + n_output;
2092 msg_size =
sizeof (*mp);
2093 msg_size +=
sizeof (mp->
acls[0]) * count;
2098 ntohs (VL_API_ACL_INTERFACE_LIST_DETAILS + am->
msg_id_base);
2105 for (i = 0; i < n_input; i++)
2109 for (i = 0; i < n_output; i++)
2111 mp->
acls[n_input +
i] =
2137 send_acl_interface_list_details(am, reg, swif->sw_if_index, mp->context);
2157 u32 acl_list_index = ~0;
2159 u32 expected_len =
sizeof (*mp) + acl_count *
sizeof (mp->
r[0]);
2167 rv = VNET_API_ERROR_INVALID_VALUE;
2186 u32 expected_len =
sizeof (*mp) + acl_count *
sizeof (mp->
r[0]);
2194 rv = VNET_API_ERROR_INVALID_VALUE;
2209 vl_api_macip_acl_del_reply_t *rmp;
2222 vl_api_macip_acl_interface_add_del_reply_t *rmp;
2228 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
2234 REPLY_MACRO (VL_API_MACIP_ACL_INTERFACE_ADD_DEL_REPLY);
2245 int msg_size =
sizeof (*mp) + (acl ?
sizeof (mp->
r[0]) * acl->
count : 0);
2249 mp->_vl_msg_id = ntohs (VL_API_MACIP_ACL_DETAILS + am->
msg_id_base);
2255 memcpy (mp->
tag, acl->
tag, sizeof (mp->
tag));
2259 for (i = 0; i < acl->
count; i++)
2268 memcpy (rules[i].src_ip_addr, &r->
src_ip_addr.ip6,
2271 memcpy (rules[i].src_ip_addr, &r->
src_ip_addr.ip4,
2304 send_macip_acl_details (am, reg,
2329 int msg_size =
sizeof (*rmp) +
sizeof (rmp->
acls[0]) * count;
2340 ntohs (VL_API_MACIP_ACL_INTERFACE_GET_REPLY + am->
msg_id_base);
2342 rmp->
count = htonl (count);
2343 for (i = 0; i <
count; i++)
2359 int msg_size =
sizeof (*rmp) +
sizeof (rmp->
acls[0]);
2364 ntohs (VL_API_MACIP_ACL_INTERFACE_LIST_DETAILS + am->
msg_id_base);
2370 rmp->
acls[0] = htonl (acl_index);
2387 if (sw_if_index == ~0)
2416 vl_api_acl_interface_set_etype_whitelist_reply_t *rmp;
2421 u16 *vec_in = 0, *vec_out = 0;
2425 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
2428 for (i = 0; i < mp->
count; i++)
2430 if (i < mp->n_input)
2439 REPLY_MACRO (VL_API_ACL_INTERFACE_SET_ETYPE_WHITELIST_REPLY);
2454 u16 *whitelist_in = 0;
2455 u16 *whitelist_out = 0;
2465 if ((0 == whitelist_in) && (0 == whitelist_out))
2470 n_input =
vec_len (whitelist_in);
2471 n_output =
vec_len (whitelist_out);
2472 count = n_input + n_output;
2474 msg_size =
sizeof (*mp);
2475 msg_size +=
sizeof (mp->
whitelist[0]) * count;
2480 ntohs (VL_API_ACL_INTERFACE_ETYPE_WHITELIST_DETAILS + am->
msg_id_base);
2487 for (i = 0; i < n_input; i++)
2491 for (i = 0; i < n_output; i++)
2493 mp->
whitelist[n_input +
i] = htons (whitelist_out[i]);
2520 send_acl_interface_etype_whitelist_details(am, reg, swif->sw_if_index, mp->context);
2541 vl_msg_api_set_handlers((VL_API_##N + am->msg_id_base), \ 2543 vl_api_##n##_t_handler, \ 2545 vl_api_##n##_t_endian, \ 2546 vl_api_##n##_t_print, \ 2547 sizeof(vl_api_##n##_t), 1); 2554 #define vl_msg_name_crc_list 2556 #undef vl_msg_name_crc_list 2561 #define _(id,n,crc) \ 2562 vl_msg_api_add_msg_name_crc (apim, #n "_" #crc, id + am->msg_id_base); 2563 foreach_vl_msg_name_crc_acl;
2579 clib_warning (
"Unknown timeout type %d", timeout_type);
2598 if ((eh < 256) && (value < 2))
2620 int may_clear_sessions = 1;
2647 if (
unformat (input,
"skip-ipv6-extension-header %u %u", &eh_val, &val))
2655 if (
unformat (input,
"use-hash-acl-matching %u", &val))
2660 if (
unformat (input,
"l4-match-nonfirst-fragment %u", &val))
2665 if (
unformat (input,
"reclassify-sessions %u", &val))
2670 if (
unformat (input,
"event-trace"))
2675 "expecting trace level, got `%U`",
2689 if (
unformat (input,
"validate %u", &val))
2691 else if (
unformat (input,
"trace %u", &val))
2697 if (
unformat (input,
"validate %u", &val))
2699 else if (
unformat (input,
"trace %u", &val))
2710 if (
unformat (input,
"max-entries"))
2715 "expecting maximum number of entries, got `%U`",
2725 if (
unformat (input,
"hash-table-buckets"))
2730 "expecting maximum number of hash table buckets, got `%U`",
2740 if (
unformat (input,
"hash-table-memory"))
2745 "expecting maximum amount of hash table memory, got `%U`",
2755 if (
unformat (input,
"event-trace"))
2760 "expecting trace level, got `%U`",
2778 if (!
unformat (input,
"%u", &timeout))
2781 "expecting timeout value in seconds, got `%U`",
2797 if (!
unformat (input,
"%u", &timeout))
2800 "expecting timeout value in seconds, got `%U`",
2813 if (!
unformat (input,
"%u", &timeout))
2816 "expecting timeout value in seconds, got `%U`",
2839 u8 *
a = va_arg (*args,
u8 *);
2840 return format (s,
"%02x:%02x:%02x:%02x:%02x:%02x",
2841 a[0], a[1], a[2], a[3], a[4], a[5]);
2849 out =
format (out,
"%s action %d ip %U/%d mac %U mask %U",
2873 "MACIP acl_index: %d, count: %d (true len %d) tag {%s} is free pool slot: %d\n",
2877 " ip4_table_index %d, ip6_table_index %d, l2_table_index %d\n",
2880 " out_ip4_table_index %d, out_ip6_table_index %d, out_l2_table_index %d\n",
2900 (void)
unformat (input,
"index %u", &acl_index);
2908 if ((acl_index != ~0) && (acl_index !=
i))
2955 if ((acl_index != ~0) && (acl_index !=
i))
2989 (void)
unformat (input,
"index %u", &acl_index);
3003 (void)
unformat (input,
"index %u", &lc_index);
3017 (void)
unformat (input,
"index %u", &lc_index);
3035 if ((sw_if_index != ~0) && (sw_if_index != swi))
3114 u64 five_tuple[6] = { 0, 0, 0, 0, 0, 0 };
3117 (input,
"%llx %llx %llx %llx %llx %llx", &five_tuple[0], &five_tuple[1],
3118 &five_tuple[2], &five_tuple[3], &five_tuple[4], &five_tuple[5]))
3136 (void)
unformat (input,
"sw_if_index %u", &sw_if_index);
3137 int show_acl =
unformat (input,
"acl");
3138 int detail =
unformat (input,
"detail");
3175 u32 show_session_thread_id,
3176 u32 show_session_session_index)
3189 vlib_cli_output (vm,
"Sessions total: add %lu - del %lu = %lu", n_adds,
3190 n_dels, n_adds - n_dels);
3191 vlib_cli_output (vm,
"Sessions active: add %lu - deact %lu = %lu", n_adds,
3192 n_deact, n_adds - n_deact);
3193 vlib_cli_output (vm,
"Sessions being purged: deact %lu - del %lu = %lu",
3194 n_deact, n_dels, n_deact - n_dels);
3203 if (show_session_thread_id == wk
3207 show_session_session_index);
3212 " info: %016llx %016llx %016llx %016llx %016llx %016llx",
3213 m[0], m[1], m[2], m[3], m[4], m[5]);
3236 (pw->fa_session_adds_by_sw_if_index)
3238 pw->fa_session_adds_by_sw_if_index
3243 (pw->fa_session_dels_by_sw_if_index)
3245 pw->fa_session_dels_by_sw_if_index
3247 u64 n_epoch_changes =
3250 (pw->fa_session_epoch_change_by_sw_if_index)
3252 pw->fa_session_epoch_change_by_sw_if_index
3254 vlib_cli_output (vm,
3255 " sw_if_index %d: add %lu - del %lu = %lu; epoch chg: %lu",
3271 head_session_index);
3272 if (~0 != head_session_index)
3315 #define _(cnt, desc) vlib_cli_output(vm, " %20lu: %s", am->cnt, desc); 3321 "Sessions per interval: min %lu max %lu increment: %f ms current: %f ms",
3338 u32 show_bihash_verbose = 0;
3339 u32 show_session_thread_id = ~0;
3340 u32 show_session_session_index = ~0;
3341 (void)
unformat (input,
"thread %u index %u", &show_session_thread_id,
3342 &show_session_session_index);
3343 (void)
unformat (input,
"verbose %u", &show_bihash_verbose);
3346 show_session_session_index);
3360 int show_acl_hash_info = 0;
3361 int show_applied_info = 0;
3362 int show_mask_type = 0;
3363 int show_bihash = 0;
3364 u32 show_bihash_verbose = 0;
3368 show_acl_hash_info = 1;
3371 unformat (input,
"index %u", &acl_index);
3373 else if (
unformat (input,
"applied"))
3375 show_applied_info = 1;
3376 unformat (input,
"lc_index %u", &lc_index);
3385 unformat (input,
"verbose %u", &show_bihash_verbose);
3389 (show_mask_type || show_acl_hash_info || show_applied_info
3394 show_acl_hash_info = 1;
3395 show_applied_info = 1;
3400 if (show_acl_hash_info)
3402 if (show_applied_info)
3423 .path =
"set acl-plugin",
3424 .short_help =
"set acl-plugin session timeout {{udp idle}|tcp {idle|transient}} <seconds>",
3429 .path =
"show acl-plugin acl",
3430 .short_help =
"show acl-plugin acl [index N]",
3435 .path =
"show acl-plugin lookup context",
3436 .short_help =
"show acl-plugin lookup context [index N]",
3441 .path =
"show acl-plugin lookup user",
3442 .short_help =
"show acl-plugin lookup user [index N]",
3447 .path =
"show acl-plugin decode 5tuple",
3448 .short_help =
"show acl-plugin decode 5tuple XXXX XXXX XXXX XXXX XXXX XXXX",
3453 .path =
"show acl-plugin interface",
3454 .short_help =
"show acl-plugin interface [sw_if_index N] [acl]",
3459 .path =
"show acl-plugin memory",
3460 .short_help =
"show acl-plugin memory",
3465 .path =
"show acl-plugin sessions",
3466 .short_help =
"show acl-plugin sessions",
3471 .path =
"show acl-plugin tables",
3472 .short_help =
"show acl-plugin tables [ acl [index N] | applied [ lc_index N ] | mask | hash [verbose N] ]",
3477 .path =
"show acl-plugin macip acl",
3478 .short_help =
"show acl-plugin macip acl [index N]",
3483 .path =
"show acl-plugin macip interface",
3484 .short_help =
"show acl-plugin macip interface",
3489 .path =
"clear acl-plugin sessions",
3490 .short_help =
"clear acl-plugin sessions",
3499 u32 conn_table_hash_buckets;
3500 uword conn_table_hash_memory_size;
3501 u32 conn_table_max_entries;
3502 uword main_heap_size;
3503 uword hash_heap_size;
3504 u32 hash_lookup_hash_buckets;
3505 uword hash_lookup_hash_memory;
3506 u32 reclassify_sessions;
3507 u32 use_tuple_merge;
3508 u32 tuple_merge_split_threshold;
3513 (input,
"connection hash buckets %d", &conn_table_hash_buckets))
3518 &conn_table_hash_memory_size))
3520 else if (
unformat (input,
"connection count max %d",
3521 &conn_table_max_entries))
3533 else if (
unformat (input,
"hash lookup hash buckets %d",
3534 &hash_lookup_hash_buckets))
3539 &hash_lookup_hash_memory))
3541 else if (
unformat (input,
"use tuple merge %d", &use_tuple_merge))
3545 (input,
"tuple merge split threshold %d",
3546 &tuple_merge_split_threshold))
3549 else if (
unformat (input,
"reclassify sessions %d",
3550 &reclassify_sessions))
3644 am->fa_cleaner_cnt_delete_by_sw_index = 0;
3645 am->fa_cleaner_cnt_delete_by_sw_index_ok = 0;
3646 am->fa_cleaner_cnt_unknown_event = 0;
3647 am->fa_cleaner_cnt_timer_restarted = 0;
3648 am->fa_cleaner_cnt_wait_with_timeout = 0;
3651 #define _(N, v, s) am->fa_ipv6_known_eh_bitmap = clib_bitmap_set(am->fa_ipv6_known_eh_bitmap, v, 1);
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
u32 * input_policy_epoch_by_sw_if_index
u8 * format_vec16(u8 *s, va_list *va)
static int macip_acl_interface_add_acl(acl_main_t *am, u32 sw_if_index, u32 macip_acl_index)
u32 fa_cleaner_node_index
u32 session_timeout_sec[ACL_N_TIMEOUTS]
Use acl_interface_set_acl_list instead Append/remove an ACL index to/from the list of ACLs checked fo...
#define vec_foreach_index(var, v)
Iterate over vector indices.
static int macip_acl_interface_add_del_acl(u32 sw_if_index, u8 is_add, u32 acl_list_index)
static void vl_api_acl_plugin_get_conn_table_max_entries_t_handler(vl_api_acl_plugin_get_conn_table_max_entries_t *mp)
static clib_error_t * acl_clear_aclplugin_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static int acl_set_skip_ipv6_eh(u32 eh, u32 value)
static clib_error_t * acl_show_aclplugin_lookup_user_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static int verify_message_len(void *mp, u32 expected_len, char *where)
#define UDP_SESSION_IDLE_TIMEOUT_SEC
static clib_error_t * acl_init(vlib_main_t *vm)
#define FA_SESSION_BOGUS_INDEX
uword * pending_clear_sw_if_index_bitmap
void acl_plugin_show_tables_mask_type(void)
static void vl_api_acl_plugin_get_version_t_handler(vl_api_acl_plugin_get_version_t *mp)
u64 fa_current_cleaner_timer_wait_interval
Set the vector of input/output ACLs checked for an interface.
#define foreach_acl_plugin_api_msg
Set the ethertype whitelists on an interface.
u32 ** input_acl_vec_by_sw_if_index
void acl_plugin_hash_acl_set_trace_heap(int on)
void acl_plugin_show_tables_applied_info(u32 lc_index)
Dump the list(s) of ACL applied to specific or all interfaces.
vnet_main_t * vnet_get_main(void)
vl_api_macip_acl_rule_t r[count]
static int count_skip(u8 *p, u32 size)
vnet_interface_main_t interface_main
static void vl_api_acl_add_replace_t_handler(vl_api_acl_add_replace_t *mp)
static void vl_api_macip_acl_dump_t_handler(vl_api_macip_acl_dump_t *mp)
#define clib_error(format, args...)
int l4_match_nonfirst_fragment
Control ping from the client to the server response.
#define ACL_FA_CONN_TABLE_DEFAULT_HASH_NUM_BUCKETS
#define ACL_PLUGIN_VERSION_MINOR
static clib_error_t * acl_plugin_config(vlib_main_t *vm, unformat_input_t *input)
#define ACL_PLUGIN_HASH_LOOKUP_HASH_MEMORY
#define REPLY_MACRO2(t, body)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void vl_api_macip_acl_add_t_handler(vl_api_macip_acl_add_t *mp)
static void vl_api_acl_interface_etype_whitelist_dump_t_handler(vl_api_acl_interface_list_dump_t *mp)
Details about ethertype whitelist on a single interface.
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
Reply to get connection table max entries.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static u64 clib_cpu_time_now(void)
static void acl_clear_sessions(acl_main_t *am, u32 sw_if_index)
static int get_l3_dst_offset(int is6)
static mheap_t * mheap_header(u8 *v)
static uword * clib_bitmap_set(uword *ai, uword i, uword value)
Sets the ith bit of a bitmap to new_value Removes trailing zeros from the bitmap. ...
u64 session_timeout[ACL_N_TIMEOUTS]
fa_session_t * fa_sessions_pool
u32 * output_policy_epoch_by_sw_if_index
u32 out_dot1q_table_index
void(* acl_vector_print_func_t)(vlib_main_t *vm, u8 *out0)
u16 dstport_or_icmpcode_last
void * vl_msg_api_alloc(int nbytes)
#define pool_len(p)
Number of elements in pool vector.
static u32 macip_find_match_type(macip_match_type_t *mv, u8 *mac_mask, u8 prefix_len, u8 is_ipv6)
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
vlib_log_class_t log_default
Details about one MACIP ACL.
void acl_plugin_lookup_context_notify_acl_change(u32 acl_num)
f64 fa_cleaner_wait_time_increment
u32 arp_dot1q_table_index
#define clib_bitmap_validate(v, n_bits)
u32 interface_acl_user_id
u32 ** lc_index_vec_by_acl
uword fa_conn_table_hash_memory_size
u16 dst_port_or_code_last
static int acl_interface_in_enable_disable(acl_main_t *am, u32 sw_if_index, int enable_disable)
static clib_error_t * acl_sw_interface_add_del(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
u64 rcvd_session_change_requests
ip46_address_t src_ip_addr
void mv(vnet_classify_table_t *t)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
static int acl_is_not_defined(acl_main_t *am, u32 acl_list_index)
static clib_error_t * acl_show_aclplugin_acl_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u16 dstport_or_icmpcode_first
u64 fa_conn_table_max_entries
static uword clib_bitmap_is_zero(uword *ai)
predicate function; is an entire bitmap empty?
static int acl_is_used_by(u32 acl_index, u32 **foo_index_vec_by_acl)
svm_queue_t unix_shared_memory_queue_t
u64 cnt_session_timer_restarted
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
Add or delete a MACIP ACL to/from interface.
static void increment_policy_epoch(acl_main_t *am, u32 sw_if_index, int is_input)
static clib_error_t * acl_show_aclplugin_interface_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
static u8 * format_acl_action(u8 *s, u8 action)
#define ACL_FA_CONN_TABLE_DEFAULT_MAX_ENTRIES
uword * in_acl_on_sw_if_index
static void acl_print_acl(vlib_main_t *vm, acl_main_t *am, int acl_index)
u32 out_arp_dot1q_table_index
#define vec_search(v, E)
Search a vector for the index of the entry that matches.
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(acl_sw_interface_add_del)
static clib_error_t * acl_show_aclplugin_decode_5tuple_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Get Connection table max entries.
Reply to add/replace MACIP ACL.
static u8 * my_macip_acl_rule_t_pretty_format(u8 *out, va_list *args)
static void clib_spinlock_init(clib_spinlock_t *p)
int vnet_classify_add_del_session(vnet_classify_main_t *cm, u32 table_index, u8 *match, u32 hit_next_index, u32 opaque_index, i32 advance, u8 action, u32 metadata, int is_add)
u8 * format_mheap(u8 *s, va_list *va)
static clib_error_t * acl_show_aclplugin_memory_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_bitmap_foreach(i, ai, body)
Macro to iterate across set bits in a bitmap.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void acl_plugin_show_interface(acl_main_t *am, u32 sw_if_index, int show_acl, int detail)
Details about a single MACIP ACL contents.
static void acl_set_session_max_entries(u32 value)
Control ping from client to api server request.
static void setup_message_id_table(acl_main_t *am, api_main_t *apim)
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
#define ACL_FA_DEFAULT_CLEANER_WAIT_TIME_INCREMENT
u16 dst_port_or_code_first
#define TCP_SESSION_IDLE_TIMEOUT_SEC
static void warning_acl_print_acl(vlib_main_t *vm, acl_main_t *am, int acl_index)
static void vl_api_acl_dump_t_handler(vl_api_acl_dump_t *mp)
uword * fa_ipv6_known_eh_bitmap
Replace an existing ACL in-place or create a new ACL.
#define ACL_FA_DEFAULT_MIN_DELETED_SESSIONS_PER_INTERVAL
#define pool_put(P, E)
Free an object E in pool P.
#define vec_dup(V)
Return copy of vector (no header, no alignment)
u32 * output_lc_index_by_sw_if_index
void acl_plugin_acl_set_validate_heap(acl_main_t *am, int on)
Details about a single ACL contents.
static clib_error_t * acl_show_aclplugin_tables_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define VLIB_CONFIG_FUNCTION(x, n,...)
#define vec_del1(v, i)
Delete the element at index I.
vl_api_acl_rule_t r[count]
static void send_acl_details(acl_main_t *am, vl_api_registration_t *reg, acl_list_t *acl, u32 context)
vl_api_address_union_t src_address
static int get_l3_src_offset(int is6)
int vnet_set_input_acl_intfc(vlib_main_t *vm, u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 l2_table_index, u32 is_add)
static int macip_maybe_apply_unapply_classifier_tables(acl_main_t *am, u32 acl_index, int is_apply)
static void send_acl_interface_etype_whitelist_details(acl_main_t *am, vl_api_registration_t *reg, u32 sw_if_index, u32 context)
int interrupt_is_unwanted
void acl_plugin_hash_acl_set_validate_heap(int on)
static u8 * my_format_mac_address(u8 *s, va_list *args)
u64 * fa_conn_list_head_expiry_time
u32 out_arp_dot1ad_table_index
#define FA_POLICY_EPOCH_IS_INPUT
u16 src_port_or_type_first
u64 fa_min_deleted_sessions_per_interval
static int match_type_compare(macip_match_type_t *m1, macip_match_type_t *m2)
static void acl_print_acl_x(acl_vector_print_func_t vpr, vlib_main_t *vm, acl_main_t *am, int acl_index)
API main structure, used by both vpp and binary API clients.
void acl_plugin_show_tables_bihash(u32 show_bihash_verbose)
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P with alignment A.
vl_api_acl_rule_t r[count]
An API client registration, only in vpp/vlib.
Dump the list(s) of MACIP ACLs applied to specific or all interfaces.
static void vl_api_acl_interface_set_etype_whitelist_t_handler(vl_api_acl_interface_set_etype_whitelist_t *mp)
int vnet_l2_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
static int match_type_metric(macip_match_type_t *m)
static int macip_acl_del_list(u32 acl_list_index)
void vl_msg_api_send_shmem(svm_queue_t *q, u8 *elem)
Dump one or all defined MACIP ACLs.
static int acl_classify_add_del_table_small(vnet_classify_main_t *cm, u8 *mask, u32 mask_len, u32 next_table_index, u32 miss_next_index, u32 *table_index, int is_add)
u64 sent_session_change_requests
static void acl_plugin_show_acl(acl_main_t *am, u32 acl_index)
static uword * clib_bitmap_dup_xor(uword *ai, uword *bi)
Logical operator across two bitmaps which duplicates the first bitmap.
svm_queue_t * vl_api_client_index_to_input_queue(u32 index)
u64 fa_session_total_adds
#define vec_free(V)
Free vector's memory (no header).
void acl_plugin_acl_set_trace_heap(acl_main_t *am, int on)
void acl_fa_enable_disable(u32 sw_if_index, int is_input, int enable_disable)
static void * clib_mem_set_heap(void *heap)
u16 srcport_or_icmptype_first
Reply to add/replace ACL.
#define clib_warning(format, args...)
Reply with the vector of MACIP ACLs by sw_if_index.
void acl_plugin_show_lookup_user(u32 user_index)
int use_hash_acl_matching
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
static clib_error_t * acl_plugin_exports_init(acl_plugin_methods_t *m)
static uword clib_bitmap_get(uword *ai, uword i)
Gets the ith bit value from a bitmap.
uword hash_lookup_hash_memory
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
#define foreach_fa_cleaner_counter
vl_api_macip_acl_rule_t r[count]
static int acl_interface_out_enable_disable(acl_main_t *am, u32 sw_if_index, int enable_disable)
int tuple_merge_split_threshold
#define VLIB_CLI_COMMAND(x,...)
struct _vnet_classify_main vnet_classify_main_t
vl_api_gbp_rule_t rules[n_rules]
u16 srcport_or_icmptype_last
static clib_error_t * acl_show_aclplugin_macip_acl_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define ACL_PLUGIN_HASH_LOOKUP_HASH_BUCKETS
u32 hash_lookup_hash_buckets
static void vl_api_acl_interface_add_del_t_handler(vl_api_acl_interface_add_del_t *mp)
static int macip_acl_interface_del_acl(acl_main_t *am, u32 sw_if_index)
static void vl_api_macip_acl_del_t_handler(vl_api_macip_acl_del_t *mp)
static int acl_interface_inout_enable_disable(acl_main_t *am, u32 sw_if_index, int is_input, int enable_disable)
u16 src_port_or_type_last
MACIP Access List Rule entry.
static int macip_create_classify_tables(acl_main_t *am, u32 macip_acl_index)
static void acl_set_timeout_sec(int timeout_type, u32 value)
void * mheap_alloc_with_lock(void *memory, uword size, int locked)
uword * out_acl_on_sw_if_index
union fa_session_t::@392 tcp_flags_seen
void acl_plugin_show_lookup_context(u32 lc_index)
u32 ** sw_if_index_vec_by_macip_acl
#define MHEAP_FLAG_VALIDATE
static int macip_permit_also_egress(u8 is_permit)
#define clib_bitmap_free(v)
Free a bitmap.
vnet_classify_main_t vnet_classify_main
static void vl_api_macip_acl_add_replace_t_handler(vl_api_macip_acl_add_replace_t *mp)
Reply to get the plugin version.
static clib_error_t * acl_plugin_api_hookup(vlib_main_t *vm)
static int macip_acl_add_list(u32 count, vl_api_macip_acl_rule_t rules[], u32 *acl_list_index, u8 *tag)
uword * serviced_sw_if_index_bitmap
vl_api_macip_acl_rule_t r[count]
Reply to set the ACL list on an interface.
int vnet_classify_add_del_table(vnet_classify_main_t *cm, u8 *mask, u32 nbuckets, u32 memory_size, u32 skip, u32 match, u32 next_table_index, u32 miss_next_index, u32 *table_index, u8 current_data_flag, i16 current_data_offset, int is_add, int del_chain)
#define vec_elt(v, i)
Get vector value at index i.
#define MHEAP_FLAG_SMALL_OBJECT_CACHE
static void macip_acl_print(acl_main_t *am, u32 macip_acl_index)
u32 * macip_acl_by_sw_if_index
Get the vector of MACIP ACL IDs applied to the interfaces.
static void vl_api_acl_interface_list_dump_t_handler(vl_api_acl_interface_list_dump_t *mp)
static void acl_interface_reset_inout_acls(u32 sw_if_index, u8 is_input, int *may_clear_sessions)
static int acl_add_list(u32 count, vl_api_acl_rule_t rules[], u32 *acl_list_index, u8 *tag)
static void print_clib_warning_and_reset(vlib_main_t *vm, u8 *out0)
static int acl_set_etype_whitelists(acl_main_t *am, u32 sw_if_index, u16 *vec_in, u16 *vec_out)
u32 arp_dot1ad_table_index
static void vl_api_acl_del_t_handler(vl_api_acl_del_t *mp)
static void send_macip_acl_details(acl_main_t *am, vl_api_registration_t *reg, macip_acl_list_t *acl, u32 context)
macip_acl_list_t * macip_acls
static clib_error_t * acl_show_aclplugin_sessions_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static acl_plugin_methods_t acl_plugin
static void send_macip_acl_interface_list_details(acl_main_t *am, vl_api_registration_t *reg, u32 sw_if_index, u32 acl_index, u32 context)
uword hash_lookup_mheap_size
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Details about a single ACL contents.
static void vl_api_macip_acl_interface_list_dump_t_handler(vl_api_macip_acl_interface_list_dump_t *mp)
acl_fa_per_worker_data_t * per_worker_data
u64 conn_table_max_entries
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
vnet_sw_interface_t * sw_interfaces
int fa_interrupt_generation
u32 ** input_sw_if_index_vec_by_acl
u64 cnt_already_deleted_sessions
u16 ** output_etype_whitelist_by_sw_if_index
static void vl_api_acl_interface_set_acl_list_t_handler(vl_api_acl_interface_set_acl_list_t *mp)
u64 fa_max_deleted_sessions_per_interval
void * acl_plugin_set_heap()
static clib_error_t * acl_set_aclplugin_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static void try_increment_acl_policy_epoch(acl_main_t *am, u32 acl_num, int is_input)
static int acl_interface_add_del_inout_acl(u32 sw_if_index, u8 is_add, u8 is_input, u32 acl_list_index)
static void policy_notify_acl_change(acl_main_t *am, u32 acl_num)
static vlib_thread_main_t * vlib_get_thread_main()
static void acl_plugin_show_sessions(acl_main_t *am, u32 show_session_thread_id, u32 show_session_session_index)
static void copy_acl_rule_to_api_rule(vl_api_acl_rule_t *api_rule, acl_rule_t *r)
u16 ** input_etype_whitelist_by_sw_if_index
void mheap_validate(void *v)
#define vec_foreach(var, vec)
Vector iterator.
static void * acl_set_heap(acl_main_t *am)
clib_spinlock_t pending_session_change_request_lock
u64 fa_session_total_deactivations
static void print_cli_and_reset(vlib_main_t *vm, u8 *out0)
void show_fa_sessions_hash(vlib_main_t *vm, u32 verbose)
u8 * format_acl_plugin_5tuple(u8 *s, va_list *args)
u32 * input_lc_index_by_sw_if_index
u32 vl_msg_api_get_msg_length(void *msg_arg)
u32 ** output_sw_if_index_vec_by_acl
#define ACL_PLUGIN_VERSION_MAJOR
static clib_error_t * acl_show_aclplugin_macip_interface_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define FA_POLICY_EPOCH_MASK
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
#define CLIB_CACHE_LINE_BYTES
#define ACL_PLUGIN_HASH_LOOKUP_HEAP_SIZE
static int intf_has_etype_whitelist(acl_main_t *am, u32 sw_if_index, int is_input)
void acl_plugin_show_tables_acl_hash_info(u32 acl_index)
#define TM_SPLIT_THRESHOLD
static int acl_interface_set_inout_acl_list(acl_main_t *am, u32 sw_if_index, u8 is_input, u32 *vec_acl_list_index, int *may_clear_sessions)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
#define ACL_FA_DEFAULT_MAX_DELETED_SESSIONS_PER_INTERVAL
static void vl_api_acl_plugin_control_ping_t_handler(vl_api_acl_plugin_control_ping_t *mp)
int vnet_set_output_acl_intfc(vlib_main_t *vm, u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 l2_table_index, u32 is_add)
u32 ** output_acl_vec_by_sw_if_index
static clib_error_t * acl_show_aclplugin_lookup_context_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u32 out_dot1ad_table_index
#define TCP_SESSION_TRANSIENT_TIMEOUT_SEC
static void vl_api_macip_acl_interface_add_del_t_handler(vl_api_macip_acl_interface_add_del_t *mp)
u64 current_time_wait_interval
u32 fa_conn_table_hash_num_buckets
#define ACL_FA_CONN_TABLE_DEFAULT_HASH_MEMORY_SIZE
u64 fa_session_total_dels
static int acl_del_list(u32 acl_list_index)
static void send_acl_interface_list_details(acl_main_t *am, vl_api_registration_t *reg, u32 sw_if_index, u32 context)
static void macip_destroy_classify_tables(acl_main_t *am, u32 macip_acl_index)
u16 vl_msg_api_get_msg_ids(const char *name, int n)
static void vl_api_macip_acl_interface_get_t_handler(vl_api_macip_acl_interface_get_t *mp)
foreach_fa_cleaner_counter vlib_main_t * vlib_main