diff options
Diffstat (limited to 'src/vnet/ip-neighbor/ip_neighbor.c')
-rw-r--r-- | src/vnet/ip-neighbor/ip_neighbor.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/vnet/ip-neighbor/ip_neighbor.c b/src/vnet/ip-neighbor/ip_neighbor.c index d341698abfb..d340037a15d 100644 --- a/src/vnet/ip-neighbor/ip_neighbor.c +++ b/src/vnet/ip-neighbor/ip_neighbor.c @@ -130,7 +130,6 @@ typedef struct ip_neighbor_db_t_ static vlib_log_class_t ipn_logger; /* DBs of neighbours one per AF */ -/* *INDENT-OFF* */ static ip_neighbor_db_t ip_neighbor_db[N_AF] = { [AF_IP4] = { .ipndb_limit = 50000, @@ -145,7 +144,6 @@ static ip_neighbor_db_t ip_neighbor_db[N_AF] = { .ipndb_recycle = false, } }; -/* *INDENT-ON* */ #define IP_NEIGHBOR_DBG(...) \ vlib_log_debug (ipn_logger, __VA_ARGS__); @@ -855,7 +853,6 @@ ip_neighbor_cmd (vlib_main_t * vm, return NULL; } -/* *INDENT-OFF* */ /*? * Add or delete IPv4 ARP cache entries. * @@ -901,7 +898,6 @@ VLIB_CLI_COMMAND (ip_neighbor_command2, static) = { "[static] [no-fib-entry] [count <count>]", .function = ip_neighbor_cmd, }; -/* *INDENT-ON* */ static int ip_neighbor_sort (void *a1, void *a2) @@ -927,7 +923,6 @@ ip_neighbor_entries (u32 sw_if_index, ip_address_family_t af) index_t *ipnis = NULL; ip_neighbor_t *ipn; - /* *INDENT-OFF* */ pool_foreach (ipn, ip_neighbor_pool) { if ((sw_if_index == ~0 || @@ -937,7 +932,6 @@ ip_neighbor_entries (u32 sw_if_index, ip_address_family_t af) vec_add1 (ipnis, ip_neighbor_get_index(ipn)); } - /* *INDENT-ON* */ if (ipnis) vec_sort_with_function (ipnis, ip_neighbor_sort); @@ -957,7 +951,6 @@ ip_neighbor_show_sorted_i (vlib_main_t * vm, vlib_cli_output (vm, "%=12s%=40s%=6s%=20s%=24s", "Time", "IP", "Flags", "Ethernet", "Interface"); - /* *INDENT-OFF*/ /* the list is time sorted, newest first, so start from the back * and work forwards. Stop when we get to one that is alive */ clib_llist_foreach_reverse(ip_neighbor_elt_pool, @@ -965,7 +958,6 @@ ip_neighbor_show_sorted_i (vlib_main_t * vm, ({ vlib_cli_output (vm, "%U", format_ip_neighbor, elt->ipne_index); })); - /* *INDENT-ON*/ return (NULL); } @@ -1047,7 +1039,6 @@ ip4_neighbor_show_sorted (vlib_main_t * vm, * Fib_index 0 6.0.0.1 - 6.0.0.11 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip_neighbors_cmd_node, static) = { .path = "show ip neighbors", .function = ip_neighbor_show, @@ -1088,7 +1079,6 @@ VLIB_CLI_COMMAND (show_ip6_neighbor_sorted_cmd_node, static) = { .function = ip6_neighbor_show_sorted, .short_help = "show ip6 neighbor-sorted", }; -/* *INDENT-ON* */ static ip_neighbor_vft_t ip_nbr_vfts[N_AF]; @@ -1138,13 +1128,11 @@ ip_neighbor_walk (ip_address_family_t af, vec_foreach (hash, ip_neighbor_db[af].ipndb_hash) { - /* *INDENT-OFF* */ hash_foreach (key, ipni, *hash, ({ if (WALK_STOP == cb (ipni, ctx)) break; })); - /* *INDENT-ON* */ } } else @@ -1155,13 +1143,11 @@ ip_neighbor_walk (ip_address_family_t af, return; hash = ip_neighbor_db[af].ipndb_hash[sw_if_index]; - /* *INDENT-OFF* */ hash_foreach (key, ipni, hash, ({ if (WALK_STOP == cb (ipni, ctx)) break; })); - /* *INDENT-ON* */ } } @@ -1240,14 +1226,12 @@ ip_neighbor_populate (ip_address_family_t af, u32 sw_if_index) format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index, format_ip_address_family, af); - /* *INDENT-OFF* */ pool_foreach (ipn, ip_neighbor_pool) { if (ip_neighbor_get_af(ipn) == af && ipn->ipn_key->ipnk_sw_if_index == sw_if_index) vec_add1 (ipnis, ipn - ip_neighbor_pool); } - /* *INDENT-ON* */ vec_foreach (ipni, ipnis) { @@ -1273,7 +1257,6 @@ ip_neighbor_flush (ip_address_family_t af, u32 sw_if_index) format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index, format_ip_address_family, af); - /* *INDENT-OFF* */ pool_foreach (ipn, ip_neighbor_pool) { if (ip_neighbor_get_af(ipn) == af && @@ -1281,7 +1264,6 @@ ip_neighbor_flush (ip_address_family_t af, u32 sw_if_index) ip_neighbor_is_dynamic (ipn)) vec_add1 (ipnis, ipn - ip_neighbor_pool); } - /* *INDENT-ON* */ vec_foreach (ipni, ipnis) ip_neighbor_destroy (ip_neighbor_get (*ipni)); vec_free (ipnis); @@ -1461,7 +1443,6 @@ ip_neighbor_add_del_interface_address_v4 (ip4_main_t * im, if (is_del) { - /* *INDENT-OFF* */ ip_neighbor_walk_covered_ctx_t ctx = { .addr = { .ip.ip4 = *address, @@ -1469,7 +1450,6 @@ ip_neighbor_add_del_interface_address_v4 (ip4_main_t * im, }, .length = address_length, }; - /* *INDENT-ON* */ index_t *ipni; ip_neighbor_walk (AF_IP4, sw_if_index, ip_neighbor_walk_covered, &ctx); @@ -1503,7 +1483,6 @@ ip_neighbor_add_del_interface_address_v6 (ip6_main_t * im, if (is_del) { - /* *INDENT-OFF* */ ip_neighbor_walk_covered_ctx_t ctx = { .addr = { .ip.ip6 = *address, @@ -1511,7 +1490,6 @@ ip_neighbor_add_del_interface_address_v6 (ip6_main_t * im, }, .length = address_length, }; - /* *INDENT-ON* */ index_t *ipni; ip_neighbor_walk (AF_IP6, sw_if_index, ip_neighbor_walk_covered, &ctx); @@ -1667,7 +1645,6 @@ ip_neighbor_age_loop (vlib_main_t * vm, head = pool_elt_at_index (ip_neighbor_elt_pool, ip_neighbor_list_head[af]); - /* *INDENT-OFF*/ /* the list is time sorted, newest first, so start from the back * and work forwards. Stop when we get to one that is alive */ restart: @@ -1692,7 +1669,6 @@ ip_neighbor_age_loop (vlib_main_t * vm, timeout = clib_min (wait, timeout); })); - /* *INDENT-ON* */ break; } case IP_NEIGHBOR_AGE_PROCESS_WAKEUP: @@ -1739,7 +1715,6 @@ ip6_neighbor_age_process (vlib_main_t * vm, return (ip_neighbor_age_loop (vm, rt, f, AF_IP6)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_neighbor_age_process_node,static) = { .function = ip4_neighbor_age_process, .type = VLIB_NODE_TYPE_PROCESS, @@ -1750,7 +1725,6 @@ VLIB_REGISTER_NODE (ip6_neighbor_age_process_node,static) = { .type = VLIB_NODE_TYPE_PROCESS, .name = "ip6-neighbor-age-process", }; -/* *INDENT-ON* */ int ip_neighbor_config (ip_address_family_t af, u32 limit, u32 age, bool recycle) @@ -1785,7 +1759,6 @@ ip_neighbor_config_show (vlib_main_t * vm, { ip_address_family_t af; - /* *INDENT-OFF* */ FOR_EACH_IP_ADDRESS_FAMILY(af) { vlib_cli_output (vm, "%U:", format_ip_address_family, af); vlib_cli_output (vm, " limit:%d, age:%d, recycle:%d", @@ -1794,7 +1767,6 @@ ip_neighbor_config_show (vlib_main_t * vm, ip_neighbor_db[af].ipndb_recycle); } - /* *INDENT-ON* */ return (NULL); } @@ -1886,7 +1858,6 @@ ip_neighbor_stats_show (vlib_main_t *vm, unformat_input_t *input, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip_neighbor_cfg_cmd_node, static) = { .path = "show ip neighbor-config", .function = ip_neighbor_config_show, @@ -1903,7 +1874,6 @@ VLIB_CLI_COMMAND (show_ip_neighbor_stats_cmd_node, static) = { .function = ip_neighbor_stats_show, .short_help = "show ip neighbor-stats [interface]", }; -/* *INDENT-ON* */ static clib_error_t * ip_neighbor_init (vlib_main_t * vm) @@ -1943,12 +1913,10 @@ ip_neighbor_init (vlib_main_t * vm) return (NULL); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ip_neighbor_init) = { .runs_after = VLIB_INITS("ip_main_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON |