diff options
author | Damjan Marion <damarion@cisco.com> | 2024-03-12 17:42:49 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2024-03-12 19:29:56 +0000 |
commit | c3148b1be8f519c80c4417c21b978dfef72b351b (patch) | |
tree | 2511eb86e5c429ab018716fed0366164e6faf679 | |
parent | e2ed59933153d665ee43add2de03a581627b73fa (diff) |
misc: remove GNU Indent directives
Type: refactor
Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c
Signed-off-by: Damjan Marion <damarion@cisco.com>
649 files changed, 1 insertions, 4341 deletions
diff --git a/src/examples/handoffdemo/handoffdemo.c b/src/examples/handoffdemo/handoffdemo.c index a1dad44d28d..03ebe4226f4 100644 --- a/src/examples/handoffdemo/handoffdemo.c +++ b/src/examples/handoffdemo/handoffdemo.c @@ -22,13 +22,11 @@ handoffdemo_main_t handoffdemo_main; -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "handoff demo plugin", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/examples/handoffdemo/node.c b/src/examples/handoffdemo/node.c index ce15f70634c..755fd8344fe 100644 --- a/src/examples/handoffdemo/node.c +++ b/src/examples/handoffdemo/node.c @@ -164,7 +164,6 @@ handoffdemo_node_1_fn (vlib_main_t * vm, 0 /* is_trace */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (handoffdemo_node_1) = { .name = "handoffdemo-1", @@ -183,7 +182,6 @@ VLIB_REGISTER_NODE (handoffdemo_node_1) = [HANDOFFDEMO_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ uword handoffdemo_node_2_fn (vlib_main_t * vm, @@ -197,7 +195,6 @@ handoffdemo_node_2_fn (vlib_main_t * vm, 0 /* is_trace */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (handoffdemo_node_2) = { .name = "handoffdemo-2", @@ -216,7 +213,6 @@ VLIB_REGISTER_NODE (handoffdemo_node_2) = [HANDOFFDEMO_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ static clib_error_t * handoffdemo_node_init (vlib_main_t * vm) diff --git a/src/examples/sample-plugin/sample/node.c b/src/examples/sample-plugin/sample/node.c index a9d8b66d788..ebbf8ac3eef 100644 --- a/src/examples/sample-plugin/sample/node.c +++ b/src/examples/sample-plugin/sample/node.c @@ -688,7 +688,6 @@ VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node, } #endif -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sample_node) = { .name = "sample", @@ -706,7 +705,6 @@ VLIB_REGISTER_NODE (sample_node) = [SAMPLE_NEXT_INTERFACE_OUTPUT] = "interface-output", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/examples/sample-plugin/sample/sample.c b/src/examples/sample-plugin/sample/sample.c index 4aeb5358e95..d829aaffaf9 100644 --- a/src/examples/sample-plugin/sample/sample.c +++ b/src/examples/sample-plugin/sample/sample.c @@ -30,12 +30,10 @@ #define REPLY_MSG_ID_BASE sm->msg_id_base #include <vlibapi/api_helper_macros.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = SAMPLE_PLUGIN_BUILD_VER, .description = "Sample of VPP Plugin", }; -/* *INDENT-ON* */ sample_main_t sample_main; diff --git a/src/examples/vlib/elog_samples.c b/src/examples/vlib/elog_samples.c index a8c800df959..600292119b4 100644 --- a/src/examples/vlib/elog_samples.c +++ b/src/examples/vlib/elog_samples.c @@ -105,13 +105,11 @@ test_elog_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_elog_command, static) = { .path = "test elog sample", .short_help = "test elog sample", .function = test_elog_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/examples/vlib/main_stub.c b/src/examples/vlib/main_stub.c index ef6475ca657..be16a2b98bc 100644 --- a/src/examples/vlib/main_stub.c +++ b/src/examples/vlib/main_stub.c @@ -30,12 +30,10 @@ main_stub_init (vlib_main_t * vm) return error; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (main_stub_init) = { .runs_after = VLIB_INITS("unix_physmem_init", "unix_cli_init"), }; -/* *INDENT-ON* */ #if 0 /* Node test code. */ @@ -105,7 +103,6 @@ my_func (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return i; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (my_node1,static) = { .function = my_func, .type = VLIB_NODE_TYPE_INPUT, @@ -117,16 +114,13 @@ VLIB_REGISTER_NODE (my_node1,static) = { [0] = "my-node2", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (my_node2,static) = { .function = my_func, .name = "my-node2", .scalar_size = sizeof (my_frame_t), .vector_size = STRUCT_SIZE_OF (my_frame_t, vector[0]), }; -/* *INDENT-ON* */ #endif @@ -209,13 +203,11 @@ my_proc (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return i; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (my_proc_node,static) = { .function = my_proc, .type = VLIB_NODE_TYPE_PROCESS, .name = "my-proc", }; -/* *INDENT-ON* */ static uword my_proc_input (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) @@ -250,13 +242,11 @@ my_proc_input (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (my_proc_input_node,static) = { .function = my_proc_input, .type = VLIB_NODE_TYPE_INPUT, .name = "my-proc-input", }; -/* *INDENT-ON* */ static uword _unformat_farith (unformat_input_t * i, va_list * args) @@ -384,7 +374,6 @@ bar_command (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bar_command2, static) = { .path = "bar %decimal_integer", .short_help = "bar1 command", @@ -403,7 +392,6 @@ VLIB_CLI_COMMAND (bar_command3, static) = { .function = bar_command, .function_arg = 3, }; -/* *INDENT-ON* */ #endif diff --git a/src/examples/vlib/mc_test.c b/src/examples/vlib/mc_test.c index 6d63be3a912..8fbd3c7d215 100644 --- a/src/examples/vlib/mc_test.c +++ b/src/examples/vlib/mc_test.c @@ -245,12 +245,10 @@ mc_test_process (vlib_main_t * vm, } } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (mc_test_process_node, static) = { .function = mc_test_process,.type = VLIB_NODE_TYPE_PROCESS,.name = "mc-test-process",}; -/* *INDENT-ON* */ static clib_error_t * mc_test_command (vlib_main_t * vm, @@ -277,12 +275,10 @@ mc_test_command (vlib_main_t * vm, return unformat_parse_error (input); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_mc_command, static) = { .path = "test mc",.short_help = "Test mc command",.function = mc_test_command,}; -/* *INDENT-ON* */ static clib_error_t * mc_show_command (vlib_main_t * vm, @@ -293,12 +289,10 @@ mc_show_command (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_mc_command, static) = { .path = "show mc",.short_help = "Show mc command",.function = mc_show_command,}; -/* *INDENT-ON* */ static clib_error_t * mc_clear_command (vlib_main_t * vm, @@ -309,12 +303,10 @@ mc_clear_command (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_mc_command, static) = { .path = "clear mc",.short_help = "Clear mc command",.function = mc_clear_command,}; -/* *INDENT-ON* */ static clib_error_t * mc_config (vlib_main_t * vm, unformat_input_t * input) diff --git a/src/plugins/abf/abf_api.c b/src/plugins/abf/abf_api.c index ffb32d582c5..2330e7b7d21 100644 --- a/src/plugins/abf/abf_api.c +++ b/src/plugins/abf/abf_api.c @@ -250,12 +250,10 @@ abf_api_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (abf_api_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Access Control List (ACL) Based Forwarding", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/abf/abf_itf_attach.c b/src/plugins/abf/abf_itf_attach.c index a14717e1999..04e5c4c40c2 100644 --- a/src/plugins/abf/abf_itf_attach.c +++ b/src/plugins/abf/abf_itf_attach.c @@ -399,7 +399,6 @@ abf_itf_attach_cmd (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ /** * Attach an ABF policy to an interface. */ @@ -409,7 +408,6 @@ VLIB_CLI_COMMAND (abf_itf_attach_cmd_node, static) = { .short_help = "abf attach <ip4|ip6> [del] policy <value> <interface>", // this is not MP safe }; -/* *INDENT-ON* */ static clib_error_t * abf_show_attach_cmd (vlib_main_t * vm, @@ -438,7 +436,6 @@ abf_show_attach_cmd (vlib_main_t * vm, vlib_cli_output (vm, "specify an interface"); } - /* *INDENT-OFF* */ FOR_EACH_FIB_IP_PROTOCOL(fproto) { if (sw_if_index < vec_len(abf_per_itf[fproto])) @@ -453,31 +450,26 @@ abf_show_attach_cmd (vlib_main_t * vm, } } } - /* *INDENT-ON* */ return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (abf_show_attach_cmd_node, static) = { .path = "show abf attach", .function = abf_show_attach_cmd, .short_help = "show abf attach <interface>", .is_mp_safe = 1, }; -/* *INDENT-ON* */ void abf_itf_attach_walk (abf_itf_attach_walk_cb_t cb, void *ctx) { u32 aii; - /* *INDENT-OFF* */ pool_foreach_index (aii, abf_itf_attach_pool) { if (!cb(aii, ctx)) break; } - /* *INDENT-ON* */ } typedef enum abf_next_t_ @@ -657,7 +649,6 @@ static char *abf_error_strings[] = { #undef abf_error }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (abf_ip4_node) = { .function = abf_input_ip4, @@ -703,7 +694,6 @@ VNET_FEATURE_INIT (abf_ip6_feat, static) = .node_name = "abf-input-ip6", .runs_after = VNET_FEATURES ("acl-plugin-in-ip6-fa"), }; -/* *INDENT-ON* */ static fib_node_t * abf_itf_attach_get_node (fib_node_index_t index) @@ -772,12 +762,10 @@ abf_itf_bond_init (vlib_main_t * vm) return (NULL); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (abf_itf_bond_init) = { .runs_after = VLIB_INITS("acl_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/abf/abf_policy.c b/src/plugins/abf/abf_policy.c index 8f0fc116144..e6dfe4fff55 100644 --- a/src/plugins/abf/abf_policy.c +++ b/src/plugins/abf/abf_policy.c @@ -315,7 +315,6 @@ out: return (NULL); } -/* *INDENT-OFF* */ /** * Create an ABF policy. */ @@ -325,7 +324,6 @@ VLIB_CLI_COMMAND (abf_policy_cmd_node, static) = { .short_help = "abf policy [add|del] id <index> acl <index> via ...", .is_mp_safe = 1, }; -/* *INDENT-ON* */ static u8 * format_abf (u8 * s, va_list * args) @@ -352,13 +350,11 @@ abf_policy_walk (abf_policy_walk_cb_t cb, void *ctx) { u32 api; - /* *INDENT-OFF* */ pool_foreach_index (api, abf_policy_pool) { if (!cb(api, ctx)) break; } - /* *INDENT-ON* */ } static clib_error_t * @@ -381,12 +377,10 @@ abf_show_policy_cmd (vlib_main_t * vm, if (INDEX_INVALID == policy_id) { - /* *INDENT-OFF* */ pool_foreach (ap, abf_policy_pool) { vlib_cli_output(vm, "%U", format_abf, ap); } - /* *INDENT-ON* */ } else { @@ -401,14 +395,12 @@ abf_show_policy_cmd (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (abf_policy_show_policy_cmd_node, static) = { .path = "show abf policy", .function = abf_show_policy_cmd, .short_help = "show abf policy <value>", .is_mp_safe = 1, }; -/* *INDENT-ON* */ static fib_node_t * abf_policy_get_node (fib_node_index_t index) diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c index f834425b5c9..e52e82fcf28 100644 --- a/src/plugins/acl/acl.c +++ b/src/plugins/acl/acl.c @@ -52,12 +52,10 @@ acl_main_t acl_main; #include <vppinfra/bihash_template.h> #include <vppinfra/bihash_template.c> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Access Control Lists (ACL)", }; -/* *INDENT-ON* */ /* methods exported from ACL-as-a-service */ static acl_plugin_methods_t acl_plugin; @@ -109,12 +107,10 @@ vl_api_acl_plugin_control_ping_t_handler (vl_api_acl_plugin_control_ping_t * acl_main_t *am = &acl_main; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_ACL_PLUGIN_CONTROL_PING_REPLY, ({ rmp->vpe_pid = ntohl (getpid ()); })); - /* *INDENT-ON* */ } static void @@ -687,7 +683,6 @@ acl_interface_set_inout_acl_list (acl_main_t * am, u32 sw_if_index, format_bitmap_hex, old_seen_acl_bitmap, format_bitmap_hex, seen_acl_bitmap, format_bitmap_hex, change_acl_bitmap); -/* *INDENT-OFF* */ clib_bitmap_foreach (acln, change_acl_bitmap) { if (clib_bitmap_get(old_seen_acl_bitmap, acln)) { /* ACL is being removed. */ @@ -701,7 +696,6 @@ acl_interface_set_inout_acl_list (acl_main_t * am, u32 sw_if_index, vec_add1((*pinout_sw_if_index_vec_by_acl)[acln], sw_if_index); } } -/* *INDENT-ON* */ vec_free ((*pinout_acl_vec_by_sw_if_index)[sw_if_index]); (*pinout_acl_vec_by_sw_if_index)[sw_if_index] = @@ -1810,12 +1804,10 @@ vl_api_acl_add_replace_t_handler (vl_api_acl_add_replace_t * mp) rv = VNET_API_ERROR_INVALID_VALUE; } - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_ACL_ADD_REPLACE_REPLY, ({ rmp->acl_index = htonl(acl_list_index); })); - /* *INDENT-ON* */ } static void @@ -1977,13 +1969,11 @@ vl_api_acl_dump_t_handler (vl_api_acl_dump_t * mp) if (mp->acl_index == ~0) { - /* *INDENT-OFF* */ /* Just dump all ACLs */ pool_foreach (acl, am->acls) { send_acl_details(am, reg, acl, mp->context); } - /* *INDENT-ON* */ } else { @@ -2063,12 +2053,10 @@ vl_api_acl_interface_list_dump_t_handler (vl_api_acl_interface_list_dump_t * if (mp->sw_if_index == ~0) { - /* *INDENT-OFF* */ pool_foreach (swif, im->sw_interfaces) { send_acl_interface_list_details(am, reg, swif->sw_if_index, mp->context); } - /* *INDENT-ON* */ } else { @@ -2099,12 +2087,10 @@ vl_api_macip_acl_add_t_handler (vl_api_macip_acl_add_t * mp) rv = VNET_API_ERROR_INVALID_VALUE; } - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_MACIP_ACL_ADD_REPLY, ({ rmp->acl_index = htonl(acl_list_index); })); - /* *INDENT-ON* */ } static void @@ -2126,12 +2112,10 @@ vl_api_macip_acl_add_replace_t_handler (vl_api_macip_acl_add_replace_t * mp) rv = VNET_API_ERROR_INVALID_VALUE; } - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_MACIP_ACL_ADD_REPLACE_REPLY, ({ rmp->acl_index = htonl(acl_list_index); })); - /* *INDENT-ON* */ } static void @@ -2228,12 +2212,10 @@ vl_api_macip_acl_dump_t_handler (vl_api_macip_acl_dump_t * mp) if (mp->acl_index == ~0) { /* Just dump all ACLs for now, with sw_if_index = ~0 */ - /* *INDENT-OFF* */ pool_foreach (acl, am->macip_acls) { send_macip_acl_details (am, reg, acl, mp->context); } - /* *INDENT-ON* */ } else { @@ -2437,12 +2419,10 @@ static void if (mp->sw_if_index == ~0) { - /* *INDENT-OFF* */ pool_foreach (swif, im->sw_interfaces) { send_acl_interface_etype_whitelist_details(am, reg, swif->sw_if_index, mp->context); } - /* *INDENT-ON* */ } else { @@ -3350,7 +3330,6 @@ acl_plugin_show_sessions (acl_main_t * am, vlib_cli_output (vm, " link list id: %u", sess->link_list_id); } vlib_cli_output (vm, " connection add/del stats:", wk); - /* *INDENT-OFF* */ pool_foreach (swif, im->sw_interfaces) { u32 sw_if_index = swif->sw_if_index; @@ -3375,7 +3354,6 @@ acl_plugin_show_sessions (acl_main_t * am, n_dels, n_epoch_changes); } - /* *INDENT-ON* */ vlib_cli_output (vm, " connection timeout type lists:", wk); u8 tt = 0; @@ -3537,7 +3515,6 @@ acl_clear_aclplugin_fn (vlib_main_t * vm, return error; } - /* *INDENT-OFF* */ VLIB_CLI_COMMAND (aclplugin_set_command, static) = { .path = "set acl-plugin", .short_help = "set acl-plugin session timeout {{udp idle}|tcp {idle|transient}} <seconds>", @@ -3653,7 +3630,6 @@ VLIB_CLI_COMMAND (aclplugin_set_acl_command, static) = { "rules}", .function = acl_set_aclplugin_acl_fn, }; -/* *INDENT-ON* */ /*? * Delete an Access Control List (ACL) diff --git a/src/plugins/acl/dataplane_node.c b/src/plugins/acl/dataplane_node.c index 4bef8f07770..027afc0f660 100644 --- a/src/plugins/acl/dataplane_node.c +++ b/src/plugins/acl/dataplane_node.c @@ -44,7 +44,6 @@ typedef struct u8 action; } acl_fa_trace_t; -/* *INDENT-OFF* */ #define foreach_acl_fa_error \ _(ACL_DROP, "ACL deny packets") \ _(ACL_PERMIT, "ACL permit packets") \ @@ -63,7 +62,6 @@ typedef enum ACL_FA_N_ERROR, } acl_fa_error_t; -/* *INDENT-ON* */ always_inline u16 get_current_policy_epoch (acl_main_t * am, int is_input, u32 sw_if_index0) @@ -728,7 +726,6 @@ format_acl_plugin_trace (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ static char *acl_fa_error_strings[] = { #define _(sym,string) string, @@ -973,7 +970,6 @@ VNET_FEATURE_INIT (acl_out_ip4_fa_feature, static) = { .runs_before = VNET_FEATURES ("ip4-dvr-reinject", "interface-output"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/acl/dataplane_node_nonip.c b/src/plugins/acl/dataplane_node_nonip.c index 9954ea0258e..1126b57343d 100644 --- a/src/plugins/acl/dataplane_node_nonip.c +++ b/src/plugins/acl/dataplane_node_nonip.c @@ -45,7 +45,6 @@ typedef struct u8 action; } acl_fa_trace_t; -/* *INDENT-OFF* */ #define foreach_acl_fa_error \ _(ACL_DROP, "ACL deny packets") \ _(ACL_PERMIT, "ACL permit packets") \ @@ -64,7 +63,6 @@ typedef enum ACL_FA_N_ERROR, } acl_fa_error_t; -/* *INDENT-ON* */ typedef struct { @@ -109,7 +107,6 @@ _(DROP, "dropped outbound non-whitelisted non-ip packets") \ _(PERMIT, "permitted outbound whitelisted non-ip packets") \ -/* *INDENT-OFF* */ typedef enum { @@ -138,7 +135,6 @@ static char *fa_out_nonip_error_strings[] = { foreach_nonip_out_error #undef _ }; -/* *INDENT-ON* */ always_inline int @@ -237,7 +233,6 @@ VLIB_NODE_FN (acl_out_nonip_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (acl_in_nonip_node) = { @@ -283,7 +278,6 @@ VNET_FEATURE_INIT (acl_out_l2_nonip_fa_feature, static) = .runs_before = VNET_FEATURES ("l2-output-feat-arc-end"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/acl/hash_lookup.c b/src/plugins/acl/hash_lookup.c index c137b15a080..9c3c662a8f1 100644 --- a/src/plugins/acl/hash_lookup.c +++ b/src/plugins/acl/hash_lookup.c @@ -261,13 +261,11 @@ static u32 find_mask_type_index(acl_main_t *am, fa_5tuple_t *mask) { ace_mask_type_entry_t *mte; - /* *INDENT-OFF* */ pool_foreach (mte, am->ace_mask_type_pool) { if(memcmp(&mte->mask, mask, sizeof(*mask)) == 0) return (mte - am->ace_mask_type_pool); } - /* *INDENT-ON* */ return ~0; } @@ -1159,7 +1157,6 @@ acl_plugin_show_tables_mask_type (void) ace_mask_type_entry_t *mte; vlib_cli_output (vm, "Mask-type entries:"); - /* *INDENT-OFF* */ pool_foreach (mte, am->ace_mask_type_pool) { vlib_cli_output(vm, " %3d: %016llx %016llx %016llx %016llx %016llx %016llx refcount %d", @@ -1167,7 +1164,6 @@ acl_plugin_show_tables_mask_type (void) mte->mask.kv_40_8.key[0], mte->mask.kv_40_8.key[1], mte->mask.kv_40_8.key[2], mte->mask.kv_40_8.key[3], mte->mask.kv_40_8.key[4], mte->mask.kv_40_8.value, mte->refcount); } - /* *INDENT-ON* */ } void diff --git a/src/plugins/acl/sess_mgmt_node.c b/src/plugins/acl/sess_mgmt_node.c index eb73fd0bb45..e049a3ffa85 100644 --- a/src/plugins/acl/sess_mgmt_node.c +++ b/src/plugins/acl/sess_mgmt_node.c @@ -328,7 +328,6 @@ acl_fa_check_idle_sessions (acl_main_t * am, u16 thread_index, u64 now) */ -/* *INDENT-OFF* */ #define foreach_acl_fa_cleaner_error \ _(UNKNOWN_EVENT, "unknown event received") \ /* end of errors */ @@ -347,7 +346,6 @@ static char *acl_fa_cleaner_error_strings[] = { #undef _ }; -/* *INDENT-ON* */ static vlib_node_registration_t acl_fa_session_cleaner_process_node; static vlib_node_registration_t acl_fa_worker_session_cleaner_process_node; @@ -927,7 +925,6 @@ show_fa_sessions_hash (vlib_main_t * vm, u32 verbose) } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (acl_fa_worker_session_cleaner_process_node, static) = { .function = acl_fa_worker_conn_cleaner_process, @@ -947,7 +944,6 @@ VLIB_REGISTER_NODE (acl_fa_session_cleaner_process_node, static) = { }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/adl/adl.c b/src/plugins/adl/adl.c index 832bfd4a982..c6ea57a18be 100644 --- a/src/plugins/adl/adl.c +++ b/src/plugins/adl/adl.c @@ -150,21 +150,17 @@ adl_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (adl_init) = { .runs_after = VLIB_INITS ("ip4_allowlist_init", "ip6_allowlist_init"), }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (adl, static) = { .arc_name = "device-input", .node_name = "adl-input", .runs_before = VNET_FEATURES ("ethernet-input"), }; -/* *INDENT-ON */ int adl_interface_enable_disable (u32 sw_if_index, int enable_disable) { @@ -389,7 +385,6 @@ adl_allowlist_enable_disable_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (adl_allowlist_command, static) = { .path = "adl allowlist", @@ -397,15 +392,12 @@ VLIB_CLI_COMMAND (adl_allowlist_command, static) = "adl allowlist <interface-name> [ip4][ip6][default][fib-id <NN>][disable]", .function = adl_allowlist_enable_disable_command_fn, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Allow/deny list plugin", }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/af_xdp/cli.c b/src/plugins/af_xdp/cli.c index 660725813aa..12d3b875a71 100644 --- a/src/plugins/af_xdp/cli.c +++ b/src/plugins/af_xdp/cli.c @@ -46,7 +46,6 @@ af_xdp_create_command_fn (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (af_xdp_create_command, static) = { .path = "create interface af_xdp", .short_help = @@ -55,7 +54,6 @@ VLIB_CLI_COMMAND (af_xdp_create_command, static) = { "[prog pathname] [netns ns] [zero-copy|no-zero-copy] [no-syscall-lock]", .function = af_xdp_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * af_xdp_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -100,14 +98,12 @@ af_xdp_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (af_xdp_delete_command, static) = { .path = "delete interface af_xdp", .short_help = "delete interface af_xdp " "{<interface> | sw_if_index <sw_idx>}", .function = af_xdp_delete_command_fn, }; -/* *INDENT-ON* */ clib_error_t * af_xdp_cli_init (vlib_main_t * vm) diff --git a/src/plugins/af_xdp/device.c b/src/plugins/af_xdp/device.c index da8b58c37e4..63a276ce51e 100644 --- a/src/plugins/af_xdp/device.c +++ b/src/plugins/af_xdp/device.c @@ -857,7 +857,6 @@ af_xdp_clear (u32 dev_instance) clib_error_free (ad->error); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (af_xdp_device_class) = { .name = "AF_XDP interface", .format_device = format_af_xdp_device, @@ -870,7 +869,6 @@ VNET_DEVICE_CLASS (af_xdp_device_class) = { .mac_addr_change_function = af_xdp_mac_change, .clear_counters = af_xdp_clear, }; -/* *INDENT-ON* */ clib_error_t * af_xdp_init (vlib_main_t * vm) diff --git a/src/plugins/af_xdp/input.c b/src/plugins/af_xdp/input.c index 0d890419696..9177b3ffc5b 100644 --- a/src/plugins/af_xdp/input.c +++ b/src/plugins/af_xdp/input.c @@ -352,7 +352,6 @@ af_xdp_device_input_refill (af_xdp_device_t *ad) } #endif /* CLIB_MARCH_VARIANT */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (af_xdp_input_node) = { .name = "af_xdp-input", .sibling_of = "device-input", @@ -363,7 +362,6 @@ VLIB_REGISTER_NODE (af_xdp_input_node) = { .error_strings = af_xdp_input_error_strings, .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/af_xdp/plugin.c b/src/plugins/af_xdp/plugin.c index 444ee553cbf..7be7afeac83 100644 --- a/src/plugins/af_xdp/plugin.c +++ b/src/plugins/af_xdp/plugin.c @@ -19,12 +19,10 @@ #include <vnet/plugin/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "AF_XDP Device Plugin", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/avf/avf_api.c b/src/plugins/avf/avf_api.c index 05b4ead90fb..ee39c87e666 100644 --- a/src/plugins/avf/avf_api.c +++ b/src/plugins/avf/avf_api.c @@ -52,10 +52,8 @@ vl_api_avf_create_t_handler (vl_api_avf_create_t * mp) avf_create_if (vm, &args); rv = args.rv; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_AVF_CREATE_REPLY, ({ rmp->sw_if_index = ntohl (args.sw_if_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/plugins/avf/cli.c b/src/plugins/avf/cli.c index 54d167d2b03..391ff25567a 100644 --- a/src/plugins/avf/cli.c +++ b/src/plugins/avf/cli.c @@ -63,7 +63,6 @@ avf_create_command_fn (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (avf_create_command, static) = { .path = "create interface avf", .short_help = "create interface avf <pci-address> " @@ -71,7 +70,6 @@ VLIB_CLI_COMMAND (avf_create_command, static) = { "[num-rx-queues <size>]", .function = avf_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * avf_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -107,7 +105,6 @@ avf_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (avf_delete_command, static) = { .path = "delete interface avf", .short_help = "delete interface avf " @@ -115,7 +112,6 @@ VLIB_CLI_COMMAND (avf_delete_command, static) = { .function = avf_delete_command_fn, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * avf_test_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -167,14 +163,12 @@ avf_test_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (avf_test_command, static) = { .path = "test avf", .short_help = "test avf [<interface> | sw_if_index <sw_idx>] [irq] " "[elog-on] [elog-off]", .function = avf_test_command_fn, }; -/* *INDENT-ON* */ clib_error_t * avf_cli_init (vlib_main_t * vm) diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c index 67f9227a7e5..1618800c432 100644 --- a/src/plugins/avf/device.c +++ b/src/plugins/avf/device.c @@ -1131,7 +1131,6 @@ avf_process_one_device (vlib_main_t * vm, avf_device_t * ad, int is_irq) if (is_irq == 0) avf_op_get_stats (vm, ad, &ad->eth_stats); - /* *INDENT-OFF* */ vec_foreach (e, ad->events) { avf_log_debug (ad, "event: %s (%u) sev %d", @@ -1227,7 +1226,6 @@ avf_process_one_device (vlib_main_t * vm, avf_device_t * ad, int is_irq) } } } - /* *INDENT-ON* */ vec_reset_length (ad->events); return; @@ -1403,7 +1401,6 @@ avf_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) /* create local list of device pointers as device pool may grow * during suspend */ vec_reset_length (dev_pointers); - /* *INDENT-OFF* */ pool_foreach_index (i, am->devices) { vec_add1 (dev_pointers, avf_get_device (i)); @@ -1413,19 +1410,16 @@ avf_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) { avf_process_one_device (vm, dev_pointers[i], irq); }; - /* *INDENT-ON* */ last_run_duration = vlib_time_now (vm) - last_periodic_time; } return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (avf_process_node) = { .function = avf_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "avf-process", }; -/* *INDENT-ON* */ static void avf_irq_0_handler (vlib_main_t * vm, vlib_pci_dev_handle_t h, u16 line) @@ -1438,13 +1432,11 @@ avf_irq_0_handler (vlib_main_t * vm, vlib_pci_dev_handle_t h, u16 line) if (ad->flags & AVF_DEVICE_F_ELOG) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (el) = { .format = "avf[%d] irq 0: icr0 0x%x", .format_args = "i4i4", }; - /* *INDENT-ON* */ struct { u32 dev_instance; @@ -1474,13 +1466,11 @@ avf_irq_n_handler (vlib_main_t * vm, vlib_pci_dev_handle_t h, u16 line) if (ad->flags & AVF_DEVICE_F_ELOG) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (el) = { .format = "avf[%d] irq %d: received", .format_args = "i4i2", }; - /* *INDENT-ON* */ struct { u32 dev_instance; @@ -1526,7 +1516,6 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad, int with_barrier) vlib_physmem_free (vm, ad->atq_bufs); vlib_physmem_free (vm, ad->arq_bufs); - /* *INDENT-OFF* */ vec_foreach_index (i, ad->rxqs) { avf_rxq_t *rxq = vec_elt_at_index (ad->rxqs, i); @@ -1536,10 +1525,8 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad, int with_barrier) rxq->n_enqueued); vec_free (rxq->bufs); } - /* *INDENT-ON* */ vec_free (ad->rxqs); - /* *INDENT-OFF* */ vec_foreach_index (i, ad->txqs) { avf_txq_t *txq = vec_elt_at_index (ad->txqs, i); @@ -1559,7 +1546,6 @@ avf_delete_if (vlib_main_t * vm, avf_device_t * ad, int with_barrier) vec_free (txq->tmp_descs); clib_spinlock_free (&txq->lock); } - /* *INDENT-ON* */ vec_free (ad->txqs); vec_free (ad->name); @@ -1622,7 +1608,6 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args) if (avf_validate_queue_size (args) != 0) return; - /* *INDENT-OFF* */ pool_foreach (adp, am->devices) { if ((*adp)->pci_addr.as_u32 == args->addr.as_u32) { @@ -1633,7 +1618,6 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args) return; } } - /* *INDENT-ON* */ pool_get (am->devices, adp); adp[0] = ad = clib_mem_alloc_aligned (sizeof (avf_device_t), @@ -1927,7 +1911,6 @@ avf_program_flow (u32 dev_instance, int is_add, enum virthnl_adv_ops vc_op, return avf_process_request (vm, &req); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (avf_device_class, ) = { .name = "Adaptive Virtual Function (AVF) interface", .clear_counters = avf_clear_hw_interface_counters, @@ -1941,7 +1924,6 @@ VNET_DEVICE_CLASS (avf_device_class, ) = { .tx_function_error_strings = avf_tx_func_error_strings, .flow_ops_function = avf_flow_ops_fn, }; -/* *INDENT-ON* */ clib_error_t * avf_init (vlib_main_t * vm) diff --git a/src/plugins/avf/input.c b/src/plugins/avf/input.c index ca69407fc59..06007db540d 100644 --- a/src/plugins/avf/input.c +++ b/src/plugins/avf/input.c @@ -566,7 +566,6 @@ VLIB_NODE_FN (avf_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return n_rx; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (avf_input_node) = { .name = "avf-input", .sibling_of = "device-input", @@ -578,7 +577,6 @@ VLIB_REGISTER_NODE (avf_input_node) = { .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/avf/plugin.c b/src/plugins/avf/plugin.c index b5123175fe7..928dee543a6 100644 --- a/src/plugins/avf/plugin.c +++ b/src/plugins/avf/plugin.c @@ -19,12 +19,10 @@ #include <vnet/plugin/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Intel Adaptive Virtual Function (AVF) Device Driver", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/builtinurl/builtins.c b/src/plugins/builtinurl/builtins.c index 24323cd596e..b04e9dd5c7c 100644 --- a/src/plugins/builtinurl/builtins.c +++ b/src/plugins/builtinurl/builtins.c @@ -97,12 +97,10 @@ handle_get_interface_stats (hss_url_handler_args_t *args) } else /* default, HTTP_BUILTIN_METHOD_GET */ { - /* *INDENT-OFF* */ pool_foreach (hi, im->hw_interfaces) { vec_add1 (sw_if_indices, hi->sw_if_index); } - /* *INDENT-ON* */ } s = format (s, "{%sinterface_stats%s: [\n", q, q); @@ -150,14 +148,12 @@ handle_get_interface_list (hss_url_handler_args_t *args) int need_comma = 0; /* Construct vector of active hw_if_indexes ... */ - /* *INDENT-OFF* */ pool_foreach (hi, im->hw_interfaces) { /* No point in mentioning "local0"... */ if (hi - im->hw_interfaces) vec_add1 (hw_if_indices, hi - im->hw_interfaces); } - /* *INDENT-ON* */ /* Build answer */ s = format (s, "{\"interface_list\": [\n"); diff --git a/src/plugins/builtinurl/builtinurl.c b/src/plugins/builtinurl/builtinurl.c index 8782906a8d2..749a2c93b8a 100644 --- a/src/plugins/builtinurl/builtinurl.c +++ b/src/plugins/builtinurl/builtinurl.c @@ -85,14 +85,12 @@ builtinurl_enable_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (builtinurl_enable_command, static) = { .path = "builtinurl enable", .short_help = "Turn on builtin http/https GET and POST urls", .function = builtinurl_enable_command_fn, }; -/* *INDENT-ON* */ /* API message handler */ static void vl_api_builtinurl_enable_t_handler @@ -124,13 +122,11 @@ builtinurl_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (builtinurl_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "vpp built-in URL support", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/cdp/cdp.c b/src/plugins/cdp/cdp.c index 1fe557fe82e..00784ccd0bc 100644 --- a/src/plugins/cdp/cdp.c +++ b/src/plugins/cdp/cdp.c @@ -86,14 +86,12 @@ cdp_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cdp_command, static) = { .path = "cdp", .short_help = "cdp enable | disable", .function = cdp_command_fn, }; -/* *INDENT-ON* */ /* API message handler */ static void vl_api_cdp_enable_disable_t_handler @@ -124,13 +122,11 @@ cdp_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (cdp_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Cisco Discovery Protocol (CDP)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/cdp/cdp_input.c b/src/plugins/cdp/cdp_input.c index c6198d81de1..914d4dec66f 100644 --- a/src/plugins/cdp/cdp_input.c +++ b/src/plugins/cdp/cdp_input.c @@ -416,12 +416,10 @@ cdp_input_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (cdp_input_init) = { .runs_after = VLIB_INITS("cdp_periodic_init"), }; -/* *INDENT-ON* */ static u8 * @@ -437,7 +435,6 @@ format_cdp_neighbors (u8 * s, va_list * va) "%=25s %=25s %=25s %=10s\n", "Our Port", "Peer System", "Peer Port", "Last Heard"); - /* *INDENT-OFF* */ pool_foreach (n, cm->neighbors) { hw = vnet_get_sup_hw_interface (vnm, n->sw_if_index); @@ -447,7 +444,6 @@ format_cdp_neighbors (u8 * s, va_list * va) hw->name, n->device_name, n->port_id, n->last_heard); } - /* *INDENT-ON* */ return s; } @@ -465,13 +461,11 @@ show_cdp (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_cdp_command, static) = { .path = "show cdp", .short_help = "Show cdp command", .function = show_cdp, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/cdp/cdp_node.c b/src/plugins/cdp/cdp_node.c index f9ee251c022..49b1e3844e4 100644 --- a/src/plugins/cdp/cdp_node.c +++ b/src/plugins/cdp/cdp_node.c @@ -100,7 +100,6 @@ cdp_node_fn (vlib_main_t * vm, /* * cdp input graph node declaration */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (cdp_input_node, static) = { .function = cdp_node_fn, .name = "cdp-input", @@ -117,7 +116,6 @@ VLIB_REGISTER_NODE (cdp_input_node, static) = { [CDP_INPUT_NEXT_NORMAL] = "error-drop", }, }; -/* *INDENT-ON* */ /* * cdp periodic function diff --git a/src/plugins/cdp/cdp_periodic.c b/src/plugins/cdp/cdp_periodic.c index 295cf8fcfb1..03a2de0d9ab 100644 --- a/src/plugins/cdp/cdp_periodic.c +++ b/src/plugins/cdp/cdp_periodic.c @@ -357,12 +357,10 @@ cdp_periodic (vlib_main_t * vm) int i; static cdp_neighbor_t **n_list = 0; - /* *INDENT-OFF* */ pool_foreach (n, cm->neighbors) { vec_add1 (n_list, n); } - /* *INDENT-ON* */ /* Across all cdp neighbors known to the system */ for (i = 0; i < vec_len (n_list); i++) diff --git a/src/plugins/crypto_ipsecmb/ipsecmb.c b/src/plugins/crypto_ipsecmb/ipsecmb.c index 9d874101163..064c129ba12 100644 --- a/src/plugins/crypto_ipsecmb/ipsecmb.c +++ b/src/plugins/crypto_ipsecmb/ipsecmb.c @@ -864,7 +864,6 @@ crypto_ipsecmb_init (vlib_main_t * vm) vec_validate_aligned (imbm->per_thread_data, tm->n_vlib_mains - 1, CLIB_CACHE_LINE_BYTES); - /* *INDENT-OFF* */ vec_foreach (ptd, imbm->per_thread_data) { ptd->mgr = alloc_mb_mgr (0); @@ -882,7 +881,6 @@ crypto_ipsecmb_init (vlib_main_t * vm) if (ptd == imbm->per_thread_data) m = ptd->mgr; } - /* *INDENT-ON* */ #define _(a, b, c, d, e, f) \ vnet_crypto_register_ops_handler (vm, eidx, VNET_CRYPTO_OP_##a##_HMAC, \ @@ -945,20 +943,16 @@ crypto_ipsecmb_init (vlib_main_t * vm) return (NULL); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (crypto_ipsecmb_init) = { .runs_after = VLIB_INITS ("vnet_crypto_init"), }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Intel IPSEC Multi-buffer Crypto Engine", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/crypto_openssl/main.c b/src/plugins/crypto_openssl/main.c index 545edf42426..b070cf336a5 100644 --- a/src/plugins/crypto_openssl/main.c +++ b/src/plugins/crypto_openssl/main.c @@ -688,20 +688,16 @@ crypto_openssl_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (crypto_openssl_init) = { .runs_after = VLIB_INITS ("vnet_crypto_init"), }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "OpenSSL Crypto Engine", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/crypto_sw_scheduler/main.c b/src/plugins/crypto_sw_scheduler/main.c index 26ab02cdde5..b32c8ae0594 100644 --- a/src/plugins/crypto_sw_scheduler/main.c +++ b/src/plugins/crypto_sw_scheduler/main.c @@ -625,14 +625,12 @@ sw_scheduler_set_worker_crypto (vlib_main_t * vm, unformat_input_t * input, * @cliexstart{set sw_scheduler worker 0 crypto off} * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_set_sw_scheduler_worker_crypto, static) = { .path = "set sw_scheduler", .short_help = "set sw_scheduler worker <idx> crypto <on|off>", .function = sw_scheduler_set_worker_crypto, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * sw_scheduler_show_workers (vlib_main_t * vm, unformat_input_t * input, @@ -661,14 +659,12 @@ sw_scheduler_show_workers (vlib_main_t * vm, unformat_input_t * input, * @cliexstart{show sw_scheduler workers} * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_show_sw_scheduler_workers, static) = { .path = "show sw_scheduler workers", .short_help = "show sw_scheduler workers", .function = sw_scheduler_show_workers, .is_mp_safe = 1, }; -/* *INDENT-ON* */ clib_error_t * sw_scheduler_cli_init (vlib_main_t * vm) @@ -723,7 +719,6 @@ crypto_sw_scheduler_init (vlib_main_t * vm) crypto_sw_scheduler_api_init (vm); - /* *INDENT-OFF* */ #define _(n, s, k, t, a) \ vnet_crypto_register_enqueue_handler ( \ vm, cm->crypto_engine_index, VNET_CRYPTO_OP_##n##_TAG##t##_AAD##a##_ENC, \ @@ -743,7 +738,6 @@ crypto_sw_scheduler_init (vlib_main_t * vm) crypto_sw_scheduler_frame_enqueue_decrypt); foreach_crypto_link_async_alg #undef _ - /* *INDENT-ON* */ vnet_crypto_register_dequeue_handler (vm, cm->crypto_engine_index, crypto_sw_scheduler_dequeue); @@ -754,7 +748,6 @@ crypto_sw_scheduler_init (vlib_main_t * vm) return error; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (crypto_sw_scheduler_init) = { .runs_after = VLIB_INITS ("vnet_crypto_init"), }; @@ -763,7 +756,6 @@ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "SW Scheduler Crypto Async Engine plugin", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ct6/ct6.c b/src/plugins/ct6/ct6.c index 205cd3f50ef..e5c69be2c9d 100644 --- a/src/plugins/ct6/ct6.c +++ b/src/plugins/ct6/ct6.c @@ -153,7 +153,6 @@ set_ct6_enable_disable_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ct6_command, static) = { .path = "set ct6", @@ -161,7 +160,6 @@ VLIB_CLI_COMMAND (set_ct6_command, static) = "set ct6 [inside|outside] <interface-name> [disable]", .function = set_ct6_enable_disable_command_fn, }; -/* *INDENT-ON* */ /* API message handler */ static void vl_api_ct6_enable_disable_t_handler @@ -216,30 +214,24 @@ ct6_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (ct6_init); -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ct6out2in, static) = { .arc_name = "ip6-unicast", .node_name = "ct6-out2in", .runs_before = VNET_FEATURES ("ip6-lookup"), }; -/* *INDENT-ON */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ct6in2out, static) = { .arc_name = "interface-output", .node_name = "ct6-in2out", .runs_before = VNET_FEATURES ("interface-output-arc-end"), }; -/* *INDENT-ON */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "IPv6 Connection Tracker", }; -/* *INDENT-ON* */ u8 * format_ct6_session (u8 * s, va_list * args) @@ -320,26 +312,22 @@ show_ct6_command_fn_command_fn (vlib_main_t * vm, format (s, "%U", format_ct6_session, cmp, 0 /* pool */ , 0 /* header */ , verbose); - /* *INDENT-OFF* */ pool_foreach (s0, cmp->sessions[i]) { s = format (s, "%U", format_ct6_session, cmp, i, s0, verbose); } - /* *INDENT-ON* */ } vlib_cli_output (cmp->vlib_main, "%v", s); vec_free (s); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ct6_command_fn_command, static) = { .path = "show ip6 connection-tracker", .short_help = "show ip6 connection-tracker", .function = show_ct6_command_fn_command_fn, }; -/* *INDENT-ON* */ static void increment_v6_address (ip6_address_t * a) @@ -429,12 +417,10 @@ test_ct6_command_fn_command_fn (vlib_main_t * vm, created = 0; } - /* *INDENT-OFF* */ pool_foreach (s0, cmp->sessions[0]) { s = format (s, "%U", format_ct6_session, cmp, 0, s0, 1 /* verbose */); } - /* *INDENT-ON* */ vlib_cli_output (vm, "\nEnd state: first index %d last index %d\n%v", cmp->first_index[0], cmp->last_index[0], s); @@ -449,12 +435,10 @@ test_ct6_command_fn_command_fn (vlib_main_t * vm, ct6_update_session_hit (cmp, s0, 234.0); - /* *INDENT-OFF* */ pool_foreach (s0, cmp->sessions[0]) { s = format (s, "%U", format_ct6_session, cmp, 0, s0, 1 /* verbose */); } - /* *INDENT-ON* */ vlib_cli_output (vm, "\nEnd state: first index %d last index %d\n%v", cmp->first_index[0], cmp->last_index[0], s); @@ -464,14 +448,12 @@ test_ct6_command_fn_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_ct6_command_fn_command, static) = { .path = "test ip6 connection-tracker", .short_help = "test ip6 connection-tracker", .function = test_ct6_command_fn_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * ct6_config (vlib_main_t * vm, unformat_input_t * input) diff --git a/src/plugins/ct6/ct6.h b/src/plugins/ct6/ct6.h index 534534f5c99..0b7deb07839 100644 --- a/src/plugins/ct6/ct6.h +++ b/src/plugins/ct6/ct6.h @@ -26,7 +26,6 @@ #include <vppinfra/hash.h> #include <vppinfra/error.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { union @@ -43,7 +42,6 @@ typedef CLIB_PACKED (struct u64 as_u64[6]; }; }) ct6_session_key_t; -/* *INDENT-ON* */ typedef struct { diff --git a/src/plugins/ct6/ct6_in2out.c b/src/plugins/ct6/ct6_in2out.c index b8bda18370c..c5d26c8caa7 100644 --- a/src/plugins/ct6/ct6_in2out.c +++ b/src/plugins/ct6/ct6_in2out.c @@ -344,7 +344,6 @@ VLIB_NODE_FN (ct6_in2out_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return ct6_in2out_inline (vm, node, frame, 0 /* is_trace */ ); } -/* *INDENT-OFF* */ #ifndef CLIB_MARCH_VARIANT VLIB_REGISTER_NODE (ct6_in2out_node) = { @@ -365,7 +364,6 @@ VLIB_REGISTER_NODE (ct6_in2out_node) = .unformat_buffer = unformat_ethernet_header, }; #endif /* CLIB_MARCH_VARIANT */ -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ct6/ct6_out2in.c b/src/plugins/ct6/ct6_out2in.c index ebb6da56134..a94ae38f0c5 100644 --- a/src/plugins/ct6/ct6_out2in.c +++ b/src/plugins/ct6/ct6_out2in.c @@ -246,7 +246,6 @@ VLIB_NODE_FN (ct6_out2in_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return ct6_out2in_inline (vm, node, frame, 0 /* is_trace */ ); } -/* *INDENT-OFF* */ #ifndef CLIB_MARCH_VARIANT VLIB_REGISTER_NODE (ct6_out2in_node) = { @@ -266,7 +265,6 @@ VLIB_REGISTER_NODE (ct6_out2in_node) = }, }; #endif /* CLIB_MARCH_VARIANT */ -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/dhcp/client.c b/src/plugins/dhcp/client.c index f93643390e9..8fa67c616b2 100644 --- a/src/plugins/dhcp/client.c +++ b/src/plugins/dhcp/client.c @@ -149,7 +149,6 @@ dhcp_client_acquire_address (dhcp_client_main_t * dcm, dhcp_client_t * c) .ip4 = c->learned.router_address, }; - /* *INDENT-OFF* */ fib_table_entry_path_add ( fib_table_get_index_for_sw_if_index ( FIB_PROTOCOL_IP4, @@ -161,7 +160,6 @@ dhcp_client_acquire_address (dhcp_client_main_t * dcm, dhcp_client_t * c) &nh, c->sw_if_index, ~0, 1, NULL, // no label stack FIB_ROUTE_PATH_FLAG_NONE); - /* *INDENT-ON* */ } } clib_memcpy (&c->installed, &c->learned, sizeof (c->installed)); @@ -870,7 +868,6 @@ dhcp_client_process (vlib_main_t * vm, case ~0: if (pool_elts (dcm->clients)) { - /* *INDENT-OFF* */ next_expire_time = 1e70; pool_foreach (c, dcm->clients) { @@ -886,7 +883,6 @@ dhcp_client_process (vlib_main_t * vm, clib_warning ("BUG"); timeout = 1.13; } - /* *INDENT-ON* */ } else timeout = 1000.0; @@ -900,7 +896,6 @@ dhcp_client_process (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcp_client_process_node,static) = { .function = dhcp_client_process, .type = VLIB_NODE_TYPE_PROCESS, @@ -909,7 +904,6 @@ VLIB_REGISTER_NODE (dhcp_client_process_node,static) = { .n_errors = ARRAY_LEN(dhcp_client_process_stat_strings), .error_strings = dhcp_client_process_stat_strings, }; -/* *INDENT-ON* */ static clib_error_t * show_dhcp_client_command_fn (vlib_main_t * vm, @@ -943,25 +937,21 @@ show_dhcp_client_command_fn (vlib_main_t * vm, return 0; } - /* *INDENT-OFF* */ pool_foreach (c, dcm->clients) { vlib_cli_output (vm, "%U", format_dhcp_client, dcm, c, verbose); } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_dhcp_client_command, static) = { .path = "show dhcp client", .short_help = "show dhcp client [intfc <intfc>][verbose]", .function = show_dhcp_client_command_fn, }; -/* *INDENT-ON* */ int @@ -1118,13 +1108,11 @@ dhcp_client_walk (dhcp_client_walk_cb_t cb, void *ctx) dhcp_client_main_t *dcm = &dhcp_client_main; dhcp_client_t *c; - /* *INDENT-OFF* */ pool_foreach (c, dcm->clients) { if (!cb(c, ctx)) break; } - /* *INDENT-ON* */ } @@ -1229,13 +1217,11 @@ dhcp_client_set_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp_client_set_command, static) = { .path = "set dhcp client", .short_help = "set dhcp client [del] intfc <interface> [hostname <name>]", .function = dhcp_client_set_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcp_client_init (vlib_main_t * vm) diff --git a/src/plugins/dhcp/dhcp4_proxy_node.c b/src/plugins/dhcp/dhcp4_proxy_node.c index 56e14d422a8..2b49d49bb7f 100644 --- a/src/plugins/dhcp/dhcp4_proxy_node.c +++ b/src/plugins/dhcp/dhcp4_proxy_node.c @@ -463,7 +463,6 @@ dhcp_proxy_to_server_input (vlib_main_t * vm, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcp_proxy_to_server_node, static) = { .function = dhcp_proxy_to_server_input, .name = "dhcp-proxy-to-server", @@ -486,7 +485,6 @@ VLIB_REGISTER_NODE (dhcp_proxy_to_server_node, static) = { .unformat_buffer = unformat_dhcp_proxy_header, #endif }; -/* *INDENT-ON* */ typedef enum { @@ -783,7 +781,6 @@ dhcp_proxy_to_client_input (vlib_main_t * vm, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcp_proxy_to_client_node, static) = { .function = dhcp_proxy_to_client_input, .name = "dhcp-proxy-to-client", @@ -803,7 +800,6 @@ VLIB_REGISTER_NODE (dhcp_proxy_to_client_node, static) = { [DHCP4_PROXY_NEXT_TX] = "interface-output", }, }; -/* *INDENT-ON* */ void dhcp_maybe_register_udp_ports (dhcp_port_reg_flags_t ports) @@ -956,13 +952,11 @@ dhcp4_proxy_set_command_fn (vlib_main_t * vm, format_unformat_error, input); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp_proxy_set_command, static) = { .path = "set dhcp proxy", .short_help = "set dhcp proxy [del] server <ip-addr> src-address <ip-addr> [server-fib-id <n>] [rx-fib-id <n>]", .function = dhcp4_proxy_set_command_fn, }; -/* *INDENT-ON* */ static u8 * format_dhcp4_proxy_server (u8 * s, va_list * args) @@ -1015,13 +1009,11 @@ dhcp4_proxy_show_command_fn (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp_proxy_show_command, static) = { .path = "show dhcp proxy", .short_help = "Display dhcp proxy server info", .function = dhcp4_proxy_show_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcp_option_82_vss_fn (vlib_main_t * vm, @@ -1066,13 +1058,11 @@ dhcp_option_82_vss_fn (vlib_main_t * vm, } } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp_proxy_vss_command,static) = { .path = "set dhcp option-82 vss", .short_help = "set dhcp option-82 vss [del] table <table id> [oui <n> vpn-id <n> | vpn-ascii-id <text>]", .function = dhcp_option_82_vss_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcp_vss_show_command_fn (vlib_main_t * vm, @@ -1083,13 +1073,11 @@ dhcp_vss_show_command_fn (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp_proxy_vss_show_command, static) = { .path = "show dhcp vss", .short_help = "show dhcp VSS", .function = dhcp_vss_show_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcp_option_82_address_show_command_fn (vlib_main_t * vm, @@ -1132,13 +1120,11 @@ dhcp_option_82_address_show_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp_proxy_address_show_command,static) = { .path = "show dhcp option-82-address interface", .short_help = "show dhcp option-82-address interface <interface>", .function = dhcp_option_82_address_show_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/dhcp/dhcp6_client_common_dp.c b/src/plugins/dhcp/dhcp6_client_common_dp.c index da6f61aa2d5..40c4ba94c24 100644 --- a/src/plugins/dhcp/dhcp6_client_common_dp.c +++ b/src/plugins/dhcp/dhcp6_client_common_dp.c @@ -61,14 +61,12 @@ generate_client_duid (void) vnet_hw_interface_t *hi; ethernet_interface_t *eth_if = 0; - /* *INDENT-OFF* */ pool_foreach (hi, im->hw_interfaces) { eth_if = ethernet_get_interface (ðernet_main, hi->hw_if_index); if (eth_if) break; } - /* *INDENT-ON* */ if (eth_if) clib_memcpy (client_duid.lla, ð_if->address, 6); @@ -425,7 +423,6 @@ dhcpv6_client_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcpv6_client_node, static) = { .function = dhcpv6_client_node_fn, .name = "dhcpv6-client", @@ -442,7 +439,6 @@ VLIB_REGISTER_NODE (dhcpv6_client_node, static) = { .format_trace = format_dhcpv6_client_trace, }; -/* *INDENT-ON* */ void dhcp6_clients_enable_disable (u8 enable) diff --git a/src/plugins/dhcp/dhcp6_ia_na_client_cp.c b/src/plugins/dhcp/dhcp6_ia_na_client_cp.c index 4a1156f6e8a..ddaf92c6e42 100644 --- a/src/plugins/dhcp/dhcp6_ia_na_client_cp.c +++ b/src/plugins/dhcp/dhcp6_ia_na_client_cp.c @@ -271,7 +271,6 @@ dhcp6_reply_event_handler (vl_api_dhcp6_reply_event_t * mp) continue; u8 address_already_present = 0; - /* *INDENT-OFF* */ pool_foreach (address_info, rm->address_pool) { if (address_info->sw_if_index != sw_if_index) @@ -284,7 +283,6 @@ dhcp6_reply_event_handler (vl_api_dhcp6_reply_event_t * mp) goto address_pool_foreach_out; } } - /* *INDENT-ON* */ address_pool_foreach_out: if (address_already_present) @@ -344,7 +342,6 @@ create_address_list (u32 sw_if_index) dhcp6_client_cp_main_t *rm = &dhcp6_client_cp_main; address_info_t *address_info, *address_list = 0;; - /* *INDENT-OFF* */ pool_foreach (address_info, rm->address_pool) { if (address_info->sw_if_index == sw_if_index) @@ -354,7 +351,6 @@ create_address_list (u32 sw_if_index) clib_memcpy (&address_list[pos], address_info, sizeof (*address_info)); } } - /* *INDENT-ON* */ return address_list; } @@ -393,7 +389,6 @@ dhcp6_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, do { due_time = current_time + 1e9; - /* *INDENT-OFF* */ pool_foreach (address_info, rm->address_pool) { if (address_info->due_time > current_time) @@ -423,7 +418,6 @@ dhcp6_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, } } } - /* *INDENT-ON* */ for (i = 0; i < vec_len (rm->client_state_by_sw_if_index); i++) { client_state_t *cs = &rm->client_state_by_sw_if_index[i]; @@ -473,13 +467,11 @@ dhcp6_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcp6_client_cp_process_node) = { .function = dhcp6_client_cp_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "dhcp6-client-cp-process", }; -/* *INDENT-ON* */ static void interrupt_process (void) @@ -524,7 +516,6 @@ dhcp6_addresses_show_command_function (vlib_main_t * vm, address_info_t *address_info; f64 current_time = vlib_time_now (vm); - /* *INDENT-OFF* */ pool_foreach (address_info, dm->address_pool) { vlib_cli_output (vm, "address: %U, " @@ -534,18 +525,15 @@ dhcp6_addresses_show_command_function (vlib_main_t * vm, address_info->preferred_lt, address_info->valid_lt, address_info->due_time - current_time); } - /* *INDENT-ON* */ return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp6_addresses_show_command, static) = { .path = "show dhcp6 addresses", .short_help = "show dhcp6 addresses", .function = dhcp6_addresses_show_command_function, }; -/* *INDENT-ON* */ static clib_error_t * dhcp6_clients_show_command_function (vlib_main_t * vm, @@ -601,13 +589,11 @@ dhcp6_clients_show_command_function (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp6_clients_show_command, static) = { .path = "show dhcp6 clients", .short_help = "show dhcp6 clients", .function = dhcp6_clients_show_command_function, }; -/* *INDENT-ON* */ int dhcp6_client_enable_disable (u32 sw_if_index, u8 enable) @@ -659,7 +645,6 @@ dhcp6_client_enable_disable (u32 sw_if_index, u8 enable) disable_process (); } - /* *INDENT-OFF* */ pool_foreach (address_info, rm->address_pool) { if (address_info->sw_if_index == sw_if_index) @@ -680,7 +665,6 @@ dhcp6_client_enable_disable (u32 sw_if_index, u8 enable) pool_put (rm->address_pool, address_info); } } - /* *INDENT-ON* */ } if (!enable) @@ -745,13 +729,11 @@ done: * @cliexcmd{dhcp6 client GigabitEthernet2/0/0 disable} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp6_client_enable_disable_command, static) = { .path = "dhcp6 client", .short_help = "dhcp6 client <interface> [disable]", .function = dhcp6_client_enable_disable_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcp_ia_na_client_cp_init (vlib_main_t * vm) diff --git a/src/plugins/dhcp/dhcp6_ia_na_client_dp.c b/src/plugins/dhcp/dhcp6_ia_na_client_dp.c index c240beb3eb3..e957f88884a 100644 --- a/src/plugins/dhcp/dhcp6_ia_na_client_dp.c +++ b/src/plugins/dhcp/dhcp6_ia_na_client_dp.c @@ -346,13 +346,11 @@ send_dhcp6_client_message_process (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (send_dhcp6_client_message_process_node, static) = { .function = send_dhcp6_client_message_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "send-dhcp6-client-message-process", }; -/* *INDENT-ON* */ void dhcp6_send_client_message (vlib_main_t * vm, u32 sw_if_index, u8 stop, diff --git a/src/plugins/dhcp/dhcp6_packet.h b/src/plugins/dhcp/dhcp6_packet.h index d5467952a64..78a665f926d 100644 --- a/src/plugins/dhcp/dhcp6_packet.h +++ b/src/plugins/dhcp/dhcp6_packet.h @@ -119,7 +119,6 @@ typedef struct dhcpv6_hdr_ u8 data[0]; } dhcpv6_header_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct dhcpv6_relay_ctx_ { dhcpv6_header_t *pkt; u32 pkt_len; @@ -130,10 +129,8 @@ typedef CLIB_PACKED (struct dhcpv6_relay_ctx_ { char ctx_name[32+1]; u8 dhcp_msg_type; }) dhcpv6_relay_ctx_t; -/* *INDENT-ON* */ //Structure for DHCPv6 RELAY-FORWARD and DHCPv6 RELAY-REPLY pkts -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct dhcpv6_relay_hdr_ { u8 msg_type; u8 hop_count; @@ -141,7 +138,6 @@ typedef CLIB_PACKED (struct dhcpv6_relay_hdr_ { ip6_address_t peer_addr; u8 data[0]; }) dhcpv6_relay_hdr_t; -/* *INDENT-ON* */ typedef enum dhcp_stats_action_type_ { @@ -171,51 +167,39 @@ typedef enum dhcpv6_stats_drop_reason_ #define dhcpv6_optlen(opt) clib_net_to_host_u16((opt)->length) -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u16 option; u16 length; u8 data[0]; }) dhcpv6_option_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { dhcpv6_option_t opt; u16 status_code; }) dhcpv6_status_code_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { dhcpv6_option_t opt; u32 int_idx; }) dhcpv6_int_id_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { dhcpv6_option_t opt; u8 vss_type; u8 data[0]; }) dhcpv6_vss_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { dhcpv6_option_t opt; u32 ent_num; u32 rmt_id; }) dhcpv6_rmt_id_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { dhcpv6_option_t opt; u16 link_type; u8 data[6]; // data[0]:data[5]: MAC address }) dhcpv6_client_mac_t; -/* *INDENT-ON* */ typedef CLIB_PACKED (struct { diff --git a/src/plugins/dhcp/dhcp6_pd_client_cp.c b/src/plugins/dhcp/dhcp6_pd_client_cp.c index b1784bd9420..b30f7c0af79 100644 --- a/src/plugins/dhcp/dhcp6_pd_client_cp.c +++ b/src/plugins/dhcp/dhcp6_pd_client_cp.c @@ -371,12 +371,10 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp) * We're going to loop through the pool multiple times, * so collect active indices. */ - /* *INDENT-OFF* */ pool_foreach (prefix_info, pm->prefix_pool) { vec_add1 (pm->indices, prefix_info - pm->prefix_pool); } - /* *INDENT-ON* */ for (i = 0; i < n_prefixes; i++) { @@ -480,7 +478,6 @@ create_prefix_list (u32 sw_if_index) ip6_prefix_main_t *pm = &ip6_prefix_main; prefix_info_t *prefix_info, *prefix_list = 0;; - /* *INDENT-OFF* */ pool_foreach (prefix_info, pm->prefix_pool) { if (is_dhcpv6_pd_prefix (prefix_info) && @@ -491,7 +488,6 @@ create_prefix_list (u32 sw_if_index) clib_memcpy (&prefix_list[pos], prefix_info, sizeof (*prefix_info)); } } - /* *INDENT-ON* */ return prefix_list; } @@ -530,7 +526,6 @@ dhcp6_pd_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, do { due_time = current_time + 1e9; - /* *INDENT-OFF* */ pool_foreach (prefix_info, pm->prefix_pool) { if (is_dhcpv6_pd_prefix (prefix_info)) @@ -559,7 +554,6 @@ dhcp6_pd_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, } } } - /* *INDENT-ON* */ for (i = 0; i < vec_len (rm->client_state_by_sw_if_index); i++) { client_state_t *cs = &rm->client_state_by_sw_if_index[i]; @@ -608,13 +602,11 @@ dhcp6_pd_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcp6_pd_client_cp_process_node) = { .function = dhcp6_pd_client_cp_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "dhcp6-pd-client-cp-process", }; -/* *INDENT-ON* */ static void interrupt_process (void) @@ -787,14 +779,12 @@ cp_ip6_address_find_new_active_prefix (u32 prefix_group_index, ip6_prefix_main_t *pm = &ip6_prefix_main; prefix_info_t *prefix_info; - /* *INDENT-OFF* */ pool_foreach (prefix_info, pm->prefix_pool) { if (prefix_info->prefix_group_index == prefix_group_index && prefix_info - pm->prefix_pool != ignore_prefix_index) return prefix_info - pm->prefix_pool; } - /* *INDENT-ON* */ return ~0; } @@ -1080,14 +1070,12 @@ done: * prefix group my-prefix-group ::7/64 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_address_add_del_command, static) = { .path = "set ip6 address", .short_help = "set ip6 address <interface> [prefix group <string>] " "<address> [del]", .function = cp_ip6_address_add_del_command_function, }; -/* *INDENT-ON* */ static clib_error_t * cp_ip6_addresses_show_command_function (vlib_main_t * vm, @@ -1119,13 +1107,11 @@ cp_ip6_addresses_show_command_function (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_addresses_show_command, static) = { .path = "show ip6 addresses", .short_help = "show ip6 addresses", .function = cp_ip6_addresses_show_command_function, }; -/* *INDENT-ON* */ static clib_error_t * cp_ip6_prefixes_show_command_function (vlib_main_t * vm, @@ -1138,7 +1124,6 @@ cp_ip6_prefixes_show_command_function (vlib_main_t * vm, const u8 *prefix_group; f64 current_time = vlib_time_now (vm); - /* *INDENT-OFF* */ pool_foreach (prefix_info, pm->prefix_pool) { prefix_group = @@ -1152,18 +1137,15 @@ cp_ip6_prefixes_show_command_function (vlib_main_t * vm, prefix_info->preferred_lt, prefix_info->valid_lt, prefix_info->due_time - current_time); } - /* *INDENT-ON* */ return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_prefixes_show_command, static) = { .path = "show ip6 prefixes", .short_help = "show ip6 prefixes", .function = cp_ip6_prefixes_show_command_function, }; -/* *INDENT-ON* */ static clib_error_t * ip6_pd_clients_show_command_function (vlib_main_t * vm, @@ -1224,13 +1206,11 @@ ip6_pd_clients_show_command_function (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_pd_clients_show_command, static) = { .path = "show ip6 pd clients", .short_help = "show ip6 pd clients", .function = ip6_pd_clients_show_command_function, }; -/* *INDENT-ON* */ @@ -1304,7 +1284,6 @@ dhcp6_pd_client_enable_disable (u32 sw_if_index, vec_validate (prefix_list, 0); - /* *INDENT-OFF* */ pool_foreach (prefix_info, pm->prefix_pool) { if (is_dhcpv6_pd_prefix (prefix_info) && @@ -1325,7 +1304,6 @@ dhcp6_pd_client_enable_disable (u32 sw_if_index, pool_put (pm->prefix_pool, prefix_info); } } - /* *INDENT-ON* */ vec_free (prefix_list); @@ -1398,13 +1376,11 @@ done: * @cliexcmd{dhcp6 pd client GigabitEthernet2/0/0 disable} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcp6_pd_client_enable_disable_command, static) = { .path = "dhcp6 pd client", .short_help = "dhcp6 pd client <interface> (prefix group <string> | disable)", .function = dhcp6_pd_client_enable_disable_command_fn, }; -/* *INDENT-ON* */ #include <vlib/unix/plugin.h> diff --git a/src/plugins/dhcp/dhcp6_pd_client_dp.c b/src/plugins/dhcp/dhcp6_pd_client_dp.c index b43e5a4754d..340930c913e 100644 --- a/src/plugins/dhcp/dhcp6_pd_client_dp.c +++ b/src/plugins/dhcp/dhcp6_pd_client_dp.c @@ -352,13 +352,11 @@ send_dhcp6_pd_client_message_process (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (send_dhcp6_pd_client_message_process_node, static) = { .function = send_dhcp6_pd_client_message_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "send-dhcp6-pd-client-message-process", }; -/* *INDENT-ON* */ void dhcp6_pd_send_client_message (vlib_main_t * vm, u32 sw_if_index, u8 stop, diff --git a/src/plugins/dhcp/dhcp6_proxy_node.c b/src/plugins/dhcp/dhcp6_proxy_node.c index ad0b70498a0..a1d41e83b0f 100644 --- a/src/plugins/dhcp/dhcp6_proxy_node.c +++ b/src/plugins/dhcp/dhcp6_proxy_node.c @@ -105,7 +105,6 @@ ip6_interface_first_global_or_site_address (ip6_main_t * im, u32 sw_if_index) ip_interface_address_t *ia = 0; ip6_address_t *result = 0; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm, ia, sw_if_index, 1 /* honor unnumbered */, ({ @@ -116,7 +115,6 @@ ip6_interface_first_global_or_site_address (ip6_main_t * im, u32 sw_if_index) break; } })); - /* *INDENT-ON* */ return result; } @@ -532,7 +530,6 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcpv6_proxy_to_server_node, static) = { .function = dhcpv6_proxy_to_server_input, .name = "dhcpv6-proxy-to-server", @@ -555,7 +552,6 @@ VLIB_REGISTER_NODE (dhcpv6_proxy_to_server_node, static) = { .unformat_buffer = unformat_dhcpv6_proxy_header, #endif }; -/* *INDENT-ON* */ static uword dhcpv6_proxy_to_client_input (vlib_main_t * vm, @@ -826,7 +822,6 @@ dhcpv6_proxy_to_client_input (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcpv6_proxy_to_client_node, static) = { .function = dhcpv6_proxy_to_client_input, .name = "dhcpv6-proxy-to-client", @@ -841,7 +836,6 @@ VLIB_REGISTER_NODE (dhcpv6_proxy_to_client_node, static) = { .unformat_buffer = unformat_dhcpv6_proxy_header, #endif }; -/* *INDENT-ON* */ static clib_error_t * dhcp6_proxy_init (vlib_main_t * vm) @@ -1016,14 +1010,12 @@ dhcpv6_proxy_set_command_fn (vlib_main_t * vm, format_unformat_error, input); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_set_command, static) = { .path = "set dhcpv6 proxy", .short_help = "set dhcpv6 proxy [del] server <ipv6-addr> src-address <ipv6-addr> " "[server-fib-id <fib-id>] [rx-fib-id <fib-id>] ", .function = dhcpv6_proxy_set_command_fn, }; -/* *INDENT-ON* */ static u8 * format_dhcp6_proxy_server (u8 * s, va_list * args) @@ -1080,13 +1072,11 @@ dhcpv6_proxy_show_command_fn (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_show_command, static) = { .path = "show dhcpv6 proxy", .short_help = "Display dhcpv6 proxy info", .function = dhcpv6_proxy_show_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcpv6_vss_command_fn (vlib_main_t * vm, @@ -1129,13 +1119,11 @@ dhcpv6_vss_command_fn (vlib_main_t * vm, } } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_vss_command, static) = { .path = "set dhcpv6 vss", .short_help = "set dhcpv6 vss table <table-id> [oui <n> vpn-id <n> | vpn-ascii-id <text>]", .function = dhcpv6_vss_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcpv6_vss_show_command_fn (vlib_main_t * vm, @@ -1147,13 +1135,11 @@ dhcpv6_vss_show_command_fn (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_vss_show_command, static) = { .path = "show dhcpv6 vss", .short_help = "show dhcpv6 VSS", .function = dhcpv6_vss_show_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * dhcpv6_link_address_show_command_fn (vlib_main_t * vm, @@ -1195,13 +1181,11 @@ dhcpv6_link_address_show_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dhcpv6_proxy_address_show_command, static) = { .path = "show dhcpv6 link-address interface", .short_help = "show dhcpv6 link-address interface <interface>", .function = dhcpv6_link_address_show_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/dhcp/dhcp_api.c b/src/plugins/dhcp/dhcp_api.c index 20b00422a73..1458db3527d 100644 --- a/src/plugins/dhcp/dhcp_api.c +++ b/src/plugins/dhcp/dhcp_api.c @@ -76,12 +76,10 @@ vl_api_dhcp_plugin_control_ping_t_handler (vl_api_dhcp_plugin_control_ping_t * vl_api_dhcp_plugin_control_ping_reply_t *rmp; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_DHCP_PLUGIN_CONTROL_PING_REPLY, ({ rmp->vpe_pid = ntohl (getpid ()); })); - /* *INDENT-ON* */ } static void @@ -726,7 +724,6 @@ dhcp6_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt, call_dhcp6_reply_event_callbacks (event, dcpm->functions); vpe_client_registration_t *reg; - /* *INDENT-OFF* */ pool_foreach (reg, vpe_api_main.dhcp6_reply_events_registrations) { vl_api_registration_t *vl_reg; @@ -743,7 +740,6 @@ dhcp6_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vl_api_send_msg (vl_reg, (u8 *) msg); } } - /* *INDENT-ON* */ clib_mem_free (event); } @@ -754,13 +750,11 @@ dhcp6_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcp6_reply_process_node) = { .function = dhcp6_reply_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "dhcp6-reply-publisher-process", }; -/* *INDENT-ON* */ static clib_error_t * call_dhcp6_pd_reply_event_callbacks (void *data, @@ -838,7 +832,6 @@ dhcp6_pd_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt, call_dhcp6_pd_reply_event_callbacks (event, dpcpm->functions); vpe_client_registration_t *reg; - /* *INDENT-OFF* */ pool_foreach (reg, vpe_api_main.dhcp6_pd_reply_events_registrations) { vl_api_registration_t *vl_reg; @@ -855,7 +848,6 @@ dhcp6_pd_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vl_api_send_msg (vl_reg, (u8 *) msg); } } - /* *INDENT-ON* */ clib_mem_free (event); } @@ -866,13 +858,11 @@ dhcp6_pd_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcp6_pd_reply_process_node) = { .function = dhcp6_pd_reply_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "dhcp6-pd-reply-publisher-process", }; -/* *INDENT-ON* */ /* * dhcp_api_hookup @@ -904,12 +894,10 @@ VLIB_API_INIT_FUNCTION (dhcp_api_hookup); #include <vlib/unix/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Dynamic Host Configuration Protocol (DHCP)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/dhcp/dhcp_client_detect.c b/src/plugins/dhcp/dhcp_client_detect.c index 598bd16cf8d..c02693f2ccf 100644 --- a/src/plugins/dhcp/dhcp_client_detect.c +++ b/src/plugins/dhcp/dhcp_client_detect.c @@ -286,7 +286,6 @@ format_dhcp_client_detect_trace (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dhcp_client_detect_node) = { .name = "ip4-dhcp-client-detect", .vector_size = sizeof (u32), @@ -313,7 +312,6 @@ VNET_FEATURE_INIT (ip4_dvr_reinject_feat_node, static) = .runs_before = VNET_FEATURES ("ip4-not-enabled"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/dns/dns.c b/src/plugins/dns/dns.c index d07a1dac43b..3cecf942d55 100644 --- a/src/plugins/dns/dns.c +++ b/src/plugins/dns/dns.c @@ -61,13 +61,11 @@ dns_cache_clear (dns_main_t * dm) dns_cache_lock (dm, 1); - /* *INDENT-OFF* */ pool_foreach (ep, dm->entries) { vec_free (ep->name); vec_free (ep->pending_requests); } - /* *INDENT-ON* */ pool_free (dm->entries); hash_free (dm->cache_entry_by_name); @@ -1403,7 +1401,6 @@ vl_api_dns_resolve_name_t_handler (vl_api_dns_resolve_name_t * mp) if (ep == 0) return; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_DNS_RESOLVE_NAME_REPLY, ({ ip_address_copy_addr (rmp->ip4_address, &rn.address); if (ip_addr_version (&rn.address) == AF_IP4) @@ -1411,7 +1408,6 @@ vl_api_dns_resolve_name_t_handler (vl_api_dns_resolve_name_t * mp) else rmp->ip6_set = 1; })); - /* *INDENT-ON* */ } static void @@ -1480,13 +1476,11 @@ vl_api_dns_resolve_ip_t_handler (vl_api_dns_resolve_ip_t * mp) if (ep == 0) return; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_DNS_RESOLVE_IP_REPLY, ({ rv = vnet_dns_response_to_name (ep->dns_response, rmp, 0 /* ttl-ptr */); rmp->retval = clib_host_to_net_u32 (rv); })); - /* *INDENT-ON* */ } static clib_error_t * @@ -2096,7 +2090,6 @@ format_dns_cache (u8 * s, va_list * args) if (verbose > 0) { - /* *INDENT-OFF* */ pool_foreach (ep, dm->entries) { if (ep->flags & DNS_CACHE_ENTRY_FLAG_VALID) @@ -2135,7 +2128,6 @@ format_dns_cache (u8 * s, va_list * args) } vec_add1 (s, '\n'); } - /* *INDENT-ON* */ } dns_cache_unlock (dm); @@ -2170,14 +2162,12 @@ show_dns_cache_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_dns_cache_command) = { .path = "show dns cache", .short_help = "show dns cache [verbose [nn]]", .function = show_dns_cache_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_dns_servers_command_fn (vlib_main_t * vm, @@ -2207,14 +2197,12 @@ show_dns_servers_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_dns_server_command) = { .path = "show dns servers", .short_help = "show dns servers", .function = show_dns_servers_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -2309,14 +2297,12 @@ dns_cache_add_del_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dns_cache_add_del_command) = { .path = "dns cache", .short_help = "dns cache [add|del|clear] <name> [ip4][ip6]", .function = dns_cache_add_del_command_fn, }; -/* *INDENT-ON* */ #define DNS_FORMAT_TEST 1 @@ -2557,14 +2543,12 @@ test_dns_fmt_command_fn (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_dns_fmt_command) = { .path = "test dns format", .short_help = "test dns format", .function = test_dns_fmt_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * test_dns_unfmt_command_fn (vlib_main_t * vm, @@ -2597,14 +2581,12 @@ test_dns_unfmt_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_dns_unfmt_command) = { .path = "test dns unformat", .short_help = "test dns unformat <name> [ip4][ip6]", .function = test_dns_unfmt_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * test_dns_expire_command_fn (vlib_main_t * vm, @@ -2640,14 +2622,12 @@ test_dns_expire_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_dns_expire_command) = { .path = "test dns expire", .short_help = "test dns expire <name>", .function = test_dns_expire_command_fn, }; -/* *INDENT-ON* */ #endif void @@ -2889,7 +2869,6 @@ dns_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (dns_init) = { .init_order = VLIB_INITS ("flow_classify_init", "dns_init"), }; @@ -2899,7 +2878,6 @@ VLIB_PLUGIN_REGISTER () = .version = VPP_BUILD_VER, .description = "Simple DNS name resolver", }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/dns/dns_packet.h b/src/plugins/dns/dns_packet.h index da5ddfa64fe..13daf7849de 100644 --- a/src/plugins/dns/dns_packet.h +++ b/src/plugins/dns/dns_packet.h @@ -20,7 +20,6 @@ * DNS packet header format */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u16 id; /**< transaction ID */ u16 flags; /**< flags */ @@ -29,7 +28,6 @@ typedef CLIB_PACKED (struct { u16 nscount; /**< number of name servers */ u16 arcount; /**< number of additional records */ }) dns_header_t; -/* *INDENT-ON* */ #define DNS_RCODE_MASK (0xf) #define DNS_RCODE_NO_ERROR 0 @@ -99,17 +97,14 @@ typedef CLIB_PACKED (struct { /** * DNS "question" fixed header. */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u16 type; /**< record type requested */ u16 class; /**< class, 1 = internet */ }) dns_query_t; -/* *INDENT-ON* */ /** * DNS RR fixed header. */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u16 type; /**< record type */ u16 class; /**< class, 1 = internet */ @@ -118,7 +113,6 @@ typedef CLIB_PACKED (struct { /**< length of r */ u8 rdata[0]; }) dns_rr_t; -/* *INDENT-ON* */ /* * There are quite a number of DNS record types diff --git a/src/plugins/dns/reply_node.c b/src/plugins/dns/reply_node.c index b15943a6448..cc9f6065474 100644 --- a/src/plugins/dns/reply_node.c +++ b/src/plugins/dns/reply_node.c @@ -200,7 +200,6 @@ dns46_reply_node_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dns46_reply_node) = { .function = dns46_reply_node_fn, @@ -216,7 +215,6 @@ VLIB_REGISTER_NODE (dns46_reply_node) = [DNS46_REPLY_NEXT_PUNT] = "error-punt", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/dns/request_node.c b/src/plugins/dns/request_node.c index 9e76a56f961..13ebc4c2c13 100644 --- a/src/plugins/dns/request_node.c +++ b/src/plugins/dns/request_node.c @@ -288,7 +288,6 @@ dns4_request_node_fn (vlib_main_t * vm, return dns46_request_inline (vm, node, frame, 0 /* is_ip6 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dns4_request_node) = { .function = dns4_request_node_fn, @@ -305,7 +304,6 @@ VLIB_REGISTER_NODE (dns4_request_node) = [DNS46_REQUEST_NEXT_IP_LOOKUP] = "ip4-lookup", }, }; -/* *INDENT-ON* */ static uword dns6_request_node_fn (vlib_main_t * vm, @@ -315,7 +313,6 @@ dns6_request_node_fn (vlib_main_t * vm, return dns46_request_inline (vm, node, frame, 1 /* is_ip6 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dns6_request_node) = { .function = dns6_request_node_fn, @@ -332,7 +329,6 @@ VLIB_REGISTER_NODE (dns6_request_node) = [DNS46_REQUEST_NEXT_IP_LOOKUP] = "ip6-lookup", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c index 2379a9aa7d0..f3137a996d6 100644 --- a/src/plugins/dpdk/buffer.c +++ b/src/plugins/dpdk/buffer.c @@ -460,11 +460,9 @@ dpdk_buffer_pools_create (vlib_main_t * vm) ops.dequeue = dpdk_ops_vpp_dequeue_no_cache; rte_mempool_register_ops (&ops); - /* *INDENT-OFF* */ vec_foreach (bp, vm->buffer_main->buffer_pools) if (bp->start && (err = dpdk_buffer_pool_init (vm, bp))) return err; - /* *INDENT-ON* */ return 0; } diff --git a/src/plugins/dpdk/device/cli.c b/src/plugins/dpdk/device/cli.c index af522a56198..c838800deb4 100644 --- a/src/plugins/dpdk/device/cli.c +++ b/src/plugins/dpdk/device/cli.c @@ -77,14 +77,12 @@ show_dpdk_buffer (vlib_main_t * vm, unformat_input_t * input, * name="mbuf_pool_socket0" available = 15104 allocated = 1280 total = 16384 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_show_dpdk_buffer,static) = { .path = "show dpdk buffer", .short_help = "show dpdk buffer", .function = show_dpdk_buffer, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * show_dpdk_physmem (vlib_main_t * vm, unformat_input_t * input, @@ -162,14 +160,12 @@ error: * @cliexstart{show dpdk physmem} * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_show_dpdk_physmem,static) = { .path = "show dpdk physmem", .short_help = "show dpdk physmem", .function = show_dpdk_physmem, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * test_dpdk_buffer (vlib_main_t * vm, unformat_input_t * input, @@ -250,14 +246,12 @@ test_dpdk_buffer (vlib_main_t * vm, unformat_input_t * input, * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_test_dpdk_buffer,static) = { .path = "test dpdk buffer", .short_help = "test dpdk buffer [allocate <nn>] [free <nn>]", .function = test_dpdk_buffer, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * set_dpdk_if_desc (vlib_main_t * vm, unformat_input_t * input, @@ -336,13 +330,11 @@ done: * Example of how to set the DPDK interface descriptors: * @cliexcmd{set dpdk interface descriptors GigabitEthernet0/8/0 rx 512 tx 512} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_set_dpdk_if_desc,static) = { .path = "set dpdk interface descriptors", .short_help = "set dpdk interface descriptors <interface> [rx <nn>] [tx <nn>]", .function = set_dpdk_if_desc, }; -/* *INDENT-ON* */ static clib_error_t * show_dpdk_version_command_fn (vlib_main_t * vm, @@ -368,13 +360,11 @@ show_dpdk_version_command_fn (vlib_main_t * vm, * -w 0000:00:08.0 -w 0000:00:09.0 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_vpe_version_command, static) = { .path = "show dpdk version", .short_help = "show dpdk version", .function = show_dpdk_version_command_fn, }; -/* *INDENT-ON* */ /* Dummy function to get us linked in. */ void diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c index 1d97eee8055..0ba59562838 100644 --- a/src/plugins/dpdk/device/device.c +++ b/src/plugins/dpdk/device/device.c @@ -624,7 +624,6 @@ dpdk_interface_set_rss_queues (struct vnet_main_t *vnm, clib_memset (reta, 0, dev_info.reta_size * sizeof (*reta)); valid_queue_count = 0; - /* *INDENT-OFF* */ clib_bitmap_foreach (i, bitmap) { if (i >= dev_info.nb_rx_queues) { @@ -633,7 +632,6 @@ dpdk_interface_set_rss_queues (struct vnet_main_t *vnm, } reta[valid_queue_count++] = i; } - /* *INDENT-ON* */ /* check valid_queue_count not zero, make coverity happy */ if (valid_queue_count == 0) @@ -723,7 +721,6 @@ dpdk_interface_rx_mode_change (vnet_main_t *vnm, u32 hw_if_index, u32 qid, return 0; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (dpdk_device_class) = { .name = "dpdk", .tx_function_n_errors = DPDK_TX_FUNC_N_ERROR, @@ -742,7 +739,6 @@ VNET_DEVICE_CLASS (dpdk_device_class) = { .set_rss_queues_function = dpdk_interface_set_rss_queues, .rx_mode_change_function = dpdk_interface_rx_mode_change, }; -/* *INDENT-ON* */ #define UP_DOWN_FLAG_EVENT 1 @@ -789,14 +785,12 @@ admin_up_down_process (vlib_main_t * vm, return 0; /* or not */ } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (admin_up_down_process_node) = { .function = admin_up_down_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "admin-up-down-process", .process_log2_n_stack_bytes = 17, // 256KB }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index 0e612c60405..c4170c20329 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -565,7 +565,6 @@ format_dpdk_device (u8 * s, va_list * args) if (ret >= 0 && ret <= len) { - /* *INDENT-OFF* */ vec_foreach_index(i, xd->xstats) { xstat = vec_elt_at_index(xd->xstats, i); @@ -577,7 +576,6 @@ format_dpdk_device (u8 * s, va_list * args) xstat->value); } } - /* *INDENT-ON* */ vec_free (xstat_names); } diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index 2da0258ca06..d15cfd7233a 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -548,7 +548,6 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf) int i; addrs = vlib_pci_get_all_dev_addrs (); - /* *INDENT-OFF* */ vec_foreach (addr, addrs) { dpdk_device_config_t * devconf = 0; @@ -734,7 +733,6 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf) clib_error_report (error); } } - /* *INDENT-ON* */ vec_free (pci_addr); vlib_pci_free_device_info (d); } @@ -749,7 +747,6 @@ dpdk_bind_vmbus_devices_to_uio (dpdk_config_main_t * conf) addrs = vlib_vmbus_get_all_dev_addrs (); - /* *INDENT-OFF* */ vec_foreach (addr, addrs) { dpdk_device_config_t *devconf = 0; @@ -814,7 +811,6 @@ dpdk_bind_vmbus_devices_to_uio (dpdk_config_main_t * conf) clib_error_report (error); } } - /* *INDENT-ON* */ } uword @@ -1254,7 +1250,6 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input) default_hugepage_sz = clib_mem_get_default_hugepage_size (); - /* *INDENT-OFF* */ clib_bitmap_foreach (x, tm->cpu_socket_bitmap) { clib_error_t *e; @@ -1267,7 +1262,6 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input) if ((e = clib_sysfs_prealloc_hugepages(x, 0, n_pages))) clib_error_report (e); } - /* *INDENT-ON* */ } /* on/off dpdk's telemetry thread */ @@ -1569,14 +1563,12 @@ dpdk_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dpdk_process_node,static) = { .function = dpdk_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "dpdk-process", .process_log2_n_stack_bytes = 17, }; -/* *INDENT-ON* */ static clib_error_t * dpdk_init (vlib_main_t * vm) diff --git a/src/plugins/dpdk/device/node.c b/src/plugins/dpdk/device/node.c index 045b3ff1ce6..ca1690b708f 100644 --- a/src/plugins/dpdk/device/node.c +++ b/src/plugins/dpdk/device/node.c @@ -560,7 +560,6 @@ VLIB_NODE_FN (dpdk_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return n_rx_packets; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dpdk_input_node) = { .type = VLIB_NODE_TYPE_INPUT, .name = "dpdk-input", @@ -576,7 +575,6 @@ VLIB_REGISTER_NODE (dpdk_input_node) = { .n_errors = DPDK_N_ERROR, .error_strings = dpdk_error_strings, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/dpdk/main.c b/src/plugins/dpdk/main.c index ec0e8fb7ffe..47007219482 100644 --- a/src/plugins/dpdk/main.c +++ b/src/plugins/dpdk/main.c @@ -87,7 +87,6 @@ static clib_error_t * dpdk_main_init (vlib_main_t * vm) return error; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (dpdk_main_init) = { .runs_after = VLIB_INITS("dpdk_init"), @@ -97,4 +96,3 @@ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Data Plane Development Kit (DPDK)", }; -/* *INDENT-ON* */ diff --git a/src/plugins/flowprobe/flowprobe.c b/src/plugins/flowprobe/flowprobe.c index 30521b5a0ca..58a7cfe22f1 100644 --- a/src/plugins/flowprobe/flowprobe.c +++ b/src/plugins/flowprobe/flowprobe.c @@ -45,7 +45,6 @@ uword flowprobe_walker_process (vlib_main_t * vm, vlib_node_runtime_t * rt, #include <vlibapi/api_helper_macros.h> /* Define the per-interface configurable features */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (flowprobe_input_ip4_unicast, static) = { .arc_name = "ip4-unicast", .node_name = "flowprobe-input-ip4", @@ -88,7 +87,6 @@ VNET_FEATURE_INIT (flowprobe_output_l2, static) = { .node_name = "flowprobe-output-l2", .runs_before = VNET_FEATURES ("interface-output-arc-end"), }; -/* *INDENT-ON* */ #define FINISH \ vec_add1 (s, 0); \ @@ -1026,12 +1024,10 @@ vl_api_flowprobe_get_params_t_handler (vl_api_flowprobe_get_params_t *mp) // clang-format on } -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Flow per Packet", }; -/* *INDENT-ON* */ u8 * format_flowprobe_direction (u8 *s, va_list *args) @@ -1115,14 +1111,12 @@ flowprobe_show_table_fn (vlib_main_t * vm, for (i = 0; i < vec_len (fm->pool_per_worker); i++) { - /* *INDENT-OFF* */ pool_foreach (e, fm->pool_per_worker[i]) { vlib_cli_output (vm, "%U", format_flowprobe_entry, e); } - /* *INDENT-ON* */ } return 0; @@ -1324,7 +1318,6 @@ flowprobe_show_params_command_fn (vlib_main_t * vm, * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (flowprobe_enable_disable_command, static) = { .path = "flowprobe feature add-del", .short_help = "flowprobe feature add-del <interface-name> [(l2|ip4|ip6)] " @@ -1360,7 +1353,6 @@ VLIB_CLI_COMMAND (flowprobe_show_stats_command, static) = { .short_help = "show flowprobe statistics", .function = flowprobe_show_stats_fn, }; -/* *INDENT-ON* */ /* * Main-core process, sending an interrupt to the per worker input @@ -1414,13 +1406,11 @@ timer_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return 0; /* or not */ } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (flowprobe_timer_node,static) = { .function = timer_process, .name = "flowprobe-timer-process", .type = VLIB_NODE_TYPE_PROCESS, }; -/* *INDENT-ON* */ #include <flowprobe/flowprobe.api.c> diff --git a/src/plugins/flowprobe/flowprobe.h b/src/plugins/flowprobe/flowprobe.h index 0a70303b470..1fde5f94491 100644 --- a/src/plugins/flowprobe/flowprobe.h +++ b/src/plugins/flowprobe/flowprobe.h @@ -42,7 +42,6 @@ typedef enum FLOW_N_RECORDS = 1 << 5, } flowprobe_record_t; -/* *INDENT-OFF* */ typedef enum __attribute__ ((__packed__)) { FLOW_VARIANT_IP4 = 0, @@ -59,7 +58,6 @@ typedef enum __attribute__ ((__packed__)) FLOW_DIRECTION_TX, FLOW_DIRECTION_BOTH, } flowprobe_direction_t; -/* *INDENT-ON* */ STATIC_ASSERT (sizeof (flowprobe_variant_t) == 1, "flowprobe_variant_t is expected to be 1 byte, " @@ -79,7 +77,6 @@ typedef struct u16 *next_record_offset_per_worker; } flowprobe_protocol_context_t; -/* *INDENT-OFF* */ typedef struct __attribute__ ((aligned (8))) { u32 rx_sw_if_index; u32 tx_sw_if_index; @@ -94,7 +91,6 @@ typedef struct __attribute__ ((aligned (8))) { flowprobe_variant_t which; flowprobe_direction_t direction; } flowprobe_key_t; -/* *INDENT-ON* */ typedef struct { @@ -142,9 +138,7 @@ typedef struct u8 ht_log2len; /* Hash table size is 2^log2len */ u32 **hash_per_worker; flowprobe_entry_t **pool_per_worker; - /* *INDENT-OFF* */ TWT (tw_timer_wheel) ** timers_per_worker; - /* *INDENT-ON* */ u32 **expired_passive_per_worker; flowprobe_record_t record; diff --git a/src/plugins/flowprobe/node.c b/src/plugins/flowprobe/node.c index cf03449e13a..03511689dda 100644 --- a/src/plugins/flowprobe/node.c +++ b/src/plugins/flowprobe/node.c @@ -392,9 +392,7 @@ add_to_flow_record_state (vlib_main_t *vm, vlib_node_runtime_t *node, ethernet_buffer_get_header (b); u16 ethertype = clib_net_to_host_u16 (eth->type); i16 l3_hdr_offset = (u8 *) eth - b->data + sizeof (ethernet_header_t); - /* *INDENT-OFF* */ flowprobe_key_t k = {}; - /* *INDENT-ON* */ ip4_header_t *ip4 = 0; ip6_header_t *ip6 = 0; udp_header_t *udp = 0; @@ -1130,7 +1128,6 @@ flowprobe_flush_l2 (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f) return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (flowprobe_input_ip4_node) = { .function = flowprobe_input_ip4_node_fn, .name = "flowprobe-input-ip4", @@ -1221,7 +1218,6 @@ VLIB_REGISTER_NODE (flowprobe_flush_l2_node) = { .type = VLIB_NODE_TYPE_INPUT, .state = VLIB_NODE_STATE_INTERRUPT, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/geneve/decap.c b/src/plugins/geneve/decap.c index bd189913f71..c64121e2829 100644 --- a/src/plugins/geneve/decap.c +++ b/src/plugins/geneve/decap.c @@ -812,7 +812,6 @@ static char *geneve_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (geneve4_input_node) = { .name = "geneve4-input", /* Takes a vector of packets. */ @@ -847,7 +846,6 @@ VLIB_REGISTER_NODE (geneve6_input_node) = { .format_trace = format_geneve_rx_trace, // $$$$ .unformat_buffer = unformat_geneve_header, }; -/* *INDENT-ON* */ typedef enum { @@ -1252,7 +1250,6 @@ VLIB_NODE_FN (ip4_geneve_bypass_node) (vlib_main_t * vm, return ip_geneve_bypass_inline (vm, node, frame, /* is_ip4 */ 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_geneve_bypass_node) = { .name = "ip4-geneve-bypass", @@ -1265,7 +1262,6 @@ VLIB_REGISTER_NODE (ip4_geneve_bypass_node) = .format_buffer = format_ip4_header, .format_trace = format_ip4_forward_next_trace, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip6_geneve_bypass_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1274,7 +1270,6 @@ VLIB_NODE_FN (ip6_geneve_bypass_node) (vlib_main_t * vm, return ip_geneve_bypass_inline (vm, node, frame, /* is_ip4 */ 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_geneve_bypass_node) = { .name = "ip6-geneve-bypass", @@ -1288,7 +1283,6 @@ VLIB_REGISTER_NODE (ip6_geneve_bypass_node) = .format_buffer = format_ip6_header, .format_trace = format_ip6_forward_next_trace, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/geneve/encap.c b/src/plugins/geneve/encap.c index 6a84d0c5490..609da2218cf 100644 --- a/src/plugins/geneve/encap.c +++ b/src/plugins/geneve/encap.c @@ -544,7 +544,6 @@ VLIB_NODE_FN (geneve6_encap_node) (vlib_main_t * vm, return geneve_encap_inline (vm, node, from_frame, /* is_ip4 */ 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (geneve4_encap_node) = { .name = "geneve4-encap", .vector_size = sizeof (u32), @@ -570,7 +569,6 @@ VLIB_REGISTER_NODE (geneve6_encap_node) = { [GENEVE_ENCAP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/geneve/geneve.c b/src/plugins/geneve/geneve.c index 2bdd1627564..37b83d01761 100644 --- a/src/plugins/geneve/geneve.c +++ b/src/plugins/geneve/geneve.c @@ -114,7 +114,6 @@ geneve_mac_change (vnet_hw_interface_t * hi, return (NULL); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (geneve_device_class, static) = { .name = "GENEVE", .format_device_name = format_geneve_name, @@ -122,7 +121,6 @@ VNET_DEVICE_CLASS (geneve_device_class, static) = { .admin_up_down_function = geneve_interface_admin_up_down, .mac_addr_change_function = geneve_mac_change, }; -/* *INDENT-ON* */ static u8 * format_geneve_header_with_length (u8 * s, va_list * args) @@ -132,13 +130,11 @@ format_geneve_header_with_length (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (geneve_hw_class) = { .name = "GENEVE", .format_header = format_geneve_header_with_length, .build_rewrite = default_build_rewrite, }; -/* *INDENT-ON* */ static void geneve_tunnel_restack_dpo (geneve_tunnel_t * t) @@ -878,7 +874,6 @@ done: * Example of how to delete a GENEVE Tunnel: * @cliexcmd{create geneve tunnel local 10.0.3.1 remote 10.0.3.3 vni 13 del} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_geneve_tunnel_command, static) = { .path = "create geneve tunnel", .short_help = @@ -887,7 +882,6 @@ VLIB_CLI_COMMAND (create_geneve_tunnel_command, static) = { " [encap-vrf-id <nn>] [decap-next [l2|node <name>]] [l3-mode] [del]", .function = geneve_add_del_tunnel_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_geneve_tunnel_command_fn (vlib_main_t * vm, @@ -917,13 +911,11 @@ show_geneve_tunnel_command_fn (vlib_main_t * vm, * [0] local 10.0.3.1 remote 10.0.3.3 vni 13 encap_fib_index 0 sw_if_index 5 decap_next l2 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_geneve_tunnel_command, static) = { .path = "show geneve tunnel", .short_help = "show geneve tunnel", .function = show_geneve_tunnel_command_fn, }; -/* *INDENT-ON* */ void @@ -1031,13 +1023,11 @@ set_ip4_geneve_bypass (vlib_main_t * vm, * @cliexcmd{set interface ip geneve-bypass GigabitEthernet2/0/0 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip_geneve_bypass_command, static) = { .path = "set interface ip geneve-bypass", .function = set_ip4_geneve_bypass, .short_help = "set interface ip geneve-bypass <interface> [del]", }; -/* *INDENT-ON* */ static clib_error_t * set_ip6_geneve_bypass (vlib_main_t * vm, @@ -1088,13 +1078,11 @@ set_ip6_geneve_bypass (vlib_main_t * vm, * @cliexcmd{set interface ip6 geneve-bypass GigabitEthernet2/0/0 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip6_geneve_bypass_command, static) = { .path = "set interface ip6 geneve-bypass", .function = set_ip6_geneve_bypass, .short_help = "set interface ip6 geneve-bypass <interface> [del]", }; -/* *INDENT-ON* */ clib_error_t * geneve_init (vlib_main_t * vm) diff --git a/src/plugins/geneve/geneve_api.c b/src/plugins/geneve/geneve_api.c index 5a983948c26..120fab93561 100644 --- a/src/plugins/geneve/geneve_api.c +++ b/src/plugins/geneve/geneve_api.c @@ -97,12 +97,10 @@ static void vl_api_geneve_add_del_tunnel_t_handler rv = vnet_geneve_add_del_tunnel (&a, &sw_if_index); out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_GENEVE_ADD_DEL_TUNNEL_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); })); - /* *INDENT-ON* */ } static void vl_api_geneve_add_del_tunnel2_t_handler @@ -149,12 +147,10 @@ static void vl_api_geneve_add_del_tunnel2_t_handler rv = vnet_geneve_add_del_tunnel (&a, &sw_if_index); out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_GENEVE_ADD_DEL_TUNNEL2_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); })); - /* *INDENT-ON* */ } static void send_geneve_tunnel_details @@ -201,12 +197,10 @@ static void vl_api_geneve_tunnel_dump_t_handler if (~0 == sw_if_index) { - /* *INDENT-OFF* */ pool_foreach (t, vxm->tunnels) { send_geneve_tunnel_details(t, reg, mp->context); } - /* *INDENT-ON* */ } else { @@ -249,12 +243,10 @@ VLIB_API_INIT_FUNCTION (geneve_api_hookup); #include <vlib/unix/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "GENEVE Tunnels", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/gre/gre.c b/src/plugins/gre/gre.c index a15717475f8..ce11ee9ecb2 100644 --- a/src/plugins/gre/gre.c +++ b/src/plugins/gre/gre.c @@ -666,7 +666,6 @@ VLIB_NODE_FN (gre_erspan_encap_node) return (gre_encap_inline (vm, node, frame, GRE_TUNNEL_TYPE_ERSPAN)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (gre_teb_encap_node) = { .name = "gre-teb-encap", @@ -693,7 +692,6 @@ VLIB_REGISTER_NODE (gre_erspan_encap_node) = [GRE_ENCAP_NEXT_L2_MIDCHAIN] = "adj-l2-midchain", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT static u8 * @@ -743,7 +741,6 @@ gre_tunnel_desc (u32 sw_if_index, ip46_address_t *src, ip46_address_t *dst, return (0); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (gre_device_class) = { .name = "GRE tunnel device", .format_device_name = format_gre_tunnel_name, @@ -774,7 +771,6 @@ VNET_HW_INTERFACE_CLASS (mgre_hw_interface_class) = { .update_adjacency = mgre_update_adj, .flags = VNET_HW_INTERFACE_CLASS_FLAG_NBMA, }; -/* *INDENT-ON* */ #endif /* CLIB_MARCH_VARIANT */ static void diff --git a/src/plugins/gre/gre.h b/src/plugins/gre/gre.h index 9e17efcf7ef..ce57454f9b7 100644 --- a/src/plugins/gre/gre.h +++ b/src/plugins/gre/gre.h @@ -293,22 +293,18 @@ typedef struct /** * @brief IPv4 and GRE header. */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip4_header_t ip4; gre_header_t gre; }) ip4_and_gre_header_t; -/* *INDENT-ON* */ /** * @brief IPv6 and GRE header. */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip6_header_t ip6; gre_header_t gre; }) ip6_and_gre_header_t; -/* *INDENT-ON* */ always_inline gre_protocol_info_t * gre_get_protocol_info (gre_main_t * em, gre_protocol_t protocol) diff --git a/src/plugins/gre/gre_api.c b/src/plugins/gre/gre_api.c index f8e3ea654fc..5149f92fb80 100644 --- a/src/plugins/gre/gre_api.c +++ b/src/plugins/gre/gre_api.c @@ -118,10 +118,8 @@ vl_api_gre_tunnel_add_del_t_handler (vl_api_gre_tunnel_add_del_t *mp) rv = vnet_gre_tunnel_add_del (a, &sw_if_index); out: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_GRE_TUNNEL_ADD_DEL_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -129,7 +127,6 @@ send_gre_tunnel_details (gre_tunnel_t *t, vl_api_gre_tunnel_dump_t *mp) { vl_api_gre_tunnel_details_t *rmp; - /* *INDENT-OFF* */ REPLY_MACRO_DETAILS2 ( VL_API_GRE_TUNNEL_DETAILS, ({ ip_address_encode (&t->tunnel_src, IP46_TYPE_ANY, &rmp->tunnel.src); @@ -146,7 +143,6 @@ send_gre_tunnel_details (gre_tunnel_t *t, vl_api_gre_tunnel_dump_t *mp) rmp->tunnel.sw_if_index = htonl (t->sw_if_index); rmp->tunnel.session_id = htons (t->session_id); })); - /* *INDENT-ON* */ } static void @@ -165,12 +161,10 @@ vl_api_gre_tunnel_dump_t_handler (vl_api_gre_tunnel_dump_t *mp) if (~0 == sw_if_index) { - /* *INDENT-OFF* */ pool_foreach (t, gm->tunnels) { send_gre_tunnel_details (t, mp); } - /* *INDENT-ON* */ } else diff --git a/src/plugins/gre/interface.c b/src/plugins/gre/interface.c index 8d93ebd0cf5..bd9a6078502 100644 --- a/src/plugins/gre/interface.c +++ b/src/plugins/gre/interface.c @@ -752,7 +752,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_gre_tunnel_command, static) = { .path = "create gre tunnel", .short_help = "create gre tunnel src <addr> dst <addr> [instance <n>] " @@ -760,7 +759,6 @@ VLIB_CLI_COMMAND (create_gre_tunnel_command, static) = { "[multipoint]", .function = create_gre_tunnel_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_gre_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, @@ -783,12 +781,10 @@ show_gre_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, if (~0 == ti) { - /* *INDENT-OFF* */ pool_foreach (t, gm->tunnels) { vlib_cli_output (vm, "%U", format_gre_tunnel, t); } - /* *INDENT-ON* */ } else { @@ -800,12 +796,10 @@ show_gre_tunnel_command_fn (vlib_main_t *vm, unformat_input_t *input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_gre_tunnel_command, static) = { .path = "show gre tunnel", .function = show_gre_tunnel_command_fn, }; -/* *INDENT-ON* */ const static teib_vft_t gre_teib_vft = { .nv_added = gre_teib_entry_added, diff --git a/src/plugins/gre/node.c b/src/plugins/gre/node.c index 7ee22c3cb11..5235888cc6f 100644 --- a/src/plugins/gre/node.c +++ b/src/plugins/gre/node.c @@ -434,7 +434,6 @@ static char *gre_error_strings[] = { #undef gre_error }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (gre4_input_node) = { .name = "gre4-input", /* Takes a vector of packets. */ @@ -476,7 +475,6 @@ VLIB_REGISTER_NODE (gre6_input_node) = { .format_trace = format_gre_rx_trace, .unformat_buffer = unformat_gre_header, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT void diff --git a/src/plugins/gtpu/gtpu.c b/src/plugins/gtpu/gtpu.c index 1307794b9e5..a2013c91c3f 100644 --- a/src/plugins/gtpu/gtpu.c +++ b/src/plugins/gtpu/gtpu.c @@ -35,7 +35,6 @@ gtpu_main_t gtpu_main; -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip4_gtpu_bypass, static) = { .arc_name = "ip4-unicast", .node_name = "ip4-gtpu-bypass", @@ -47,7 +46,6 @@ VNET_FEATURE_INIT (ip6_gtpu_bypass, static) = { .node_name = "ip6-gtpu-bypass", .runs_before = VNET_FEATURES ("ip6-lookup"), }; -/* *INDENT-on* */ u8 * format_gtpu_encap_trace (u8 * s, va_list * args) { @@ -154,14 +152,12 @@ gtpu_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) return /* no error */ 0; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (gtpu_device_class,static) = { .name = "GTPU", .format_device_name = format_gtpu_name, .format_tx_trace = format_gtpu_encap_trace, .admin_up_down_function = gtpu_interface_admin_up_down, }; -/* *INDENT-ON* */ static u8 * format_gtpu_header_with_length (u8 * s, va_list * args) @@ -171,7 +167,6 @@ format_gtpu_header_with_length (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (gtpu_hw_class) = { .name = "GTPU", @@ -179,7 +174,6 @@ VNET_HW_INTERFACE_CLASS (gtpu_hw_class) = .build_rewrite = default_build_rewrite, .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P, }; -/* *INDENT-ON* */ static void gtpu_tunnel_restack_dpo (gtpu_tunnel_t * t) @@ -1106,7 +1100,6 @@ done: * @cliexcmd{create gtpu tunnel src 10.0.3.1 dst 10.0.3.3 encap-vrf-id 7 * upd-tteid 55} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_gtpu_tunnel_command, static) = { .path = "create gtpu tunnel", .short_help = @@ -1116,7 +1109,6 @@ VLIB_CLI_COMMAND (create_gtpu_tunnel_command, static) = { " [decap-next [l2|ip4|ip6|node <name>]] [qfi <nn>] [del | upd-tteid <nn>]", .function = gtpu_add_del_tunnel_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_gtpu_tunnel_command_fn (vlib_main_t * vm, @@ -1147,13 +1139,11 @@ show_gtpu_tunnel_command_fn (vlib_main_t * vm, sw_if_index 5 decap_next l2 pdu-disabled * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_gtpu_tunnel_command, static) = { .path = "show gtpu tunnel", .short_help = "show gtpu tunnel", .function = show_gtpu_tunnel_command_fn, }; -/* *INDENT-ON* */ void vnet_int_gtpu_bypass_mode (u32 sw_if_index, u8 is_ip6, u8 is_enable) @@ -1259,13 +1249,11 @@ set_ip4_gtpu_bypass (vlib_main_t * vm, * @cliexcmd{set interface ip gtpu-bypass GigabitEthernet2/0/0 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip_gtpu_bypass_command, static) = { .path = "set interface ip gtpu-bypass", .function = set_ip4_gtpu_bypass, .short_help = "set interface ip gtpu-bypass <interface> [del]", }; -/* *INDENT-ON* */ static clib_error_t * set_ip6_gtpu_bypass (vlib_main_t * vm, @@ -1316,13 +1304,11 @@ set_ip6_gtpu_bypass (vlib_main_t * vm, * @cliexcmd{set interface ip6 gtpu-bypass GigabitEthernet2/0/0 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip6_gtpu_bypass_command, static) = { .path = "set interface ip6 gtpu-bypass", .function = set_ip6_gtpu_bypass, .short_help = "set interface ip6 gtpu-bypass <interface> [del]", }; -/* *INDENT-ON* */ int vnet_gtpu_add_del_rx_flow (u32 hw_if_index, u32 t_index, int is_add) @@ -1445,14 +1431,12 @@ gtpu_offload_command_fn (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (gtpu_offload_command, static) = { .path = "set flow-offload gtpu", .short_help = "set flow-offload gtpu hw <inerface-name> rx <tunnel-name> [del]", .function = gtpu_offload_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * gtpu_forward_command_fn (vlib_main_t *vm, unformat_input_t *input, @@ -1622,12 +1606,10 @@ gtpu_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (gtpu_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "GPRS Tunnelling Protocol, User Data (GTPv1-U)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/gtpu/gtpu.h b/src/plugins/gtpu/gtpu.h index 0c224ebbfe3..881fbca936a 100644 --- a/src/plugins/gtpu/gtpu.h +++ b/src/plugins/gtpu/gtpu.h @@ -142,7 +142,6 @@ typedef CLIB_PACKED (struct { { \ .as_u64[0] = 0xffffffffb80d0120ull, .as_u64[1] = 0xffffffffffffffffull \ } -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { ip4_header_t ip4; /* 20 bytes */ @@ -150,9 +149,7 @@ typedef CLIB_PACKED(struct gtpu_header_t gtpu; /* 12 bytes */ gtpu_ext_with_pdu_session_header_t gtpu_ext; /* 4 bytes */ }) ip4_gtpu_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { ip6_header_t ip6; /* 40 bytes */ @@ -160,9 +157,7 @@ typedef CLIB_PACKED(struct gtpu_header_t gtpu; /* 12 bytes */ gtpu_ext_with_pdu_session_header_t gtpu_ext; /* 4 bytes */ }) ip6_gtpu_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /* @@ -177,9 +172,7 @@ typedef CLIB_PACKED u64 as_u64; }; }) gtpu4_tunnel_key_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /* @@ -189,7 +182,6 @@ typedef CLIB_PACKED ip6_address_t src; u32 teid; }) gtpu6_tunnel_key_t; -/* *INDENT-ON* */ typedef struct { diff --git a/src/plugins/gtpu/gtpu_api.c b/src/plugins/gtpu/gtpu_api.c index 1cc9fab6cd2..4efd9ac3bba 100644 --- a/src/plugins/gtpu/gtpu_api.c +++ b/src/plugins/gtpu/gtpu_api.c @@ -300,12 +300,10 @@ vl_api_gtpu_tunnel_dump_t_handler (vl_api_gtpu_tunnel_dump_t * mp) if (~0 == sw_if_index) { - /* *INDENT-OFF* */ pool_foreach (t, gtm->tunnels) { send_gtpu_tunnel_details(t, reg, mp->context); } - /* *INDENT-ON* */ } else { diff --git a/src/plugins/gtpu/gtpu_decap.c b/src/plugins/gtpu/gtpu_decap.c index 21e38297ccf..093d85ef13c 100644 --- a/src/plugins/gtpu/gtpu_decap.c +++ b/src/plugins/gtpu/gtpu_decap.c @@ -2372,7 +2372,6 @@ VLIB_NODE_FN (gtpu4_flow_input_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ #ifndef CLIB_MULTIARCH_VARIANT VLIB_REGISTER_NODE (gtpu4_flow_input_node) = { .name = "gtpu4-flow-input", @@ -2393,6 +2392,5 @@ VLIB_REGISTER_NODE (gtpu4_flow_input_node) = { }, }; #endif -/* *INDENT-ON* */ #endif /* CLIB_MARCH_VARIANT */ diff --git a/src/plugins/hs_apps/echo_server.c b/src/plugins/hs_apps/echo_server.c index 50dc03d86bd..0243252434a 100644 --- a/src/plugins/hs_apps/echo_server.c +++ b/src/plugins/hs_apps/echo_server.c @@ -765,7 +765,6 @@ cleanup: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (echo_server_create_command, static) = { .path = "test echo server", .short_help = @@ -775,7 +774,6 @@ VLIB_CLI_COMMAND (echo_server_create_command, static) = { "[uri <tcp://ip/port>]", .function = echo_server_create_command_fn, }; -/* *INDENT-ON* */ clib_error_t * echo_server_main_init (vlib_main_t * vm) diff --git a/src/plugins/hs_apps/hs_apps.c b/src/plugins/hs_apps/hs_apps.c index 5067919cc28..8e991954c7e 100644 --- a/src/plugins/hs_apps/hs_apps.c +++ b/src/plugins/hs_apps/hs_apps.c @@ -17,13 +17,11 @@ #include <vnet/plugin/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Host Stack Applications", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/hs_apps/proxy.c b/src/plugins/hs_apps/proxy.c index 1010bf4cfa7..e8fedf921a5 100644 --- a/src/plugins/hs_apps/proxy.c +++ b/src/plugins/hs_apps/proxy.c @@ -661,7 +661,6 @@ active_open_cleanup_callback (session_t * s, session_cleanup_ntf_t ntf) proxy_try_delete_session (s, 1 /* is_active_open */ ); } -/* *INDENT-OFF* */ static session_cb_vft_t active_open_clients = { .session_reset_callback = active_open_reset_callback, .session_connected_callback = active_open_connected_callback, @@ -673,7 +672,6 @@ static session_cb_vft_t active_open_clients = { .fifo_tuning_callback = common_fifo_tuning_callback, .proxy_alloc_session_fifos = active_open_alloc_session_fifos, }; -/* *INDENT-ON* */ static int proxy_server_attach () diff --git a/src/plugins/hs_apps/sapi/vpp_echo.c b/src/plugins/hs_apps/sapi/vpp_echo.c index e07e53d194e..08fd4e175e9 100644 --- a/src/plugins/hs_apps/sapi/vpp_echo.c +++ b/src/plugins/hs_apps/sapi/vpp_echo.c @@ -290,13 +290,11 @@ echo_free_sessions (echo_main_t * em) echo_session_t *s; u32 *session_indexes = 0, *session_index; - /* *INDENT-OFF* */ pool_foreach (s, em->sessions) { if (s->session_state == ECHO_SESSION_STATE_CLOSED) vec_add1 (session_indexes, s->session_index); } - /* *INDENT-ON* */ vec_foreach (session_index, session_indexes) { /* Free session */ @@ -1431,11 +1429,9 @@ main (int argc, char **argv) for (i = 0; i < em->tx_buf_size; i++) em->connect_test_data[i] = i & 0xff; - /* *INDENT-OFF* */ svm_msg_q_ring_cfg_t rc[1] = { {rpc_queue_size, sizeof (echo_rpc_msg_t), 0}, }; - /* *INDENT-ON* */ cfg->consumer_pid = getpid (); cfg->n_rings = 1; cfg->q_nitems = rpc_queue_size; diff --git a/src/plugins/hs_apps/sapi/vpp_echo_proto_quic.c b/src/plugins/hs_apps/sapi/vpp_echo_proto_quic.c index c67b35fd8e6..1b0dbf33e29 100644 --- a/src/plugins/hs_apps/sapi/vpp_echo_proto_quic.c +++ b/src/plugins/hs_apps/sapi/vpp_echo_proto_quic.c @@ -239,7 +239,6 @@ quic_echo_initiate_qsession_close_no_stream (echo_main_t * em) /* Close Quic session without streams */ echo_session_t *s; - /* *INDENT-OFF* */ pool_foreach (s, em->sessions) { if (s->session_type == ECHO_SESSION_TYPE_QUIC) @@ -261,7 +260,6 @@ quic_echo_initiate_qsession_close_no_stream (echo_main_t * em) ECHO_LOG (2,"%U: PASSIVE close", echo_format_session, s); } } - /* *INDENT-ON* */ } static void diff --git a/src/plugins/igmp/igmp.c b/src/plugins/igmp/igmp.c index d66a013e3f9..30f167d483a 100644 --- a/src/plugins/igmp/igmp.c +++ b/src/plugins/igmp/igmp.c @@ -35,7 +35,6 @@ igmp_main_t igmp_main; -/* *INDENT-OFF* */ /* General Query address */ const static mfib_prefix_t mpfx_general_query = { .fp_proto = FIB_PROTOCOL_IP4, @@ -57,7 +56,6 @@ const static mfib_prefix_t mpfx_report = { }, }, }; -/* *INDENT-ON* */ /** * @brief igmp send query (igmp_timer_function_t) @@ -345,7 +343,6 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode) IGMP_DBG ("%s: %U", (enable ? "Enabled" : "Disabled"), format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index); - /* *INDENT-OFF* */ fib_route_path_t via_itf_path = { .frp_proto = fib_proto_to_dpo (FIB_PROTOCOL_IP4), @@ -365,7 +362,6 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode) .frp_mitf_flags = MFIB_ITF_FLAG_FORWARD, }; - /* *INDENT-ON* */ /* find configuration, if it doesn't exist, create new */ config = igmp_config_lookup (sw_if_index); mfib_index = mfib_table_get_index_for_sw_if_index (FIB_PROTOCOL_IP4, @@ -488,7 +484,6 @@ igmp_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (igmp_init) = { .runs_after = VLIB_INITS("ip4_lookup_init"), @@ -498,7 +493,6 @@ VLIB_PLUGIN_REGISTER () = .version = VPP_BUILD_VER, .description = "Internet Group Management Protocol (IGMP)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/igmp/igmp_api.c b/src/plugins/igmp/igmp_api.c index a4746ab5c5b..3f743d8fee1 100644 --- a/src/plugins/igmp/igmp_api.c +++ b/src/plugins/igmp/igmp_api.c @@ -154,7 +154,6 @@ igmp_config_dump (igmp_main_t * im, igmp_group_t *group; igmp_src_t *src; - /* *INDENT-OFF* */ FOR_EACH_GROUP (group, config, ({ FOR_EACH_SRC (src, group, IGMP_FILTER_MODE_INCLUDE, @@ -162,7 +161,6 @@ igmp_config_dump (igmp_main_t * im, send_igmp_details (rp, im, config, group, src, context); })); })); - /* *INDENT-ON* */ } static void @@ -180,12 +178,10 @@ vl_api_igmp_dump_t_handler (vl_api_igmp_dump_t * mp) sw_if_index = ntohl (mp->sw_if_index); if (~0 == sw_if_index) { - /* *INDENT-OFF* */ pool_foreach (config, im->configs) { igmp_config_dump(im, rp, mp->context, config); } - /* *INDENT-ON* */ } else { @@ -401,14 +397,12 @@ igmp_event (igmp_filter_mode_t filter, vnet_get_main (), sw_if_index, format_igmp_filter_mode, filter); - /* *INDENT-OFF* */ pool_foreach (api_client, im->api_clients) { rp = vl_api_client_index_to_registration (api_client->client_index); if (rp) send_igmp_event (rp, filter, sw_if_index, saddr, gaddr); } - /* *INDENT-ON* */ } /* Set up the API message handling tables */ diff --git a/src/plugins/igmp/igmp_cli.c b/src/plugins/igmp/igmp_cli.c index f84cdaf50f7..713f4c31bfb 100644 --- a/src/plugins/igmp/igmp_cli.c +++ b/src/plugins/igmp/igmp_cli.c @@ -69,13 +69,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (igmp_clear_interface_command, static) = { .path = "clear igmp", .short_help = "clear igmp int <interface>", .function = igmp_clear_interface_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * igmp_listen_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -150,14 +148,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (igmp_listen_command, static) = { .path = "igmp listen", .short_help = "igmp listen [<enable|disable>] " "int <interface> saddr <ip4-address> gaddr <ip4-address>", .function = igmp_listen_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * igmp_enable_cli (vlib_main_t * vm, @@ -211,13 +207,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (igmp_enable_command, static) = { .path = "igmp", .short_help = "igmp <enable|disable> <host|router> <interface>", .function = igmp_enable_cli, }; -/* *INDENT-ON* */ static clib_error_t * igmp_proxy_device_add_del_command_fn (vlib_main_t * vm, @@ -275,13 +269,11 @@ done: unformat_free (line_input); return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (igmp_proxy_device_add_del_command, static) = { .path = "igmp proxy-dev", .short_help = "igmp proxy-dev <add|del> vrf-id <table-id> <interface>", .function = igmp_proxy_device_add_del_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * igmp_proxy_device_add_del_interface_command_fn (vlib_main_t * vm, @@ -339,13 +331,11 @@ done: unformat_free (line_input); return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (igmp_proxy_device_add_del_interface_command, static) = { .path = "igmp proxy-dev itf", .short_help = "igmp proxy-dev itf <add|del> vrf-id <table-id> <interface>", .function = igmp_proxy_device_add_del_interface_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * igmp_show_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -355,23 +345,19 @@ igmp_show_command_fn (vlib_main_t * vm, unformat_input_t * input, igmp_main_t *im = &igmp_main; igmp_config_t *config; - /* *INDENT-OFF* */ pool_foreach (config, im->configs) { vlib_cli_output (vm, "%U", format_igmp_config, config); } - /* *INDENT-ON* */ return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (igmp_show_command, static) = { .path = "show igmp config", .short_help = "show igmp config", .function = igmp_show_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * igmp_show_timers_command_fn (vlib_main_t * vm, @@ -384,13 +370,11 @@ igmp_show_timers_command_fn (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (igmp_show_timers_command, static) = { .path = "show igmp timers", .short_help = "show igmp timers", .function = igmp_show_timers_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * test_igmp_command_fn (vlib_main_t * vm, @@ -414,13 +398,11 @@ test_igmp_command_fn (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_igmp_command, static) = { .path = "test igmp timers", .short_help = "Change the default values for IGMP timers - only sensible during unit tests", .function = test_igmp_command_fn, }; -/* *INDENT-ON* */ clib_error_t * diff --git a/src/plugins/igmp/igmp_config.c b/src/plugins/igmp/igmp_config.c index 7637adba5bf..288d9c87222 100644 --- a/src/plugins/igmp/igmp_config.c +++ b/src/plugins/igmp/igmp_config.c @@ -28,12 +28,10 @@ igmp_clear_config (igmp_config_t * config) format_vnet_sw_if_index_name, vnet_get_main (), config->sw_if_index); - /* *INDENT-OFF* */ FOR_EACH_GROUP (group, config, ({ igmp_group_clear (&group); })); - /* *INDENT-ON* */ for (ii = 0; ii < IGMP_CONFIG_N_TIMERS; ii++) { @@ -125,12 +123,10 @@ format_igmp_config (u8 * s, va_list * args) format_igmp_timer_id, config->timers[ii]); } - /* *INDENT-OFF* */ FOR_EACH_GROUP (group, config, ({ s = format (s, "\n%U", format_igmp_group, group, 4); })); - /* *INDENT-ON* */ return (s); } diff --git a/src/plugins/igmp/igmp_group.c b/src/plugins/igmp/igmp_group.c index eec4c9b8f81..be3d997cbeb 100644 --- a/src/plugins/igmp/igmp_group.c +++ b/src/plugins/igmp/igmp_group.c @@ -23,12 +23,10 @@ igmp_group_free_all_srcs (igmp_group_t * group) { igmp_src_t *src; - /* *INDENT-OFF* */ FOR_EACH_SRC (src, group, IGMP_FILTER_MODE_INCLUDE, ({ igmp_src_free(src); })); - /* *INDENT-ON* */ hash_free (group->igmp_src_by_key[IGMP_FILTER_MODE_INCLUDE]); hash_free (group->igmp_src_by_key[IGMP_FILTER_MODE_EXCLUDE]); @@ -152,7 +150,6 @@ igmp_group_present_minus_new (igmp_group_t * group, pmn = NULL; - /* *INDENT-OFF* */ if (0 == vec_len(saddrs)) { FOR_EACH_SRC(src, group, mode, @@ -178,7 +175,6 @@ igmp_group_present_minus_new (igmp_group_t * group, vec_add1(pmn, *src->key); })); } - /* *INDENT-ON* */ return (pmn); } @@ -198,7 +194,6 @@ igmp_group_new_minus_present (igmp_group_t * group, npm = NULL; - /* *INDENT-OFF* */ vec_foreach(s1, saddrs) { found = 0; @@ -214,7 +209,6 @@ igmp_group_new_minus_present (igmp_group_t * group, if (!found) vec_add1(npm, *s1); } - /* *INDENT-ON* */ return (npm); } @@ -230,7 +224,6 @@ igmp_group_new_intersect_present (igmp_group_t * group, intersect = NULL; - /* *INDENT-OFF* */ FOR_EACH_SRC(src, group, mode, ({ vec_foreach(s1, saddrs) @@ -242,7 +235,6 @@ igmp_group_new_intersect_present (igmp_group_t * group, } } })); - /* *INDENT-ON* */ return (intersect); } @@ -311,12 +303,10 @@ format_igmp_group (u8 * s, va_list * args) format_igmp_group_timer_type, ii, format_igmp_timer_id, group->timers[ii]); - /* *INDENT-OFF* */ FOR_EACH_SRC (src, group, IGMP_FILTER_MODE_INCLUDE, ({ s = format (s, "\n%U", format_igmp_src, src, indent+4); })); - /* *INDENT-ON* */ return (s); } diff --git a/src/plugins/igmp/igmp_input.c b/src/plugins/igmp/igmp_input.c index 1858a1b4d66..012c22399de 100644 --- a/src/plugins/igmp/igmp_input.c +++ b/src/plugins/igmp/igmp_input.c @@ -219,7 +219,6 @@ igmp_input (vlib_main_t * vm, vlib_node_runtime_t * node, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (igmp_input_node) = { .function = igmp_input, @@ -239,7 +238,6 @@ VLIB_REGISTER_NODE (igmp_input_node) = [IGMP_INPUT_NEXT_PARSE_REPORT] = "igmp-parse-report", } }; -/* *INDENT-ON* */ static uword igmp_parse_query (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -325,7 +323,6 @@ igmp_parse_query (vlib_main_t * vm, vlib_node_runtime_t * node, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (igmp_parse_query_node) = { .function = igmp_parse_query, @@ -343,7 +340,6 @@ VLIB_REGISTER_NODE (igmp_parse_query_node) = [IGMP_PARSE_QUERY_NEXT_DROP] = "error-drop", } }; -/* *INDENT-ON* */ static uword igmp_parse_report (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -436,7 +432,6 @@ igmp_parse_report (vlib_main_t * vm, vlib_node_runtime_t * node, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (igmp_parse_report_node) = { .function = igmp_parse_report, @@ -454,7 +449,6 @@ VLIB_REGISTER_NODE (igmp_parse_report_node) = [IGMP_PARSE_REPORT_NEXT_DROP] = "error-drop", } }; -/* *INDENT-ON* */ static clib_error_t * igmp_input_init (vlib_main_t * vm) @@ -466,12 +460,10 @@ igmp_input_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (igmp_input_init) = { .runs_after = VLIB_INITS("igmp_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/igmp/igmp_pkt.c b/src/plugins/igmp/igmp_pkt.c index c2ce5c71255..7fadeb638a3 100644 --- a/src/plugins/igmp/igmp_pkt.c +++ b/src/plugins/igmp/igmp_pkt.c @@ -329,7 +329,6 @@ igmp_pkt_report_v3_add_report (igmp_pkt_build_report_t * br, if (NULL == igmp_group) return; - /* *INDENT-OFF* */ vec_foreach(s, srcs) { igmp_group = igmp_pkt_report_v3_append_src(br, igmp_group, @@ -337,7 +336,6 @@ igmp_pkt_report_v3_add_report (igmp_pkt_build_report_t * br, if (NULL == igmp_group) return; }; - /* *INDENT-ON* */ igmp_group->n_src_addresses = clib_host_to_net_u16 (br->n_srcs); @@ -378,7 +376,6 @@ igmp_pkt_report_v3_add_group (igmp_pkt_build_report_t * br, igmp_group = igmp_pkt_report_v3_append_group (br, group->key, type); - /* *INDENT-OFF* */ FOR_EACH_SRC (src, group, IGMP_FILTER_MODE_INCLUDE, ({ igmp_group = igmp_pkt_report_v3_append_src(br, igmp_group, @@ -387,7 +384,6 @@ igmp_pkt_report_v3_add_group (igmp_pkt_build_report_t * br, if (NULL == igmp_group) return; })); - /* *INDENT-ON* */ igmp_group->n_src_addresses = clib_host_to_net_u16 (br->n_srcs); IGMP_DBG (" ..add-group: %U srcs:%d", diff --git a/src/plugins/igmp/igmp_proxy.c b/src/plugins/igmp/igmp_proxy.c index 6d930ac791b..bf5e3aafad8 100644 --- a/src/plugins/igmp/igmp_proxy.c +++ b/src/plugins/igmp/igmp_proxy.c @@ -34,7 +34,6 @@ igmp_proxy_device_mfib_path_add_del (igmp_group_t * group, u8 add) mfib_table_get_index_for_sw_if_index (FIB_PROTOCOL_IP4, config->sw_if_index); - /* *INDENT-OFF* */ mfib_prefix_t mpfx_group_addr = { .fp_proto = FIB_PROTOCOL_IP4, .fp_len = 32, @@ -51,7 +50,6 @@ igmp_proxy_device_mfib_path_add_del (igmp_group_t * group, u8 add) .frp_weight = 1, .frp_mitf_flags = MFIB_ITF_FLAG_FORWARD, }; - /* *INDENT-ON* */ if (add) mfib_table_entry_path_update (mfib_index, &mpfx_group_addr, @@ -346,12 +344,10 @@ igmp_proxy_device_merge_group (igmp_proxy_device_t * proxy_device, igmp_proxy_device_mfib_path_add_del (group, 0); } - /* *INDENT-OFF* */ FOR_EACH_SRC (src, group, group->router_filter_mode, ({ igmp_proxy_device_merge_src (&proxy_group, src, srcaddrs, block); })); - /* *INDENT-ON* */ return proxy_group; } @@ -370,7 +366,6 @@ igmp_proxy_device_merge_config (igmp_config_t * config, u8 block) igmp_pkt_build_report_init (&br, proxy_device->upstream_if); - /* *INDENT-OFF* */ FOR_EACH_GROUP(group, config, ({ proxy_group = igmp_proxy_device_merge_group (proxy_device, group, &srcaddrs, block); @@ -383,7 +378,6 @@ igmp_proxy_device_merge_config (igmp_config_t * config, u8 block) } vec_free (srcaddrs); })); - /* *INDENT-ON* */ igmp_pkt_report_v3_send (&br); diff --git a/src/plugins/igmp/igmp_query.c b/src/plugins/igmp/igmp_query.c index c75b01a295b..c5bf8fca992 100644 --- a/src/plugins/igmp/igmp_query.c +++ b/src/plugins/igmp/igmp_query.c @@ -155,14 +155,12 @@ igmp_send_general_report_v3 (u32 obj, void *data) igmp_pkt_build_report_init (&br, config->sw_if_index); - /* *INDENT-OFF* */ FOR_EACH_GROUP (group, config, ({ igmp_pkt_report_v3_add_group (&br, group, igmp_filter_mode_to_report_type(group->router_filter_mode)); })); - /* *INDENT-ON* */ igmp_pkt_report_v3_send (&br); } diff --git a/src/plugins/igmp/igmp_ssm_range.c b/src/plugins/igmp/igmp_ssm_range.c index c74d312b508..a71741cd5f8 100644 --- a/src/plugins/igmp/igmp_ssm_range.c +++ b/src/plugins/igmp/igmp_ssm_range.c @@ -127,13 +127,11 @@ igmp_ssm_range_show (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (igmp_show_timers_command, static) = { .path = "show igmp ssm-ranges", .short_help = "show igmp ssm-ranges", .function = igmp_ssm_range_show, }; -/* *INDENT-ON* */ static clib_error_t * igmp_ssm_range_init (vlib_main_t * vm) @@ -145,12 +143,10 @@ igmp_ssm_range_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (igmp_ssm_range_init) = { .runs_after = VLIB_INITS("igmp_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/igmp/igmp_timer.c b/src/plugins/igmp/igmp_timer.c index 2d38dd07a99..8abef8e554e 100644 --- a/src/plugins/igmp/igmp_timer.c +++ b/src/plugins/igmp/igmp_timer.c @@ -181,7 +181,6 @@ igmp_timer_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (igmp_timer_process_node) = { .function = igmp_timer_process, @@ -189,7 +188,6 @@ VLIB_REGISTER_NODE (igmp_timer_process_node) = .name = "igmp-timer-process", .n_next_nodes = 0, }; -/* *INDENT-ON* */ igmp_timer_id_t igmp_timer_schedule (f64 when, u32 obj, igmp_timer_function_t fn, void *data) diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c index 4ee2f60b085..d559565487e 100644 --- a/src/plugins/ikev2/ikev2.c +++ b/src/plugins/ikev2/ikev2.c @@ -1110,7 +1110,6 @@ ikev2_initial_contact_cleanup_internal (ikev2_main_per_thread_data_t * ptd, ikev2_child_sa_t *c; /* find old IKE SAs with the same authenticated identity */ - /* *INDENT-OFF* */ pool_foreach (tmp, ptd->sas) { if (!ikev2_is_id_equal (&tmp->i_id, &sa->i_id) || !ikev2_is_id_equal(&tmp->r_id, &sa->r_id)) @@ -1119,7 +1118,6 @@ ikev2_initial_contact_cleanup_internal (ikev2_main_per_thread_data_t * ptd, if (sa->rspi != tmp->rspi) vec_add1(delete, tmp - ptd->sas); } - /* *INDENT-ON* */ for (i = 0; i < vec_len (delete); i++) { @@ -1831,7 +1829,6 @@ ikev2_sa_match_ts (ikev2_sa_t * sa) ikev2_ts_t *ts, *p_tsi, *p_tsr, *tsi = 0, *tsr = 0; ikev2_id_t *id_rem, *id_loc; - /* *INDENT-OFF* */ pool_foreach (p, km->profiles) { if (sa->is_initiator) @@ -1874,7 +1871,6 @@ ikev2_sa_match_ts (ikev2_sa_t * sa) break; } - /* *INDENT-ON* */ if (tsi && tsr) { @@ -2486,14 +2482,12 @@ ikev2_del_tunnel_from_main (ikev2_del_ipsec_tunnel_args_t * a) if (~0 == a->sw_if_index) { - /* *INDENT-OFF* */ ipip_tunnel_key_t key = { .src = a->local_ip, .dst = a->remote_ip, .transport = IPIP_TRANSPORT_IP4, .fib_index = 0, }; - /* *INDENT-ON* */ ipip = ipip_tunnel_db_find (&key); @@ -3013,13 +3007,11 @@ ikev2_retransmit_sa_init (ike_header_t * ike, ip_address_t iaddr, u32 res; ikev2_main_per_thread_data_t *ptd = ikev2_get_per_thread_data (); - /* *INDENT-OFF* */ pool_foreach (sa, ptd->sas) { res = ikev2_retransmit_sa_init_one (sa, ike, iaddr, raddr, rlen); if (res) return res; } - /* *INDENT-ON* */ /* req is not retransmit */ return 0; @@ -3766,7 +3758,6 @@ ikev2_ip6 (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) return ikev2_node_internal (vm, node, frame, 0 /* is_ip4 */, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ikev2_node_ip4,static) = { .function = ikev2_ip4, .name = "ikev2-ip4", @@ -3817,7 +3808,6 @@ VLIB_REGISTER_NODE (ikev2_node_ip6,static) = { [IKEV2_NEXT_IP6_ERROR_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ // set ikev2 proposals when vpp is used as initiator static clib_error_t * @@ -4159,12 +4149,10 @@ ikev2_cleanup_profile_sessions (ikev2_main_t * km, ikev2_profile_t * p) u32 *sai; u32 *del_sai = 0; - /* *INDENT-OFF* */ pool_foreach (sa, km->sais) { if (pi == sa->profile_index) vec_add1 (del_sai, sa - km->sais); } - /* *INDENT-ON* */ vec_foreach (sai, del_sai) { @@ -4177,12 +4165,10 @@ ikev2_cleanup_profile_sessions (ikev2_main_t * km, ikev2_profile_t * p) vec_foreach (tkm, km->per_thread_data) { - /* *INDENT-OFF* */ pool_foreach (sa, tkm->sas) { if (sa->profile_index != ~0 && pi == sa->profile_index) vec_add1 (del_sai, sa - tkm->sas); } - /* *INDENT-ON* */ vec_foreach (sai, del_sai) { @@ -4914,7 +4900,6 @@ ikev2_initiate_delete_child_sa (vlib_main_t * vm, u32 ispi) ikev2_sa_t *sa; if (fchild) break; - /* *INDENT-OFF* */ pool_foreach (sa, tkm->sas) { fchild = ikev2_sa_get_child(sa, ispi, IKEV2_PROTOCOL_ESP, 1); if (fchild) @@ -4923,7 +4908,6 @@ ikev2_initiate_delete_child_sa (vlib_main_t * vm, u32 ispi) break; } } - /* *INDENT-ON* */ } if (!fchild || !fsa) @@ -4954,7 +4938,6 @@ ikev2_initiate_delete_ike_sa (vlib_main_t * vm, u64 ispi) ikev2_sa_t *sa; if (fsa) break; - /* *INDENT-OFF* */ pool_foreach (sa, tkm->sas) { if (sa->ispi == ispi) { @@ -4963,7 +4946,6 @@ ikev2_initiate_delete_ike_sa (vlib_main_t * vm, u64 ispi) break; } } - /* *INDENT-ON* */ } if (!fsa) @@ -5039,7 +5021,6 @@ ikev2_initiate_rekey_child_sa (vlib_main_t * vm, u32 ispi) ikev2_sa_t *sa; if (fchild) break; - /* *INDENT-OFF* */ pool_foreach (sa, tkm->sas) { fchild = ikev2_sa_get_child(sa, ispi, IKEV2_PROTOCOL_ESP, 1); if (fchild) @@ -5048,7 +5029,6 @@ ikev2_initiate_rekey_child_sa (vlib_main_t * vm, u32 ispi) break; } } - /* *INDENT-ON* */ } if (!fchild || !fsa) @@ -5081,12 +5061,10 @@ ikev2_sa_del (ikev2_profile_t * p, u32 sw_if_index) vec_foreach (tkm, km->per_thread_data) { - /* *INDENT-OFF* */ pool_foreach (sa, tkm->sas) { if (ikev2_sa_sw_if_match (sa, sw_if_index)) vec_add1 (sa_vec, sa); } - /* *INDENT-ON* */ vec_foreach (sap, sa_vec) { @@ -5096,12 +5074,10 @@ ikev2_sa_del (ikev2_profile_t * p, u32 sw_if_index) } vec_free (sa_vec); - /* *INDENT-OFF* */ pool_foreach (sa, km->sais) { if (ikev2_sa_sw_if_match (sa, sw_if_index)) vec_add1 (ispi_vec, sa->ispi); } - /* *INDENT-ON* */ vec_foreach (ispi, ispi_vec) { @@ -5120,12 +5096,10 @@ ikev2_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) if (is_add) return 0; - /* *INDENT-OFF* */ pool_foreach (p, km->profiles) { if (p->responder.sw_if_index == sw_if_index) ikev2_sa_del (p, sw_if_index); } - /* *INDENT-ON* */ return 0; } @@ -5151,11 +5125,9 @@ ikev2_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ikev2_init) = { .runs_after = VLIB_INITS ("ipsec_init", "ipsec_punt_init"), }; -/* *INDENT-ON* */ static u8 ikev2_mngr_process_child_sa (ikev2_sa_t * sa, ikev2_child_sa_t * csa, @@ -5226,14 +5198,12 @@ ikev2_mngr_process_child_sa (ikev2_sa_t * sa, ikev2_child_sa_t * csa, ip_addr_bytes (&sa->iaddr)); } - /* *INDENT-OFF* */ ipip_tunnel_key_t key = { .src = local_ip, .dst = remote_ip, .transport = IPIP_TRANSPORT_IP4, .fib_index = 0, }; - /* *INDENT-ON* */ ipip = ipip_tunnel_db_find (&key); @@ -5314,7 +5284,6 @@ ikev2_mngr_process_ipsec_sa (ipsec_sa_t * ipsec_sa) ikev2_sa_t *sa; if (fchild) break; - /* *INDENT-OFF* */ pool_foreach (sa, tkm->sas) { fchild = ikev2_sa_get_child(sa, ipsec_sa->spi, IKEV2_PROTOCOL_ESP, 1); if (fchild) @@ -5323,7 +5292,6 @@ ikev2_mngr_process_ipsec_sa (ipsec_sa_t * ipsec_sa) break; } } - /* *INDENT-ON* */ } vlib_get_combined_counter (&ipsec_sa_counters, ipsec_sa->stat_index, &counts); @@ -5421,7 +5389,6 @@ ikev2_process_pending_sa_init (vlib_main_t *vm, ikev2_main_t *km) u64 ispi; ikev2_sa_t *sa; - /* *INDENT-OFF* */ hash_foreach (ispi, sai, km->sa_by_ispi, ({ sa = pool_elt_at_index (km->sais, sai); @@ -5430,7 +5397,6 @@ ikev2_process_pending_sa_init (vlib_main_t *vm, ikev2_main_t *km) ikev2_process_pending_sa_init_one (vm, km, sa); })); - /* *INDENT-ON* */ } static void @@ -5535,7 +5501,6 @@ ikev2_mngr_process_fn (vlib_main_t * vm, vlib_node_runtime_t * rt, ikev2_sa_t *sa; u32 *to_be_deleted = 0; - /* *INDENT-OFF* */ pool_foreach (sa, tkm->sas) { ikev2_child_sa_t *c; u8 del_old_ids = 0; @@ -5596,19 +5561,16 @@ ikev2_mngr_process_fn (vlib_main_t * vm, vlib_node_runtime_t * rt, /* process ipsec sas */ ipsec_sa_t *sa; - /* *INDENT-OFF* */ pool_foreach (sa, ipsec_sa_pool) { ikev2_mngr_process_ipsec_sa (sa); } - /* *INDENT-ON* */ ikev2_process_pending_sa_init (vm, km); } return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ikev2_mngr_process_node, static) = { .function = ikev2_mngr_process_fn, .type = VLIB_NODE_TYPE_PROCESS, @@ -5670,7 +5632,6 @@ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Internet Key Exchange (IKEv2) Protocol", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ikev2/ikev2.h b/src/plugins/ikev2/ikev2.h index 020a3f01e5f..9ed0ecc494c 100644 --- a/src/plugins/ikev2/ikev2.h +++ b/src/plugins/ikev2/ikev2.h @@ -32,7 +32,6 @@ typedef u8 v8; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u64 ispi; u64 rspi; @@ -42,14 +41,12 @@ typedef CLIB_PACKED (struct { u8 flags; u32 msgid; u32 length; u8 payload[0]; }) ike_header_t; -/* *INDENT-ON* */ #define ike_hdr_is_response(_h) ((_h)->flags & IKEV2_HDR_FLAG_RESPONSE) #define ike_hdr_is_request(_h) (!ike_hdr_is_response(_h)) #define ike_hdr_is_initiator(_h) ((_h)->flags & IKEV2_HDR_FLAG_INITIATOR) #define ike_hdr_is_responder(_h) (!(ike_hdr_is_initiator(_h))) -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 nextpayload; u8 flags; @@ -58,17 +55,13 @@ typedef CLIB_PACKED (struct { u8 reserved[2]; u8 payload[0]; }) ike_ke_payload_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 nextpayload; u8 flags; u16 length; u8 payload[0]; }) ike_payload_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 nextpayload; u8 flags; @@ -77,9 +70,7 @@ typedef CLIB_PACKED (struct { u8 reserved[3]; u8 payload[0]; }) ike_auth_payload_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 nextpayload; u8 flags; @@ -87,7 +78,6 @@ typedef CLIB_PACKED (struct { u8 id_type; u8 reserved[3]; u8 payload[0]; }) ike_id_payload_header_t; -/* *INDENT-ON* */ #define IKE_VERSION_2 0x20 diff --git a/src/plugins/ikev2/ikev2_api.c b/src/plugins/ikev2/ikev2_api.c index 975212d4f92..bb44e9f364f 100644 --- a/src/plugins/ikev2/ikev2_api.c +++ b/src/plugins/ikev2/ikev2_api.c @@ -188,12 +188,10 @@ vl_api_ikev2_profile_dump_t_handler (vl_api_ikev2_profile_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (profile, im->profiles) { send_profile (profile, reg, mp->context); } - /* *INDENT-ON* */ } static void @@ -240,7 +238,6 @@ send_sa (ikev2_sa_t * sa, vl_api_ikev2_sa_dump_t * mp, u32 api_sa_index) int rv = 0; ikev2_sa_transform_t *tr; - /* *INDENT-OFF* */ REPLY_MACRO2_ZERO (VL_API_IKEV2_SA_DETAILS, { vl_api_ikev2_sa_t *rsa = &rmp->sa; @@ -296,7 +293,6 @@ send_sa (ikev2_sa_t * sa, vl_api_ikev2_sa_dump_t * mp, u32 api_sa_index) vl_api_ikev2_sa_t_endian(rsa); }); - /* *INDENT-ON* */ } static void @@ -308,14 +304,12 @@ vl_api_ikev2_sa_dump_t_handler (vl_api_ikev2_sa_dump_t * mp) vec_foreach (tkm, km->per_thread_data) { - /* *INDENT-OFF* */ pool_foreach (sa, tkm->sas) { u32 api_sa_index = ikev2_encode_sa_index (sa - tkm->sas, tkm - km->per_thread_data); send_sa (sa, mp, api_sa_index); } - /* *INDENT-ON* */ } } @@ -419,7 +413,6 @@ send_child_sa (ikev2_child_sa_t * child, int rv = 0; ikev2_sa_transform_t *tr; - /* *INDENT-OFF* */ REPLY_MACRO2_ZERO (VL_API_IKEV2_CHILD_SA_DETAILS, { vl_api_ikev2_keys_t *k = &rmp->child_sa.keys; @@ -464,7 +457,6 @@ send_child_sa (ikev2_child_sa_t * child, vl_api_ikev2_child_sa_t_endian (&rmp->child_sa); }); - /* *INDENT-ON* */ } static void @@ -530,7 +522,6 @@ static void vl_api_ikev2_traffic_selector_details_t *rmp = 0; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2_ZERO (VL_API_IKEV2_TRAFFIC_SELECTOR_DETAILS, { rmp->ts.sa_index = api_sa_index; @@ -538,7 +529,6 @@ static void cp_ts (&rmp->ts, ts, mp->is_initiator); vl_api_ikev2_ts_t_endian (&rmp->ts); }); - /* *INDENT-ON* */ } } @@ -567,13 +557,11 @@ vl_api_ikev2_nonce_get_t_handler (vl_api_ikev2_nonce_get_t * mp) int data_len = vec_len (nonce); int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO3_ZERO (VL_API_IKEV2_NONCE_GET_REPLY, data_len, { rmp->data_len = clib_host_to_net_u32 (data_len); clib_memcpy (rmp->nonce, nonce, data_len); }); - /* *INDENT-ON* */ } static void diff --git a/src/plugins/ikev2/ikev2_cli.c b/src/plugins/ikev2/ikev2_cli.c index e5516f834f4..733ae478b83 100644 --- a/src/plugins/ikev2/ikev2_cli.c +++ b/src/plugins/ikev2/ikev2_cli.c @@ -250,7 +250,6 @@ show_ikev2_sa_command_fn (vlib_main_t * vm, vec_foreach (tkm, km->per_thread_data) { - /* *INDENT-OFF* */ pool_foreach (sa, tkm->sas) { if (show_one) { @@ -263,7 +262,6 @@ show_ikev2_sa_command_fn (vlib_main_t * vm, else s = format (s, "%U\n", format_ikev2_sa, sa, details); } - /* *INDENT-ON* */ } vlib_cli_output (vm, "%v", s); @@ -271,13 +269,11 @@ show_ikev2_sa_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ikev2_sa_command, static) = { .path = "show ikev2 sa", .short_help = "show ikev2 sa [rspi <rspi>] [details]", .function = show_ikev2_sa_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * ikev2_disable_dpd_command_fn (vlib_main_t * vm, @@ -288,13 +284,11 @@ ikev2_disable_dpd_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ikev2_cli_disable_dpd_command, static) = { .path = "ikev2 dpd disable", .short_help = "ikev2 dpd disable", .function = ikev2_disable_dpd_command_fn, }; -/* *INDENT-ON* */ static uword unformat_ikev2_token (unformat_input_t * input, va_list * va) @@ -571,7 +565,6 @@ done: return r; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ikev2_profile_add_del_command, static) = { .path = "ikev2 profile", .short_help = @@ -592,7 +585,6 @@ VLIB_CLI_COMMAND (ikev2_profile_add_del_command, static) = { "ikev2 profile set <id> disable natt\n", .function = ikev2_profile_add_del_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_ikev2_profile_command_fn (vlib_main_t * vm, @@ -602,7 +594,6 @@ show_ikev2_profile_command_fn (vlib_main_t * vm, ikev2_main_t *km = &ikev2_main; ikev2_profile_t *p; - /* *INDENT-OFF* */ pool_foreach (p, km->profiles) { vlib_cli_output(vm, "profile %v", p->name); @@ -669,18 +660,15 @@ show_ikev2_profile_command_fn (vlib_main_t * vm, vlib_cli_output(vm, " lifetime %d jitter %d handover %d maxdata %d", p->lifetime, p->lifetime_jitter, p->handover, p->lifetime_maxdata); } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ikev2_profile_command, static) = { .path = "show ikev2 profile", .short_help = "show ikev2 profile", .function = show_ikev2_profile_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * set_ikev2_liveness_period_fn (vlib_main_t * vm, @@ -713,13 +701,11 @@ done: return r; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ikev2_liveness_command, static) = { .path = "ikev2 set liveness", .short_help = "ikev2 set liveness <period> <max-retires>", .function = set_ikev2_liveness_period_fn, }; -/* *INDENT-ON* */ static clib_error_t * set_ikev2_local_key_command_fn (vlib_main_t * vm, @@ -753,14 +739,12 @@ done: return r; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ikev2_local_key_command, static) = { .path = "set ikev2 local key", .short_help = "set ikev2 local key <file>", .function = set_ikev2_local_key_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -811,7 +795,6 @@ done: return r; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ikev2_initiate_command, static) = { .path = "ikev2 initiate", .short_help = @@ -821,7 +804,6 @@ VLIB_CLI_COMMAND (ikev2_initiate_command, static) = { "ikev2 initiate rekey-child-sa <child sa ispi>\n", .function = ikev2_initiate_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * ikev2_set_log_level_command_fn (vlib_main_t * vm, @@ -851,13 +833,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ikev2_set_log_level_command, static) = { .path = "ikev2 set logging level", .function = ikev2_set_log_level_command_fn, .short_help = "ikev2 set logging level <0-5>", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ikev2/ikev2_payload.c b/src/plugins/ikev2/ikev2_payload.c index 689c502d4a3..5801a1b3e87 100644 --- a/src/plugins/ikev2/ikev2_payload.c +++ b/src/plugins/ikev2/ikev2_payload.c @@ -24,7 +24,6 @@ #include <plugins/ikev2/ikev2.h> #include <plugins/ikev2/ikev2_priv.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 nextpayload; u8 flags; @@ -34,9 +33,7 @@ typedef CLIB_PACKED (struct { u16 msg_type; u8 payload[0]; }) ike_notify_payload_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip4_address_t start_addr; ip4_address_t end_addr; @@ -55,9 +52,7 @@ typedef CLIB_PACKED (struct { u16 end_port; u8 addr_pair[0]; }) ikev2_ts_payload_entry_t; -/* *INDENT-OFF* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 nextpayload; u8 flags; @@ -66,9 +61,7 @@ typedef CLIB_PACKED (struct { u8 reserved[3]; ikev2_ts_payload_entry_t ts[0]; }) ike_ts_payload_header_t; -/* *INDENT-OFF* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 last_or_more; u8 reserved; @@ -78,9 +71,7 @@ typedef CLIB_PACKED (struct { u8 spi_size; u8 num_transforms; u32 spi[0]; }) ike_sa_proposal_data_t; -/* *INDENT-OFF* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 last_or_more; u8 reserved; @@ -90,9 +81,7 @@ typedef CLIB_PACKED (struct { u16 transform_id; u8 attributes[0]; }) ike_sa_transform_data_t; -/* *INDENT-OFF* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 nextpayload; u8 flags; @@ -102,7 +91,6 @@ typedef CLIB_PACKED (struct { u16 num_of_spi; u32 spi[0]; }) ike_delete_payload_header_t; -/* *INDENT-OFF* */ static ike_payload_header_t * ikev2_payload_add_hdr (ikev2_payload_chain_t * c, u8 payload_type, int len) diff --git a/src/plugins/ila/ila.c b/src/plugins/ila/ila.c index 0672ad905fc..02acd84880c 100644 --- a/src/plugins/ila/ila.c +++ b/src/plugins/ila/ila.c @@ -385,7 +385,6 @@ ila_ila2sir (vlib_main_t * vm, return frame->n_vectors; } -/** *INDENT-OFF* */ VLIB_REGISTER_NODE (ila_ila2sir_node, static) = { .function = ila_ila2sir, @@ -400,7 +399,6 @@ VLIB_REGISTER_NODE (ila_ila2sir_node, static) = [ILA_ILA2SIR_NEXT_DROP] = "error-drop" }, }; -/** *INDENT-ON* */ typedef enum { @@ -585,7 +583,6 @@ ila_sir2ila (vlib_main_t * vm, return frame->n_vectors; } -/** *INDENT-OFF* */ VLIB_REGISTER_NODE (ila_sir2ila_node, static) = { .function = ila_sir2ila,.name = "sir-to-ila", @@ -599,16 +596,13 @@ VLIB_REGISTER_NODE (ila_sir2ila_node, static) = [ILA_SIR2ILA_NEXT_DROP] = "error-drop" }, }; -/** *INDENT-ON* */ -/** *INDENT-OFF* */ VNET_FEATURE_INIT (ila_sir2ila, static) = { .arc_name = "ip6-unicast", .node_name = "sir-to-ila", .runs_before = VNET_FEATURES ("ip6-lookup"), }; -/** *INDENT-ON* */ static void ila_entry_stack (ila_entry_t *ie) @@ -826,12 +820,10 @@ ila_interface (u32 sw_if_index, u8 disable) return 0; } -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Identifier Locator Addressing (ILA) for IPv6", }; -/* *INDENT-ON* */ u8 *format_ila_dpo (u8 * s, va_list * va) { diff --git a/src/plugins/ioam/analyse/ioam_summary_export.c b/src/plugins/ioam/analyse/ioam_summary_export.c index 09884fdb019..6856bcc2200 100644 --- a/src/plugins/ioam/analyse/ioam_summary_export.c +++ b/src/plugins/ioam/analyse/ioam_summary_export.c @@ -426,12 +426,10 @@ ioam_flow_report_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ioam_flow_report_init) = { .runs_after = VLIB_INITS("flow_report_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ioam/analyse/ip6/ip6_ioam_analyse.c b/src/plugins/ioam/analyse/ip6/ip6_ioam_analyse.c index 99ba3295d44..9db0485da61 100644 --- a/src/plugins/ioam/analyse/ip6/ip6_ioam_analyse.c +++ b/src/plugins/ioam/analyse/ip6/ip6_ioam_analyse.c @@ -94,13 +94,11 @@ set_ioam_analyse_command_fn (vlib_main_t * vm, unformat_input_t * input, return (ioam_analyse_enable_disable (vm, is_add, is_export, remote_listen)); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ioam_analyse_command, static) = { .path = "set ioam analyse", .short_help = "set ioam analyse [export-ipfix-collector] [disable] [listen-ipfix]", .function = set_ioam_analyse_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_ioam_analyse_cmd_fn (vlib_main_t * vm, unformat_input_t * input, @@ -130,13 +128,11 @@ show_ioam_analyse_cmd_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_show_ioam_ipfix_cmd, static) = { .path = "show ioam analyse ", .short_help = "show ioam analyser information", .function = show_ioam_analyse_cmd_fn, }; -/* *INDENT-ON* */ static clib_error_t * ioam_analyse_init (vlib_main_t * vm) diff --git a/src/plugins/ioam/analyse/ip6/node.c b/src/plugins/ioam/analyse/ip6/node.c index ef35d0a9134..67895aa6486 100644 --- a/src/plugins/ioam/analyse/ip6/node.c +++ b/src/plugins/ioam/analyse/ip6/node.c @@ -466,7 +466,6 @@ ip6_ioam_analyse_unregister_handlers () ip6_ioam_analyse_unregister_hbh_handler (HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE); } -/* *INDENT-OFF* */ /* * Node for IP6 analyse - packets @@ -507,7 +506,6 @@ VLIB_REGISTER_NODE (analyse_node_remote) = }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ioam/encap/ip6_ioam_e2e.c b/src/plugins/ioam/encap/ip6_ioam_e2e.c index a3dd048c659..0a811da6105 100644 --- a/src/plugins/ioam/encap/ip6_ioam_e2e.c +++ b/src/plugins/ioam/encap/ip6_ioam_e2e.c @@ -205,9 +205,7 @@ ioam_e2e_init (vlib_main_t * vm) * Init function for the E2E lib. * ip6_hop_by_hop_ioam_e2e_init gets called during init. */ -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ioam_e2e_init) = { .runs_after = VLIB_INITS("ip6_hop_by_hop_ioam_init"), }; -/* *INDENT-ON* */ diff --git a/src/plugins/ioam/encap/ip6_ioam_e2e.h b/src/plugins/ioam/encap/ip6_ioam_e2e.h index fb83403da8f..f958e17669b 100644 --- a/src/plugins/ioam/encap/ip6_ioam_e2e.h +++ b/src/plugins/ioam/encap/ip6_ioam_e2e.h @@ -19,12 +19,10 @@ #include <ioam/lib-e2e/e2e_util.h> #include "ip6_ioam_seqno.h" -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { ip6_hop_by_hop_option_t hdr; ioam_e2e_packet_t e2e_hdr; }) ioam_e2e_option_t; -/* *INDENT-ON* */ typedef struct ioam_e2e_data_t_ { u32 flow_ctx; diff --git a/src/plugins/ioam/encap/ip6_ioam_pot.c b/src/plugins/ioam/encap/ip6_ioam_pot.c index 99c21b571a3..54d748455d2 100644 --- a/src/plugins/ioam/encap/ip6_ioam_pot.c +++ b/src/plugins/ioam/encap/ip6_ioam_pot.c @@ -255,9 +255,7 @@ ip6_hop_by_hop_ioam_pot_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ip6_hop_by_hop_ioam_pot_init) = { .runs_after = VLIB_INITS("ip6_hop_by_hop_ioam_init"), }; -/* *INDENT-OFF* */ diff --git a/src/plugins/ioam/encap/ip6_ioam_pot.h b/src/plugins/ioam/encap/ip6_ioam_pot.h index 01ce4ac590f..ef6f4c7344c 100644 --- a/src/plugins/ioam/encap/ip6_ioam_pot.h +++ b/src/plugins/ioam/encap/ip6_ioam_pot.h @@ -18,7 +18,6 @@ #include <vnet/ip/ip6_hop_by_hop_packet.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip6_hop_by_hop_option_t hdr; u8 pot_type; @@ -27,7 +26,6 @@ typedef CLIB_PACKED (struct { u64 random; u64 cumulative; }) ioam_pot_option_t; -/* *INDENT-ON* */ #endif /* PLUGINS_IOAM_PLUGIN_IOAM_ENCAP_IP6_IOAM_POT_H_ */ diff --git a/src/plugins/ioam/encap/ip6_ioam_trace.c b/src/plugins/ioam/encap/ip6_ioam_trace.c index ea496610433..b244af56a6b 100644 --- a/src/plugins/ioam/encap/ip6_ioam_trace.c +++ b/src/plugins/ioam/encap/ip6_ioam_trace.c @@ -399,20 +399,16 @@ ip6_show_ioam_trace_cmd_fn (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_show_ioam_trace_cmd, static) = { .path = "show ioam trace", .short_help = "iOAM trace statistics", .function = ip6_show_ioam_trace_cmd_fn, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Inbound Operations, Administration, and Maintenance (OAM)", }; -/* *INDENT-ON* */ static clib_error_t * ip6_hop_by_hop_ioam_trace_init (vlib_main_t * vm) @@ -443,13 +439,11 @@ ip6_hop_by_hop_ioam_trace_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ip6_hop_by_hop_ioam_trace_init) = { .runs_after = VLIB_INITS ("ip_main_init", "ip6_lookup_init", "ip6_hop_by_hop_ioam_init"), }; -/* *INDENT-ON* */ int ip6_trace_profile_cleanup (void) diff --git a/src/plugins/ioam/encap/ip6_ioam_trace.h b/src/plugins/ioam/encap/ip6_ioam_trace.h index 4eda6110d24..25693dfc6cd 100644 --- a/src/plugins/ioam/encap/ip6_ioam_trace.h +++ b/src/plugins/ioam/encap/ip6_ioam_trace.h @@ -21,12 +21,10 @@ #include <vnet/ip/ip6_hop_by_hop_packet.h> #include <ioam/lib-trace/trace_util.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { ip6_hop_by_hop_option_t hdr; ioam_trace_hdr_t trace_hdr; }) ioam_trace_option_t; -/* *INDENT-ON* */ always_inline void ip6_hbh_ioam_trace_set_bit (ioam_trace_option_t * trace, u8 trace_bit) diff --git a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c index f802a049365..1606f72224f 100644 --- a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c +++ b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c @@ -158,14 +158,12 @@ set_vxlan_gpe_ioam_export_ipfix_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_vxlan_gpe_ioam_ipfix_command, static) = { .path = "set vxlan-gpe-ioam export ipfix", .short_help = "set vxlan-gpe-ioam export ipfix collector <ip4-address> src <ip4-address>", .function = set_vxlan_gpe_ioam_export_ipfix_command_fn, }; -/* *INDENT-ON* */ #include <ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.c> static clib_error_t * diff --git a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c index 7d66bd45849..5de10ba47f3 100644 --- a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c +++ b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c @@ -33,14 +33,12 @@ vxlan_gpe_ioam_export_process (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan_gpe_ioam_export_process_node, static) = { .function = vxlan_gpe_ioam_export_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "vxlan-gpe-ioam-export-process", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_node.c b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_node.c index f8d90332d5c..839fd80b443 100644 --- a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_node.c +++ b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_node.c @@ -144,7 +144,6 @@ vxlan_gpe_export_node_fn (vlib_main_t * vm, /* * Node for VXLAN-GPE export */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan_export_node) = { .function = vxlan_gpe_export_node_fn, @@ -159,7 +158,6 @@ VLIB_REGISTER_NODE (vxlan_export_node) = .next_nodes = {[EXPORT_NEXT_VXLAN_GPE_INPUT] = "vxlan-gpe-pop-ioam-v4"}, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ioam/export/ioam_export.c b/src/plugins/ioam/export/ioam_export.c index 21695af3368..f38281182c8 100644 --- a/src/plugins/ioam/export/ioam_export.c +++ b/src/plugins/ioam/export/ioam_export.c @@ -137,13 +137,11 @@ set_ioam_export_ipfix_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ipfix_command, static) = { .path = "set ioam export ipfix",.short_help = "set ioam export ipfix collector <ip4-address> src <ip4-address>",. function = set_ioam_export_ipfix_command_fn,}; -/* *INDENT-ON* */ #include <ioam/export/ioam_export.api.c> static clib_error_t * diff --git a/src/plugins/ioam/ip6/ioam_cache_node.c b/src/plugins/ioam/ip6/ioam_cache_node.c index 6a5465b86aa..9859ee6fbf0 100644 --- a/src/plugins/ioam/ip6/ioam_cache_node.c +++ b/src/plugins/ioam/ip6/ioam_cache_node.c @@ -179,7 +179,6 @@ ip6_ioam_cache_node_fn (vlib_main_t * vm, /* * Node for IP6 iOAM header cache */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ioam_cache_node) = { .function = ip6_ioam_cache_node_fn, @@ -196,7 +195,6 @@ VLIB_REGISTER_NODE (ioam_cache_node) = [IOAM_CACHE_NEXT_POP_HBYH] = "ip6-pop-hop-by-hop" }, }; -/* *INDENT-ON* */ typedef struct { @@ -386,7 +384,6 @@ VLIB_NODE_FN (ip6_add_from_cache_hbh_node) (vlib_main_t * vm, processed); return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_add_from_cache_hbh_node) = { .name = "ip6-add-from-cache-hop-by-hop", @@ -404,7 +401,6 @@ VLIB_REGISTER_NODE (ip6_add_from_cache_hbh_node) = #undef _ }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ioam/ip6/ioam_cache_tunnel_select_node.c b/src/plugins/ioam/ip6/ioam_cache_tunnel_select_node.c index d2c7f20a778..61476ebd85c 100644 --- a/src/plugins/ioam/ip6/ioam_cache_tunnel_select_node.c +++ b/src/plugins/ioam/ip6/ioam_cache_tunnel_select_node.c @@ -235,7 +235,6 @@ ip6_ioam_cache_ts_node_fn (vlib_main_t * vm, /* * Node for IP6 iOAM header cache */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ioam_cache_ts_node) = { .function = ip6_ioam_cache_ts_node_fn, @@ -253,7 +252,6 @@ VLIB_REGISTER_NODE (ioam_cache_ts_node) = [IOAM_CACHE_TS_ERROR_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ typedef struct { @@ -623,7 +621,6 @@ VLIB_NODE_FN (ip6_reset_ts_hbh_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_reset_ts_hbh_node) = { .name = "ip6-add-syn-hop-by-hop", @@ -642,7 +639,6 @@ VLIB_REGISTER_NODE (ip6_reset_ts_hbh_node) = }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT vlib_node_registration_t ioam_cache_ts_timer_tick_node; @@ -738,7 +734,6 @@ ioam_cache_ts_timer_tick_node_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ioam_cache_ts_timer_tick_node) = { .function = ioam_cache_ts_timer_tick_node_fn, .name = "ioam-cache-ts-timer-tick", @@ -757,7 +752,6 @@ VLIB_REGISTER_NODE (ioam_cache_ts_timer_tick_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ioam/ipfixcollector/node.c b/src/plugins/ioam/ipfixcollector/node.c index 098029d6ad6..73d7b57fab5 100644 --- a/src/plugins/ioam/ipfixcollector/node.c +++ b/src/plugins/ioam/ipfixcollector/node.c @@ -271,7 +271,6 @@ ipfix_collector_node_fn (vlib_main_t * vm, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ipfix_collector_node) = { .function = ipfix_collector_node_fn, .name = "ipfix-collector", @@ -289,7 +288,6 @@ VLIB_REGISTER_NODE (ipfix_collector_node) = { [IPFIX_COLLECTOR_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ioam/lib-e2e/e2e_util.h b/src/plugins/ioam/lib-e2e/e2e_util.h index f8a4ebd4797..a72b4030b2c 100644 --- a/src/plugins/ioam/lib-e2e/e2e_util.h +++ b/src/plugins/ioam/lib-e2e/e2e_util.h @@ -18,13 +18,11 @@ #include <ioam/lib-e2e/ioam_seqno_lib.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { u8 e2e_type; u8 reserved; u32 e2e_data; }) ioam_e2e_packet_t; -/* *INDENT-ON* */ #endif /* PLUGINS_IOAM_PLUGIN_IOAM_LIB_E2E_E2E_UTIL_H_ */ diff --git a/src/plugins/ioam/lib-trace/trace_util.c b/src/plugins/ioam/lib-trace/trace_util.c index d935543cf23..31fbb2b7446 100644 --- a/src/plugins/ioam/lib-trace/trace_util.c +++ b/src/plugins/ioam/lib-trace/trace_util.c @@ -98,14 +98,12 @@ clear_trace_profiles (void) clear_trace_profile_command_fn (0, 0, 0); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(clear_trace_profile_command) = { .path = "clear ioam-trace profile", .short_help = "clear ioam-trace profile [<index>|all]", .function = clear_trace_profile_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * set_trace_profile_command_fn (vlib_main_t * vm, @@ -137,7 +135,6 @@ set_trace_profile_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_trace_profile_command, static) = { .path = "set ioam-trace profile", @@ -146,7 +143,6 @@ VLIB_CLI_COMMAND (set_trace_profile_command, static) = node-id <node id in hex> app-data <app_data in hex>", .function = set_trace_profile_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_trace_profile_command_fn (vlib_main_t * vm, @@ -189,14 +185,12 @@ show_trace_profile_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_trace_profile_command, static) = { .path = "show ioam-trace profile", .short_help = "show ioam-trace profile", .function = show_trace_profile_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ioam/lib-trace/trace_util.h b/src/plugins/ioam/lib-trace/trace_util.h index 61f18d9173a..869ea717cf8 100644 --- a/src/plugins/ioam/lib-trace/trace_util.h +++ b/src/plugins/ioam/lib-trace/trace_util.h @@ -75,14 +75,12 @@ int trace_profile_create (trace_profile * profile, u8 trace_type, u8 num_elts, void clear_trace_profiles (void); -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 ioam_trace_type; u8 data_list_elts_left; u32 elts[0]; /* Variable type. So keep it generic */ }) ioam_trace_hdr_t; -/* *INDENT-ON* */ diff --git a/src/plugins/ioam/lib-vxlan-gpe/ioam_decap.c b/src/plugins/ioam/lib-vxlan-gpe/ioam_decap.c index 87e57d3605e..801faa98066 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/ioam_decap.c +++ b/src/plugins/ioam/lib-vxlan-gpe/ioam_decap.c @@ -193,7 +193,6 @@ vxlan_gpe_decap_ioam_v4 (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan_gpe_decap_ioam_v4_node) = { .function = vxlan_gpe_decap_ioam_v4, .name = "vxlan-gpe-decap-ioam-v4", @@ -211,7 +210,6 @@ VLIB_REGISTER_NODE (vxlan_gpe_decap_ioam_v4_node) = { [VXLAN_GPE_DECAP_IOAM_V4_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/ioam/lib-vxlan-gpe/ioam_encap.c b/src/plugins/ioam/lib-vxlan-gpe/ioam_encap.c index 1d15654464d..de375df4f7c 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/ioam_encap.c +++ b/src/plugins/ioam/lib-vxlan-gpe/ioam_encap.c @@ -164,7 +164,6 @@ vxlan_gpe_encap_ioam_v4 (vlib_main_t * vm, -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan_gpe_encap_ioam_v4_node) = { .function = vxlan_gpe_encap_ioam_v4, .name = "vxlan-gpe-encap-ioam-v4", @@ -182,7 +181,6 @@ VLIB_REGISTER_NODE (vxlan_gpe_encap_ioam_v4_node) = { [VXLAN_GPE_ENCAP_IOAM_V4_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/ioam/lib-vxlan-gpe/ioam_pop.c b/src/plugins/ioam/lib-vxlan-gpe/ioam_pop.c index 84900eb7e01..2fa0aa29450 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/ioam_pop.c +++ b/src/plugins/ioam/lib-vxlan-gpe/ioam_pop.c @@ -321,7 +321,6 @@ vxlan_gpe_pop_ioam_v4 (vlib_main_t * vm, return vxlan_gpe_pop_ioam (vm, node, from_frame, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan_gpe_pop_ioam_v4_node) = { .function = vxlan_gpe_pop_ioam_v4, .name = "vxlan-gpe-pop-ioam-v4", @@ -340,7 +339,6 @@ VLIB_REGISTER_NODE (vxlan_gpe_pop_ioam_v4_node) = { #undef _ }, }; -/* *INDENT-ON* */ diff --git a/src/plugins/ioam/lib-vxlan-gpe/ioam_transit.c b/src/plugins/ioam/lib-vxlan-gpe/ioam_transit.c index 215f14b74bc..e3c82725e26 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/ioam_transit.c +++ b/src/plugins/ioam/lib-vxlan-gpe/ioam_transit.c @@ -51,14 +51,12 @@ typedef enum } vxlan_gpe_transit_ioam_next_t; -/* *INDENT-OFF* */ VNET_FEATURE_INIT (vxlan_gpe_transit_ioam, static) = { .arc_name = "ip4-output", .node_name = "vxlan-gpe-transit-ioam", .runs_before = VNET_FEATURES ("interface-output"), }; -/* *INDENT-ON* */ static uword vxlan_gpe_transit_ioam (vlib_main_t * vm, @@ -156,7 +154,6 @@ vxlan_gpe_transit_ioam (vlib_main_t * vm, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan_gpe_transit_ioam_node) = { .function = vxlan_gpe_transit_ioam, .name = "vxlan-gpe-transit-ioam", @@ -175,7 +172,6 @@ VLIB_REGISTER_NODE (vxlan_gpe_transit_ioam_node) = { }, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c index 870de924e65..327afc3fb61 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c +++ b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c @@ -510,13 +510,11 @@ vxlan_gpe_set_ioam_rewrite_command_fn (vlib_main_t * } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_gpe_set_ioam_rewrite_cmd, static) = { .path = "set vxlan-gpe-ioam", .short_help = "set vxlan-gpe-ioam vxlan <src-ip> <dst_ip> <vnid> [disable]", .function = vxlan_gpe_set_ioam_rewrite_command_fn, }; -/* *INDENT-ON* */ @@ -592,13 +590,11 @@ vxlan_gpe_set_ioam_flags_command_fn (vlib_main_t * vm, return rv; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_gpe_set_ioam_flags_cmd, static) = { .path = "set vxlan-gpe-ioam rewrite", .short_help = "set vxlan-gpe-ioam [trace] [pot] [ppc <encap|decap>]", .function = vxlan_gpe_set_ioam_flags_command_fn,}; -/* *INDENT-ON* */ int vxlan_gpe_ioam_disable_for_dest @@ -683,13 +679,11 @@ static clib_error_t *vxlan_gpe_set_ioam_transit_rewrite_command_fn return rv; } - /* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_gpe_set_ioam_transit_rewrite_cmd, static) = { .path = "set vxlan-gpe-ioam-transit", .short_help = "set vxlan-gpe-ioam-transit dst-ip <dst_ip> [outer-fib-index <outer_fib_index>] [disable]", .function = vxlan_gpe_set_ioam_transit_rewrite_command_fn, }; -/* *INDENT-ON* */ clib_error_t *clear_vxlan_gpe_ioam_rewrite_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) @@ -697,14 +691,12 @@ clib_error_t *clear_vxlan_gpe_ioam_rewrite_command_fn return (vxlan_gpe_ioam_disable (0, 0, 0)); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_gpe_clear_ioam_flags_cmd, static) = { .path = "clear vxlan-gpe-ioam rewrite", .short_help = "clear vxlan-gpe-ioam rewrite", .function = clear_vxlan_gpe_ioam_rewrite_command_fn, }; -/* *INDENT-ON* */ /** diff --git a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c index 1a37059396c..9c783c747d0 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c +++ b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c @@ -39,14 +39,12 @@ typedef union } time_u64_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { vxlan_gpe_ioam_option_t hdr; u8 ioam_trace_type; u8 data_list_elts_left; u32 elts[0]; /* Variable type. So keep it generic */ }) vxlan_gpe_ioam_trace_option_t; -/* *INDENT-ON* */ #define foreach_vxlan_gpe_ioam_trace_stats \ @@ -422,13 +420,11 @@ vxlan_gpe_show_ioam_trace_cmd_fn (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_gpe_show_ioam_trace_cmd, static) = { .path = "show ioam vxlan-gpe trace", .short_help = "iOAM trace statistics", .function = vxlan_gpe_show_ioam_trace_cmd_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -459,13 +455,11 @@ vxlan_gpe_ioam_trace_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (vxlan_gpe_ioam_trace_init) = { .runs_after = VLIB_INITS("ip_main_init", "ip6_lookup_init", "vxlan_gpe_init"), }; -/* *INDENT-ON* */ int diff --git a/src/plugins/ioam/udp-ping/udp_ping_export.c b/src/plugins/ioam/udp-ping/udp_ping_export.c index de0bad7a855..78d62233a7d 100644 --- a/src/plugins/ioam/udp-ping/udp_ping_export.c +++ b/src/plugins/ioam/udp-ping/udp_ping_export.c @@ -275,13 +275,11 @@ set_udp_ping_export_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_udp_ping_export_command, static) = { .path = "set udp-ping export-ipfix", .short_help = "set udp-ping export-ipfix [disable]", .function = set_udp_ping_export_command_fn, }; -/* *INDENT-ON* */ clib_error_t * udp_ping_flow_report_init (vlib_main_t * vm) @@ -289,12 +287,10 @@ udp_ping_flow_report_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (udp_ping_flow_report_init) = { .runs_after = VLIB_INITS ("flow_report_init"), }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/ioam/udp-ping/udp_ping_node.c b/src/plugins/ioam/udp-ping/udp_ping_node.c index 6bfa8f67ef5..fbc3b13971c 100644 --- a/src/plugins/ioam/udp-ping/udp_ping_node.c +++ b/src/plugins/ioam/udp-ping/udp_ping_node.c @@ -93,14 +93,12 @@ format_udp_ping_trace (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (udp_ping_node, static) = { .function = udp_ping_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "udp-ping-process", }; -/* *INDENT-ON* */ void udp_ping_calculate_timer_interval (void) @@ -301,7 +299,6 @@ set_udp_ping_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_udp_ping_command, static) = { .path = "set udp-ping", @@ -312,7 +309,6 @@ VLIB_CLI_COMMAND (set_udp_ping_command, static) = [disable]", .function = set_udp_ping_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_udp_ping_summary_cmd_fn (vlib_main_t * vm, @@ -374,14 +370,12 @@ show_udp_ping_summary_cmd_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_udp_ping_cmd, static) = { .path = "show udp-ping summary", .short_help = "Summary of udp-ping", .function = show_udp_ping_summary_cmd_fn, }; -/* *INDENT-ON* */ /** * @brief UDP-Ping Process node. @@ -790,7 +784,6 @@ udp_ping_local_node_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ /* * Node for udp-ping-local */ @@ -814,7 +807,6 @@ VLIB_REGISTER_NODE (udp_ping_local, static) = [UDP_PING_NEXT_IP6_DROP] = "ip6-drop", }, }; -/* *INDENT-ON* */ static clib_error_t * udp_ping_init (vlib_main_t * vm) @@ -828,12 +820,10 @@ udp_ping_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (udp_ping_init) = { .runs_after = VLIB_INITS("ip_main_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/l2tp/decap.c b/src/plugins/l2tp/decap.c index 8c41bdd2357..e6ad8b0926c 100644 --- a/src/plugins/l2tp/decap.c +++ b/src/plugins/l2tp/decap.c @@ -249,7 +249,6 @@ VLIB_NODE_FN (l2t_decap_node) (vlib_main_t * vm, * while l2tp-decap-local drops it. */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2t_decap_node) = { .name = "l2tp-decap", .vector_size = sizeof (u32), @@ -267,11 +266,9 @@ VLIB_REGISTER_NODE (l2t_decap_node) = { [L2T_DECAP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ extern vlib_node_function_t l2t_decap_node_fn; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2t_decap_local_node) = { .function = l2t_decap_node_fn, .name = "l2tp-decap-local", @@ -290,7 +287,6 @@ VLIB_REGISTER_NODE (l2t_decap_local_node) = { [L2T_DECAP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/l2tp/encap.c b/src/plugins/l2tp/encap.c index fbb5fc6ea46..3115b96f088 100644 --- a/src/plugins/l2tp/encap.c +++ b/src/plugins/l2tp/encap.c @@ -192,7 +192,6 @@ VLIB_NODE_FN (l2t_encap_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2t_encap_node) = { .name = "l2tp-encap", .vector_size = sizeof (u32), @@ -211,7 +210,6 @@ VLIB_REGISTER_NODE (l2t_encap_node) = { [L2T_ENCAP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT void diff --git a/src/plugins/l2tp/l2tp.c b/src/plugins/l2tp/l2tp.c index 308c0f1d659..907468b5900 100644 --- a/src/plugins/l2tp/l2tp.c +++ b/src/plugins/l2tp/l2tp.c @@ -127,24 +127,20 @@ show_l2tp_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "L2tp session lookup on %s", keystr); - /* *INDENT-OFF* */ pool_foreach (session, lm->sessions) { vlib_cli_output (vm, "%U", format_l2t_session, session); } - /* *INDENT-ON* */ } return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_session_detail_command, static) = { .path = "show l2tpv3", .short_help = "show l2tpv3 [verbose]", .function = show_l2tp_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * test_counters_command_fn (vlib_main_t * vm, @@ -157,7 +153,6 @@ test_counters_command_fn (vlib_main_t * vm, u32 nincr = 0; u32 thread_index = vm->thread_index; - /* *INDENT-OFF* */ pool_foreach (session, lm->sessions) { session_index = session - lm->sessions; @@ -175,19 +170,16 @@ test_counters_command_fn (vlib_main_t * vm, nincr++; } - /* *INDENT-ON* */ vlib_cli_output (vm, "Incremented %d active counters\n", nincr); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_counters_command, static) = { .path = "test lt2p counters", .short_help = "increment all active counters", .function = test_counters_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * clear_counters_command_fn (vlib_main_t * vm, @@ -199,7 +191,6 @@ clear_counters_command_fn (vlib_main_t * vm, u32 counter_index; u32 nincr = 0; - /* *INDENT-OFF* */ pool_foreach (session, lm->sessions) { session_index = session - lm->sessions; @@ -210,19 +201,16 @@ clear_counters_command_fn (vlib_main_t * vm, vlib_zero_combined_counter (&lm->counter_main, counter_index+1); nincr++; } - /* *INDENT-ON* */ vlib_cli_output (vm, "Cleared %d active counters\n", nincr); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_counters_command, static) = { .path = "clear l2tp counters", .short_help = "clear all active counters", .function = clear_counters_command_fn, }; -/* *INDENT-ON* */ static u8 * format_l2tpv3_name (u8 * s, va_list * args) @@ -252,13 +240,11 @@ l2tpv3_name_renumber (vnet_hw_interface_t * hi, u32 new_dev_instance) return 0; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (l2tpv3_device_class,static) = { .name = "L2TPv3", .format_device_name = format_l2tpv3_name, .name_renumber = l2tpv3_name_renumber, }; -/* *INDENT-ON* */ static u8 * format_l2tp_header_with_length (u8 * s, va_list * args) @@ -268,14 +254,12 @@ format_l2tp_header_with_length (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (l2tpv3_hw_class) = { .name = "L2TPV3", .format_header = format_l2tp_header_with_length, .build_rewrite = default_build_rewrite, .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P, }; -/* *INDENT-ON* */ int create_l2tpv3_ipv6_tunnel (l2t_main_t * lm, @@ -515,7 +499,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_l2tpv3_tunnel_command, static) = { .path = "create l2tpv3 tunnel", @@ -523,7 +506,6 @@ VLIB_CLI_COMMAND (create_l2tpv3_tunnel_command, static) = "create l2tpv3 tunnel client <ip6> our <ip6> local-cookie <hex> remote-cookie <hex> local-session <dec> remote-session <dec>", .function = create_l2tpv3_tunnel_command_fn, }; -/* *INDENT-ON* */ int l2tpv3_set_tunnel_cookies (l2t_main_t * lm, @@ -598,7 +580,6 @@ set_l2tp_tunnel_cookie_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_l2tp_tunnel_cookie_command, static) = { .path = "set l2tpv3 tunnel cookie", @@ -606,7 +587,6 @@ VLIB_CLI_COMMAND (set_l2tp_tunnel_cookie_command, static) = "set l2tpv3 tunnel cookie <intfc> local <hex> remote <hex>", .function = set_l2tp_tunnel_cookie_command_fn, }; -/* *INDENT-ON* */ int l2tpv3_interface_enable_disable (vnet_main_t * vnm, @@ -663,14 +643,12 @@ set_ip6_l2tpv3 (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip6_l2tpv3, static) = { .path = "set interface ip6 l2tpv3", .function = set_ip6_l2tpv3, .short_help = "set interface ip6 l2tpv3 <intfc> [del]", }; -/* *INDENT-ON* */ static clib_error_t * l2tp_config (vlib_main_t * vm, unformat_input_t * input) diff --git a/src/plugins/l2tp/l2tp_api.c b/src/plugins/l2tp/l2tp_api.c index ba9d2681b35..9c5ad700e0c 100644 --- a/src/plugins/l2tp/l2tp_api.c +++ b/src/plugins/l2tp/l2tp_api.c @@ -89,12 +89,10 @@ vl_api_sw_if_l2tpv3_tunnel_dump_t_handler (vl_api_sw_if_l2tpv3_tunnel_dump_t * if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (session, lm->sessions) { send_sw_if_l2tpv3_tunnel_details (am, reg, session, lm, mp->context); } - /* *INDENT-ON* */ } static void vl_api_l2tpv3_create_tunnel_t_handler @@ -146,12 +144,10 @@ static void vl_api_l2tpv3_create_tunnel_t_handler encap_fib_index, &sw_if_index); out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_L2TPV3_CREATE_TUNNEL_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); })); - /* *INDENT-ON* */ } static void vl_api_l2tpv3_set_tunnel_cookies_t_handler @@ -234,12 +230,10 @@ VLIB_API_INIT_FUNCTION (l2tp_api_hookup); #include <vlib/unix/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Layer 2 Tunneling Protocol v3 (L2TP)", }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/l2tp/packet.h b/src/plugins/l2tp/packet.h index 66dfea2194c..d7d78f85e53 100644 --- a/src/plugins/l2tp/packet.h +++ b/src/plugins/l2tp/packet.h @@ -24,14 +24,12 @@ * tunnels. It is not present in IOS XR l2tpv3 tunnels. * The Linux implementation is almost certainly wrong. */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u32 session_id; u64 cookie; u32 l2_specific_sublayer; /* set to 0 (if present) */ }) l2tpv3_header_t; -/* *INDENT-ON* */ #endif /* __included_l2tp_packet_h__ */ diff --git a/src/plugins/l3xc/l3xc.c b/src/plugins/l3xc/l3xc.c index 0f7324c277d..427c38e9ab5 100644 --- a/src/plugins/l3xc/l3xc.c +++ b/src/plugins/l3xc/l3xc.c @@ -264,7 +264,6 @@ out: return (NULL); } -/* *INDENT-OFF* */ /** * Create an L3XC policy. */ @@ -274,7 +273,6 @@ VLIB_CLI_COMMAND (l3xc_cmd_node, static) = { .short_help = "l3xc [add|del] <INTERFACE> via ...", .is_mp_safe = 1, }; -/* *INDENT-ON* */ static u8 * format_l3xc (u8 * s, va_list * args) @@ -305,13 +303,11 @@ l3xc_walk (l3xc_walk_cb_t cb, void *ctx) { u32 l3xci; - /* *INDENT-OFF* */ pool_foreach_index (l3xci, l3xc_pool) { if (!cb(l3xci, ctx)) break; } - /* *INDENT-ON* */ } static clib_error_t * @@ -320,24 +316,20 @@ l3xc_show_cmd (vlib_main_t * vm, { l3xc_t *l3xc; - /* *INDENT-OFF* */ pool_foreach (l3xc, l3xc_pool) { vlib_cli_output(vm, "%U", format_l3xc, l3xc); } - /* *INDENT-ON* */ return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l3xc_show_cmd_node, static) = { .path = "show l3xc", .function = l3xc_show_cmd, .short_help = "show l3xc", .is_mp_safe = 1, }; -/* *INDENT-ON* */ static fib_node_t * l3xc_get_node (fib_node_index_t index) diff --git a/src/plugins/l3xc/l3xc_api.c b/src/plugins/l3xc/l3xc_api.c index d4a837d7d9c..f09100b3546 100644 --- a/src/plugins/l3xc/l3xc_api.c +++ b/src/plugins/l3xc/l3xc_api.c @@ -209,12 +209,10 @@ l3xc_api_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (l3xc_api_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "L3 Cross-Connect (L3XC)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/l3xc/l3xc_node.c b/src/plugins/l3xc/l3xc_node.c index 62db8c328b0..0f79bebeff9 100644 --- a/src/plugins/l3xc/l3xc_node.c +++ b/src/plugins/l3xc/l3xc_node.c @@ -199,7 +199,6 @@ static char *l3xc_error_strings[] = { #undef l3xc_error }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l3xc_ip4_node) = { .function = l3xc_input_ip4, @@ -245,7 +244,6 @@ VNET_FEATURE_INIT (l3xc_ip6_feat, static) = .node_name = "l3xc-input-ip6", .runs_after = VNET_FEATURES ("acl-plugin-in-ip6-fa"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lacp/cli.c b/src/plugins/lacp/cli.c index fee9a5a2269..7cf97e09dc4 100644 --- a/src/plugins/lacp/cli.c +++ b/src/plugins/lacp/cli.c @@ -28,7 +28,6 @@ lacp_dump_ifs (lacp_interface_details_t ** out_lacpifs) lacp_interface_details_t *r_lacpifs = NULL; lacp_interface_details_t *lacpif = NULL; - /* *INDENT-OFF* */ pool_foreach (mif, bm->neighbors) { if (mif->lacp_enabled == 0) continue; @@ -61,7 +60,6 @@ lacp_dump_ifs (lacp_interface_details_t ** out_lacpifs) lacpif->ptx_state = mif->ptx_state; lacpif->mux_state = mif->mux_state; } - /* *INDENT-ON* */ *out_lacpifs = r_lacpifs; @@ -309,14 +307,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_lacp_command, static) = { .path = "show lacp", .short_help = "show lacp [<interface>] [details]", .function = show_lacp_fn, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * debug_lacp_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -384,13 +380,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (debug_lacp_command, static) = { .path = "debug lacp", .short_help = "debug lacp <interface> <on | off>", .function = debug_lacp_command_fn, }; -/* *INDENT-ON* */ clib_error_t * lacp_cli_init (vlib_main_t * vm) diff --git a/src/plugins/lacp/input.c b/src/plugins/lacp/input.c index 31450286f34..5ccd1037fdb 100644 --- a/src/plugins/lacp/input.c +++ b/src/plugins/lacp/input.c @@ -239,12 +239,10 @@ lacp_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (lacp_init) = { .runs_after = VLIB_INITS("lacp_periodic_init"), }; -/* *INDENT-ON* */ /* * packet trace format function, very similar to diff --git a/src/plugins/lacp/lacp.c b/src/plugins/lacp/lacp.c index ad7710266f9..ba66f7b245d 100644 --- a/src/plugins/lacp/lacp.c +++ b/src/plugins/lacp/lacp.c @@ -142,7 +142,6 @@ lacp_periodic (vlib_main_t * vm) bond_if_t *bif; u8 actor_state, partner_state; - /* *INDENT-OFF* */ pool_foreach (mif, bm->neighbors) { if (mif->port_enabled == 0) @@ -185,7 +184,6 @@ lacp_periodic (vlib_main_t * vm) mif->partner.state); } } - /* *INDENT-ON* */ } static void @@ -216,12 +214,10 @@ lacp_interface_enable_disable (vlib_main_t * vm, bond_if_t * bif, ASSERT (lm->lacp_int >= 1); if (lm->lacp_int == 0) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "lacp-int-en-dis: BUG lacp_int == 0", }; - /* *INDENT-ON* */ ELOG_DATA (&vlib_global_main.elog_main, e); } else @@ -453,12 +449,10 @@ lacp_hw_interface_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION (lacp_hw_interface_up_down); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Link Aggregation Control Protocol (LACP)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lacp/mux_machine.c b/src/plugins/lacp/mux_machine.c index 974dbd9dac9..ee43894cd53 100644 --- a/src/plugins/lacp/mux_machine.c +++ b/src/plugins/lacp/mux_machine.c @@ -208,13 +208,11 @@ lacp_mux_debug_func (member_if_t * mif, int event, int state, lacp_fsm_state_t * transition) { vlib_worker_thread_t *w = vlib_worker_threads + os_get_thread_index (); - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "%s", .format_args = "T4", }; - /* *INDENT-ON* */ struct { u32 event; diff --git a/src/plugins/lacp/node.c b/src/plugins/lacp/node.c index f70ea69deef..4426dafab5b 100644 --- a/src/plugins/lacp/node.c +++ b/src/plugins/lacp/node.c @@ -112,7 +112,6 @@ lacp_node_fn (vlib_main_t * vm, /* * lacp input graph node declaration */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lacp_input_node, static) = { .function = lacp_node_fn, .name = "lacp-input", @@ -129,19 +128,16 @@ VLIB_REGISTER_NODE (lacp_input_node, static) = { [LACP_INPUT_NEXT_NORMAL] = "error-drop", }, }; -/* *INDENT-ON* */ static void lacp_elog_start_event (void) { lacp_main_t *lm = &lacp_main; - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "Starting LACP process, interface count = %d", .format_args = "i4", }; - /* *INDENT-ON* */ struct { u32 count; @@ -155,13 +151,11 @@ static void lacp_elog_stop_event (void) { lacp_main_t *lm = &lacp_main; - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "Stopping LACP process, interface count = %d", .format_args = "i4", }; - /* *INDENT-ON* */ struct { u32 count; diff --git a/src/plugins/lacp/ptx_machine.c b/src/plugins/lacp/ptx_machine.c index bb9d033c13a..92a99c920e9 100644 --- a/src/plugins/lacp/ptx_machine.c +++ b/src/plugins/lacp/ptx_machine.c @@ -195,13 +195,11 @@ lacp_ptx_debug_func (member_if_t * mif, int event, int state, lacp_fsm_state_t * transition) { vlib_worker_thread_t *w = vlib_worker_threads + os_get_thread_index (); - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "%s", .format_args = "T4", }; - /* *INDENT-ON* */ struct { u32 event; diff --git a/src/plugins/lacp/rx_machine.c b/src/plugins/lacp/rx_machine.c index 2fadbe636cf..9c161b02078 100644 --- a/src/plugins/lacp/rx_machine.c +++ b/src/plugins/lacp/rx_machine.c @@ -343,7 +343,6 @@ lacp_port_is_moved (vlib_main_t * vm, member_if_t * mif) member_if_t *mif2; lacp_pdu_t *lacpdu = (lacp_pdu_t *) mif->last_rx_pkt; - /* *INDENT-OFF* */ pool_foreach (mif2, bm->neighbors) { { if ((mif != mif2) && (mif2->rx_state == LACP_RX_STATE_PORT_DISABLED) && @@ -353,7 +352,6 @@ lacp_port_is_moved (vlib_main_t * vm, member_if_t * mif) return 1; } } - /* *INDENT-ON* */ return 0; } @@ -400,13 +398,11 @@ lacp_rx_debug_func (member_if_t * mif, int event, int state, lacp_fsm_state_t * transition) { vlib_worker_thread_t *w = vlib_worker_threads + os_get_thread_index (); - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "%s", .format_args = "T4", }; - /* *INDENT-ON* */ struct { u32 event; diff --git a/src/plugins/lacp/tx_machine.c b/src/plugins/lacp/tx_machine.c index 1eb3bc1c4b7..c36f44c07ce 100644 --- a/src/plugins/lacp/tx_machine.c +++ b/src/plugins/lacp/tx_machine.c @@ -84,13 +84,11 @@ lacp_tx_debug_func (member_if_t * mif, int event, int state, lacp_fsm_state_t * transition) { vlib_worker_thread_t *w = vlib_worker_threads + os_get_thread_index (); - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "%s", .format_args = "T4", }; - /* *INDENT-ON* */ struct { u32 event; diff --git a/src/plugins/lb/api.c b/src/plugins/lb/api.c index fe1d7e43d69..ea2e482135b 100644 --- a/src/plugins/lb/api.c +++ b/src/plugins/lb/api.c @@ -330,7 +330,6 @@ vl_api_lb_as_dump_t_handler dump_all = (prefix.ip6.as_u64[0] == 0) && (prefix.ip6.as_u64[1] == 0); - /* *INDENT-OFF* */ pool_foreach (vip, lbm->vips) { if ( dump_all @@ -342,7 +341,6 @@ vl_api_lb_as_dump_t_handler send_lb_as_details(reg, mp->context, vip); } } - /* *INDENT-ON* */ } static void diff --git a/src/plugins/lb/lb.c b/src/plugins/lb/lb.c index c0a443b2cda..f8d5fe8d833 100644 --- a/src/plugins/lb/lb.c +++ b/src/plugins/lb/lb.c @@ -1256,12 +1256,10 @@ int lb_vip_del(u32 vip_index) return rv; } -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Load Balancer (LB)", }; -/* *INDENT-ON* */ u8 *format_lb_dpo (u8 * s, va_list * va) { diff --git a/src/plugins/lisp/lisp-cp/control.c b/src/plugins/lisp/lisp-cp/control.c index 4f5dc55d12c..692048ebd21 100644 --- a/src/plugins/lisp/lisp-cp/control.c +++ b/src/plugins/lisp/lisp-cp/control.c @@ -581,7 +581,6 @@ vnet_lisp_adjacencies_get_by_vni (u32 vni) fwd_entry_t *fwd; lisp_adjacency_t *adjs = 0, adj; - /* *INDENT-OFF* */ pool_foreach (fwd, lcm->fwd_entry_pool) { if (gid_address_vni (&fwd->reid) != vni) @@ -591,7 +590,6 @@ vnet_lisp_adjacencies_get_by_vni (u32 vni) gid_address_copy (&adj.leid, &fwd->leid); vec_add1 (adjs, adj); } - /* *INDENT-ON* */ return adjs; } @@ -804,7 +802,6 @@ vnet_lisp_map_cache_add_del (vnet_lisp_add_del_mapping_args_t * a, /* Remove remote (if present) from the vectors of lcl-to-rmts * TODO: Address this in a more efficient way. */ - /* *INDENT-OFF* */ pool_foreach (rmts, lcm->lcl_to_rmt_adjacencies) { vec_foreach_index (rmts_itr, rmts[0]) @@ -817,7 +814,6 @@ vnet_lisp_map_cache_add_del (vnet_lisp_add_del_mapping_args_t * a, } } } - /* *INDENT-ON* */ } /* remove mapping from dictionary */ @@ -1389,12 +1385,10 @@ vnet_lisp_clear_all_remote_adjacencies (void) vnet_lisp_add_del_mapping_args_t _dm_args, *dm_args = &_dm_args; vnet_lisp_add_del_locator_set_args_t _ls, *ls = &_ls; - /* *INDENT-OFF* */ pool_foreach_index (mi, lcm->mapping_pool) { vec_add1 (map_indices, mi); } - /* *INDENT-ON* */ vec_foreach (map_indexp, map_indices) { @@ -2167,7 +2161,6 @@ lisp_cp_enable_l2_l3_ifaces (lisp_cp_main_t * lcm, u8 with_default_route) { u32 vni, dp_table; - /* *INDENT-OFF* */ hash_foreach(vni, dp_table, lcm->table_id_by_vni, ({ dp_add_del_iface(lcm, vni, /* is_l2 */ 0, /* is_add */1, with_default_route); @@ -2176,7 +2169,6 @@ lisp_cp_enable_l2_l3_ifaces (lisp_cp_main_t * lcm, u8 with_default_route) dp_add_del_iface(lcm, vni, /* is_l2 */ 1, 1, with_default_route); })); - /* *INDENT-ON* */ } static void @@ -2188,12 +2180,10 @@ lisp_cp_disable_l2_l3_ifaces (lisp_cp_main_t * lcm) hash_free (lcm->fwd_entry_by_mapping_index); pool_free (lcm->fwd_entry_pool); /* Clear state tracking rmt-lcl fwd entries */ - /* *INDENT-OFF* */ pool_foreach (rmts, lcm->lcl_to_rmt_adjacencies) { vec_free(rmts[0]); } - /* *INDENT-ON* */ hash_free (lcm->lcl_to_rmt_adjs_by_lcl_idx); pool_free (lcm->lcl_to_rmt_adjacencies); } @@ -2465,7 +2455,6 @@ build_itr_rloc_list (lisp_cp_main_t * lcm, locator_set_t * loc_set) /* Add ipv4 locators first TODO sort them */ - /* *INDENT-OFF* */ foreach_ip_interface_address (&lcm->im4->lookup_main, ia, loc->sw_if_index, 1 /* unnumbered */, ({ @@ -2486,7 +2475,6 @@ build_itr_rloc_list (lisp_cp_main_t * lcm, locator_set_t * loc_set) ip_prefix_normalize (ippref); vec_add1 (rlocs, gid[0]); })); - /* *INDENT-ON* */ } return rlocs; @@ -2638,7 +2626,6 @@ add_locators (lisp_cp_main_t * lcm, mapping_t * m, u32 locator_set_index, new = loc[0]; if (loc->local) { - /* *INDENT-OFF* */ foreach_ip_interface_address (&lcm->im4->lookup_main, ia, loc->sw_if_index, 1 /* unnumbered */, ({ @@ -2655,7 +2642,6 @@ add_locators (lisp_cp_main_t * lcm, mapping_t * m, u32 locator_set_index, ia); ip_address_set (new_ip, addr, AF_IP6); })); - /* *INDENT-ON* */ if (probed_loc && ip_address_cmp (probed_loc, new_ip) == 0) new.probed = 1; @@ -2669,7 +2655,6 @@ build_map_register_record_list (lisp_cp_main_t * lcm) { mapping_t *recs = 0, rec, *m; - /* *INDENT-OFF* */ pool_foreach (m, lcm->mapping_pool) { /* for now build only local mappings */ @@ -2680,7 +2665,6 @@ build_map_register_record_list (lisp_cp_main_t * lcm) add_locators (lcm, &rec, m->locator_set_index, NULL); vec_add1 (recs, rec); } - /* *INDENT-ON* */ return recs; } @@ -2834,7 +2818,6 @@ lisp_cp_output (vlib_main_t * vm, vlib_node_runtime_t * node, } /* placeholder node used only for statistics */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_cp_output_node) = { .function = lisp_cp_output, .name = "lisp-cp-output", @@ -2851,7 +2834,6 @@ VLIB_REGISTER_NODE (lisp_cp_output_node) = { [LISP_CP_INPUT_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ static int send_rloc_probe (lisp_cp_main_t * lcm, gid_address_t * deid, @@ -2899,7 +2881,6 @@ send_rloc_probes (lisp_cp_main_t * lcm) locator_pair_t *lp; u32 si, rloc_probes_sent = 0; - /* *INDENT-OFF* */ pool_foreach (e, lcm->fwd_entry_pool) { if (vec_len (e->locator_pairs) == 0) @@ -2929,7 +2910,6 @@ send_rloc_probes (lisp_cp_main_t * lcm) rloc_probes_sent++; } } - /* *INDENT-ON* */ vlib_node_increment_counter (vlib_get_main (), lisp_cp_output_node.index, LISP_CP_OUTPUT_ERROR_RLOC_PROBES_SENT, @@ -3038,7 +3018,6 @@ _send_encapsulated_map_request (lisp_cp_main_t * lcm, /* if there is already a pending request remember it */ - /* *INDENT-OFF* */ pool_foreach (pmr, lcm->pending_map_requests_pool) { if (!gid_address_cmp (&pmr->src, seid) @@ -3048,7 +3027,6 @@ _send_encapsulated_map_request (lisp_cp_main_t * lcm, break; } } - /* *INDENT-ON* */ if (!is_resend && duplicate_pmr) { @@ -3597,7 +3575,6 @@ lisp_cp_lookup_nsh (vlib_main_t * vm, return (lisp_cp_lookup_inline (vm, node, from_frame, LISP_AFI_LCAF)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_cp_lookup_ip4_node) = { .function = lisp_cp_lookup_ip4, .name = "lisp-cp-lookup-ip4", @@ -3615,9 +3592,7 @@ VLIB_REGISTER_NODE (lisp_cp_lookup_ip4_node) = { [LISP_CP_LOOKUP_NEXT_ARP_NDP_REPLY_TX] = "interface-output", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_cp_lookup_ip6_node) = { .function = lisp_cp_lookup_ip6, .name = "lisp-cp-lookup-ip6", @@ -3635,9 +3610,7 @@ VLIB_REGISTER_NODE (lisp_cp_lookup_ip6_node) = { [LISP_CP_LOOKUP_NEXT_ARP_NDP_REPLY_TX] = "interface-output", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_cp_lookup_l2_node) = { .function = lisp_cp_lookup_l2, .name = "lisp-cp-lookup-l2", @@ -3655,9 +3628,7 @@ VLIB_REGISTER_NODE (lisp_cp_lookup_l2_node) = { [LISP_CP_LOOKUP_NEXT_ARP_NDP_REPLY_TX] = "interface-output", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_cp_lookup_nsh_node) = { .function = lisp_cp_lookup_nsh, .name = "lisp-cp-lookup-nsh", @@ -3675,7 +3646,6 @@ VLIB_REGISTER_NODE (lisp_cp_lookup_nsh_node) = { [LISP_CP_LOOKUP_NEXT_ARP_NDP_REPLY_TX] = "interface-output", }, }; -/* *INDENT-ON* */ /* lisp_cp_input statistics */ #define foreach_lisp_cp_input_error \ @@ -3890,11 +3860,9 @@ process_map_reply (map_records_arg_t * a) /* remove pending map request entry */ - /* *INDENT-OFF* */ clib_fifo_foreach (noncep, pmr->nonces, ({ hash_unset(lcm->pending_map_requests_by_nonce, noncep[0]); })); - /* *INDENT-ON* */ clib_fifo_free (pmr->nonces); pool_put (lcm->pending_map_requests_pool, pmr); @@ -4063,12 +4031,10 @@ map_record_args_get () map_records_arg_t *rec; /* Cleanup first */ - /* *INDENT-OFF* */ pool_foreach (rec, lcm->map_records_args_pool[vlib_get_thread_index()]) { if (rec->is_free) map_records_arg_free (rec); } - /* *INDENT-ON* */ pool_get (lcm->map_records_args_pool[vlib_get_thread_index ()], rec); return rec; @@ -4448,7 +4414,6 @@ lisp_cp_input (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_cp_input_node) = { .function = lisp_cp_input, .name = "lisp-cp-input", @@ -4465,7 +4430,6 @@ VLIB_REGISTER_NODE (lisp_cp_input_node) = { [LISP_CP_INPUT_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ clib_error_t * lisp_cp_init (vlib_main_t * vm) @@ -4553,13 +4517,11 @@ vnet_lisp_get_stats (void) lisp_stats_key_t *key; u32 index; - /* *INDENT-OFF* */ hash_foreach_mem (key, index, lgm->lisp_stats_index_by_key, { if (lisp_stats_api_fill (lcm, lgm, &stat, key, index)) vec_add1 (stats, stat); }); - /* *INDENT-ON* */ return stats; } @@ -4655,7 +4617,6 @@ remove_dead_pending_map_requests (lisp_cp_main_t * lcm) pending_map_request_t *pmr; u32 *to_be_removed = 0, *pmr_index; - /* *INDENT-OFF* */ pool_foreach (pmr, lcm->pending_map_requests_pool) { if (pmr->to_be_removed) @@ -4667,7 +4628,6 @@ remove_dead_pending_map_requests (lisp_cp_main_t * lcm) vec_add1 (to_be_removed, pmr - lcm->pending_map_requests_pool); } } - /* *INDENT-ON* */ vec_foreach (pmr_index, to_be_removed) pool_put_index (lcm->pending_map_requests_pool, pmr_index[0]); @@ -4753,7 +4713,6 @@ update_map_register (lisp_cp_main_t * lcm, f64 dt) if (!lcm->is_enabled || !lcm->map_registering) return; - /* *INDENT-OFF* */ pool_foreach (pmr, lcm->pending_map_registers_pool) { if (!update_pending_map_register (pmr, dt, &del_all)) @@ -4763,7 +4722,6 @@ update_map_register (lisp_cp_main_t * lcm, f64 dt) vec_add1 (to_be_removed, pmr - lcm->pending_map_registers_pool); } } - /* *INDENT-ON* */ if (del_all) { @@ -4813,13 +4771,11 @@ send_map_resolver_service (vlib_main_t * vm, /* currently no signals are expected - just wait for clock */ (void) vlib_process_get_events (vm, 0); - /* *INDENT-OFF* */ pool_foreach (pmr, lcm->pending_map_requests_pool) { if (!pmr->to_be_removed) update_pending_request (pmr, period); } - /* *INDENT-ON* */ remove_dead_pending_map_requests (lcm); diff --git a/src/plugins/lisp/lisp-cp/gid_dictionary.c b/src/plugins/lisp/lisp-cp/gid_dictionary.c index a0cc9c09e3c..995678ceadc 100644 --- a/src/plugins/lisp/lisp-cp/gid_dictionary.c +++ b/src/plugins/lisp/lisp-cp/gid_dictionary.c @@ -488,13 +488,11 @@ ip4_compute_prefix_lengths_in_search_order (gid_ip4_table_t * db) vec_reset_length (db->ip4_prefix_lengths_in_search_order); /* Note: bitmap reversed so this is in fact a longest prefix match */ - /* *INDENT-OFF* */ clib_bitmap_foreach (i, db->ip4_non_empty_dst_address_length_bitmap) { int dst_address_length = 32 - i; vec_add1 (db->ip4_prefix_lengths_in_search_order, dst_address_length); } - /* *INDENT-ON* */ } @@ -671,13 +669,11 @@ ip6_compute_prefix_lengths_in_search_order (gid_ip6_table_t * db) vec_reset_length (db->ip6_prefix_lengths_in_search_order); /* Note: bitmap reversed so this is in fact a longest prefix match */ - /* *INDENT-OFF* */ clib_bitmap_foreach (i, db->ip6_non_empty_dst_address_length_bitmap) { int dst_address_length = 128 - i; vec_add1 (db->ip6_prefix_lengths_in_search_order, dst_address_length); } - /* *INDENT-ON* */ } static u32 diff --git a/src/plugins/lisp/lisp-cp/lisp_api.c b/src/plugins/lisp/lisp-cp/lisp_api.c index d8f889a24fa..37267635d85 100644 --- a/src/plugins/lisp/lisp-cp/lisp_api.c +++ b/src/plugins/lisp/lisp-cp/lisp_api.c @@ -109,12 +109,10 @@ vl_api_lisp_add_del_locator_set_t_handler (vl_api_lisp_add_del_locator_set_t * vec_free (locator_name); vec_free (a->locators); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_LISP_ADD_DEL_LOCATOR_SET_REPLY, ({ rmp->ls_index = clib_host_to_net_u32 (ls_index); })); - /* *INDENT-ON* */ } static void @@ -287,12 +285,10 @@ static void int rv = 0; vl_api_show_lisp_map_request_mode_reply_t *rmp; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_SHOW_LISP_MAP_REQUEST_MODE_REPLY, ({ rmp->is_src_dst = vnet_lisp_get_map_request_mode (); })); - /* *INDENT-ON* */ } static void @@ -362,13 +358,11 @@ vl_api_show_lisp_use_petr_t_handler (vl_api_show_lisp_use_petr_t * mp) } } - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SHOW_LISP_USE_PETR_REPLY, { rmp->is_petr_enable = status; ip_address_encode2 (&gid_address_ip (&addr), &rmp->ip_address); }); - /* *INDENT-ON* */ } static void @@ -589,7 +583,6 @@ vl_api_lisp_locator_set_dump_t_handler (vl_api_lisp_locator_set_dump_t * mp) return; filter = mp->filter; - /* *INDENT-OFF* */ pool_foreach (lsit, lcm->locator_set_pool) { if (filter && !((1 == filter && lsit->local) || @@ -600,7 +593,6 @@ vl_api_lisp_locator_set_dump_t_handler (vl_api_lisp_locator_set_dump_t * mp) send_lisp_locator_set_details (lcm, lsit, reg, mp->context, lsit - lcm->locator_set_pool); } - /* *INDENT-ON* */ } static void @@ -703,13 +695,11 @@ vl_api_lisp_eid_table_dump_t_handler (vl_api_lisp_eid_table_dump_t * mp) } else { - /* *INDENT-OFF* */ pool_foreach (mapit, lcm->mapping_pool) { send_lisp_eid_table_details(mapit, reg, mp->context, mp->filter); } - /* *INDENT-ON* */ } } @@ -820,12 +810,10 @@ vl_api_lisp_eid_table_map_dump_t_handler (vl_api_lisp_eid_table_map_dump_t * vni_table = lcm->table_id_by_vni; } - /* *INDENT-OFF* */ hash_foreach_pair (p, vni_table, ({ send_eid_table_map_pair (p, reg, mp->context); })); - /* *INDENT-ON* */ } static void @@ -868,12 +856,10 @@ static void vl_api_show_lisp_rloc_probe_state_reply_t *rmp = 0; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SHOW_LISP_RLOC_PROBE_STATE_REPLY, { rmp->is_enabled = vnet_lisp_rloc_probe_state_get (); }); - /* *INDENT-ON* */ } static void @@ -883,12 +869,10 @@ static void vl_api_show_lisp_map_register_state_reply_t *rmp = 0; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SHOW_LISP_MAP_REGISTER_STATE_REPLY, { rmp->is_enabled = vnet_lisp_map_register_state_get (); }); - /* *INDENT-ON* */ } static void @@ -903,13 +887,11 @@ vl_api_lisp_adjacencies_get_t_handler (vl_api_lisp_adjacencies_get_t * mp) adjs = vnet_lisp_adjacencies_get_by_vni (vni); size = vec_len (adjs) * sizeof (vl_api_lisp_adjacency_t); - /* *INDENT-OFF* */ REPLY_MACRO4 (VL_API_LISP_ADJACENCIES_GET_REPLY, size, { rmp->count = clib_host_to_net_u32 (vec_len (adjs)); lisp_adjacency_copy (rmp->adjacencies, adjs); }); - /* *INDENT-ON* */ vec_free (adjs); } @@ -927,7 +909,6 @@ vl_api_lisp_eid_table_vni_dump_t_handler (vl_api_lisp_eid_table_vni_dump_t * if (!reg) return; - /* *INDENT-OFF* */ hash_foreach_pair (p, lcm->table_id_by_vni, ({ hash_set (vnis, p->key, 0); @@ -942,7 +923,6 @@ vl_api_lisp_eid_table_vni_dump_t_handler (vl_api_lisp_eid_table_vni_dump_t * ({ send_eid_table_vni (p->key, reg, mp->context); })); - /* *INDENT-ON* */ hash_free (vnis); } @@ -953,13 +933,11 @@ vl_api_show_lisp_status_t_handler (vl_api_show_lisp_status_t * mp) vl_api_show_lisp_status_reply_t *rmp = NULL; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_SHOW_LISP_STATUS_REPLY, ({ rmp->is_gpe_enabled = vnet_lisp_gpe_enable_disable_status (); rmp->is_lisp_enabled = vnet_lisp_enable_disable_status (); })); - /* *INDENT-ON* */ } static void @@ -983,13 +961,11 @@ static void tmp_str = format (0, "%s", loc_set->name); } - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_LISP_GET_MAP_REQUEST_ITR_RLOCS_REPLY, ({ strncpy((char *) rmp->locator_set_name, (char *) tmp_str, ARRAY_LEN(rmp->locator_set_name) - 1); })); - /* *INDENT-ON* */ vec_free (tmp_str); } @@ -1027,14 +1003,12 @@ vl_api_show_lisp_pitr_t_handler (vl_api_show_lisp_pitr_t * mp) } vec_add1 (tmp_str, 0); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_SHOW_LISP_PITR_REPLY, ({ rmp->is_enabled = lcm->flags & LISP_FLAG_PITR_MODE; strncpy((char *) rmp->locator_set_name, (char *) tmp_str, ARRAY_LEN(rmp->locator_set_name) - 1); })); - /* *INDENT-ON* */ } /* diff --git a/src/plugins/lisp/lisp-cp/lisp_cli.c b/src/plugins/lisp/lisp-cp/lisp_cli.c index 569d695b033..6c15898216d 100644 --- a/src/plugins/lisp/lisp-cp/lisp_cli.c +++ b/src/plugins/lisp/lisp-cp/lisp_cli.c @@ -64,13 +64,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_show_adjacencies_command) = { .path = "show lisp adjacencies", .short_help = "show lisp adjacencies", .function = lisp_show_adjacencies_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_add_del_map_server_command_fn (vlib_main_t * vm, @@ -120,13 +118,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_add_del_map_server_command) = { .path = "lisp map-server", .short_help = "lisp map-server add|del <ip>", .function = lisp_add_del_map_server_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -227,14 +223,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_add_del_local_eid_command) = { .path = "lisp eid-table", .short_help = "lisp eid-table add/del [vni <vni>] eid <eid> " "locator-set <locator-set> [key <secret-key> key-id sha1|sha256 ]", .function = lisp_add_del_local_eid_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_eid_table_map_command_fn (vlib_main_t * vm, @@ -274,13 +268,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_eid_table_map_command) = { .path = "lisp eid-table map", .short_help = "lisp eid-table map [del] vni <vni> vrf <vrf> | bd <bdi>", .function = lisp_eid_table_map_command_fn, }; -/* *INDENT-ON* */ /** * Handler for add/del remote mapping CLI. @@ -418,7 +410,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_add_del_remote_mapping_command) = { .path = "lisp remote-mapping", .short_help = "lisp remote-mapping add|del [del-all] vni <vni> " @@ -427,7 +418,6 @@ VLIB_CLI_COMMAND (lisp_add_del_remote_mapping_command) = { "w <weight> [rloc <dst-locator> ... ]", .function = lisp_add_del_remote_mapping_command_fn, }; -/* *INDENT-ON* */ /** * Handler for add/del adjacency CLI. @@ -525,14 +515,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_add_del_adjacency_command) = { .path = "lisp adjacency", .short_help = "lisp adjacency add|del vni <vni> reid <remote-eid> " "leid <local-eid>", .function = lisp_add_del_adjacency_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -575,13 +563,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_map_request_mode_command) = { .path = "lisp map-request mode", .short_help = "lisp map-request mode dst-only|src-dst", .function = lisp_map_request_mode_command_fn, }; -/* *INDENT-ON* */ static u8 * @@ -609,13 +595,11 @@ lisp_show_map_request_mode_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_show_map_request_mode_command) = { .path = "show lisp map-request mode", .short_help = "show lisp map-request mode", .function = lisp_show_map_request_mode_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_map_resolvers_command_fn (vlib_main_t * vm, @@ -632,13 +616,11 @@ lisp_show_map_resolvers_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_show_map_resolvers_command) = { .path = "show lisp map-resolvers", .short_help = "show lisp map-resolvers", .function = lisp_show_map_resolvers_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -691,13 +673,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_pitr_set_locator_set_command) = { .path = "lisp pitr", .short_help = "lisp pitr [disable] ls <locator-set-name>", .function = lisp_pitr_set_locator_set_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_pitr_command_fn (vlib_main_t * vm, @@ -744,13 +724,11 @@ lisp_show_pitr_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_show_pitr_command) = { .path = "show lisp pitr", .short_help = "Show pitr", .function = lisp_show_pitr_command_fn, }; -/* *INDENT-ON* */ static u8 * format_eid_entry (u8 * s, va_list * args) @@ -840,7 +818,6 @@ lisp_show_eid_table_command_fn (vlib_main_t * vm, if (print_all) { - /* *INDENT-OFF* */ pool_foreach (mapit, lcm->mapping_pool) { if (mapit->pitr_set) @@ -856,7 +833,6 @@ lisp_show_eid_table_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%U", format_eid_entry, lcm->vnet_main, lcm, mapit, ls); } - /* *INDENT-ON* */ } else { @@ -884,13 +860,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_cp_show_eid_table_command) = { .path = "show lisp eid-table", .short_help = "show lisp eid-table [local|remote|eid <eid>]", .function = lisp_show_eid_table_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -906,13 +880,11 @@ lisp_enable_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_cp_enable_command) = { .path = "lisp enable", .short_help = "lisp enable", .function = lisp_enable_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_disable_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -927,13 +899,11 @@ lisp_disable_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_cp_disable_command) = { .path = "lisp disable", .short_help = "lisp disable", .function = lisp_disable_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_map_register_enable_disable_command_fn (vlib_main_t * vm, @@ -980,13 +950,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_map_register_enable_disable_command) = { .path = "lisp map-register", .short_help = "lisp map-register [enable|disable]", .function = lisp_map_register_enable_disable_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_rloc_probe_enable_disable_command_fn (vlib_main_t * vm, @@ -1033,13 +1001,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_rloc_probe_enable_disable_command) = { .path = "lisp rloc-probe", .short_help = "lisp rloc-probe [enable|disable]", .function = lisp_rloc_probe_enable_disable_command_fn, }; -/* *INDENT-ON* */ static u8 * format_lisp_status (u8 * s, va_list * args) @@ -1060,13 +1026,11 @@ lisp_show_status_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_show_status_command) = { .path = "show lisp status", .short_help = "show lisp status", .function = lisp_show_status_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_eid_table_map_command_fn (vlib_main_t * vm, @@ -1112,12 +1076,10 @@ lisp_show_eid_table_map_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%=10s%=10s", "VNI", is_l2 ? "BD" : "VRF"); - /* *INDENT-OFF* */ hash_foreach_pair (p, vni_table, ({ vlib_cli_output (vm, "%=10d%=10d", p->key, p->value[0]); })); - /* *INDENT-ON* */ done: unformat_free (line_input); @@ -1125,13 +1087,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_show_eid_table_map_command) = { .path = "show lisp eid-table map", .short_help = "show lisp eid-table map l2|l3", .function = lisp_show_eid_table_map_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -1201,14 +1161,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_cp_add_del_locator_set_command) = { .path = "lisp locator-set", .short_help = "lisp locator-set add/del <name> [iface <iface-name> " "p <priority> w <weight>]", .function = lisp_add_del_locator_set_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_add_del_locator_in_set_command_fn (vlib_main_t * vm, @@ -1277,14 +1235,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_cp_add_del_locator_in_set_command) = { .path = "lisp locator", .short_help = "lisp locator add/del locator-set <name> iface <iface-name> " "p <priority> w <weight>", .function = lisp_add_del_locator_in_set_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm, @@ -1299,7 +1255,6 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%s%=16s%=16s%=16s", "Locator-set", "Locator", "Priority", "Weight"); - /* *INDENT-OFF* */ pool_foreach (lsit, lcm->locator_set_pool) { u8 * msg = 0; @@ -1331,17 +1286,14 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%v", msg); vec_free (msg); } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_cp_show_locator_sets_command) = { .path = "show lisp locator-set", .short_help = "Shows locator-sets", .function = lisp_cp_show_locator_sets_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -1396,13 +1348,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_add_del_map_resolver_command) = { .path = "lisp map-resolver", .short_help = "lisp map-resolver add/del <ip_address>", .function = lisp_add_del_map_resolver_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -1451,13 +1401,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_add_del_map_request_command) = { .path = "lisp map-request itr-rlocs", .short_help = "lisp map-request itr-rlocs add/del <locator_set_name>", .function = lisp_add_del_mreq_itr_rlocs_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_mreq_itr_rlocs_command_fn (vlib_main_t * vm, @@ -1481,13 +1429,11 @@ lisp_show_mreq_itr_rlocs_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_show_map_request_command) = { .path = "show lisp map-request itr-rlocs", .short_help = "Shows map-request itr-rlocs", .function = lisp_show_mreq_itr_rlocs_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_use_petr_set_locator_set_command_fn (vlib_main_t * vm, @@ -1534,7 +1480,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_use_petr_set_locator_set_command) = { .path = "lisp use-petr", .short_help = "lisp use-petr [disable] <petr-ip>", @@ -1586,13 +1531,11 @@ lisp_show_petr_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_show_petr_command) = { .path = "show lisp petr", .short_help = "Show petr", .function = lisp_show_petr_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lisp/lisp-cp/lisp_cp_test.c b/src/plugins/lisp/lisp-cp/lisp_cp_test.c index 8657aae0bb1..a6c3ca92ce0 100644 --- a/src/plugins/lisp/lisp-cp/lisp_cp_test.c +++ b/src/plugins/lisp/lisp-cp/lisp_cp_test.c @@ -116,7 +116,6 @@ format_lisp_eid_vat (u8 * s, va_list * args) -/* *INDENT-OFF* */ /** Used for parsing LISP eids */ typedef struct lisp_eid_vat_t_ { @@ -130,7 +129,6 @@ typedef struct lisp_eid_vat_t_ /**< type of eid */ u8 type; } __clib_packed lisp_eid_vat_t; -/* *INDENT-ON* */ static uword unformat_lisp_eid_vat (unformat_input_t * input, va_list * args) diff --git a/src/plugins/lisp/lisp-cp/lisp_types.h b/src/plugins/lisp/lisp-cp/lisp_types.h index 324320b4758..21bd72178d7 100644 --- a/src/plugins/lisp/lisp-cp/lisp_types.h +++ b/src/plugins/lisp/lisp-cp/lisp_types.h @@ -238,7 +238,6 @@ void gid_address_ip_set (gid_address_t * dst, void *src, u8 version); _(nsh) \ _(sd) -/* *INDENT-OFF* */ #define _(_n) \ u16 _n ## _size_to_write (void * pref); \ u16 _n ## _write (u8 * p, void * pref); \ @@ -248,7 +247,6 @@ void _n ## _copy (void * dst , void * src); foreach_gid_address_type_fcns #undef _ -/* *INDENT-ON* */ always_inline u64 mac_to_u64 (u8 * m) diff --git a/src/plugins/lisp/lisp-cp/one_api.c b/src/plugins/lisp/lisp-cp/one_api.c index c88c45e1712..b5b523433f2 100644 --- a/src/plugins/lisp/lisp-cp/one_api.c +++ b/src/plugins/lisp/lisp-cp/one_api.c @@ -160,12 +160,10 @@ static void int rv = 0; u32 ttl = vnet_lisp_map_register_get_ttl (); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SHOW_ONE_MAP_REGISTER_TTL_REPLY, ({ rmp->ttl = clib_host_to_net_u32 (ttl); })); - /* *INDENT-ON* */ } static void @@ -212,12 +210,10 @@ vl_api_one_add_del_locator_set_t_handler (vl_api_one_add_del_locator_set_t * vec_free (locator_name); vec_free (a->locators); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_ONE_ADD_DEL_LOCATOR_SET_REPLY, ({ rmp->ls_index = clib_host_to_net_u32 (ls_index); })); - /* *INDENT-ON* */ } static void @@ -466,12 +462,10 @@ static void int rv = 0; vl_api_show_one_map_request_mode_reply_t *rmp; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_SHOW_ONE_MAP_REQUEST_MODE_REPLY, ({ rmp->mode = vnet_lisp_get_map_request_mode (); })); - /* *INDENT-ON* */ } static void @@ -559,7 +553,6 @@ vl_api_show_one_use_petr_t_handler (vl_api_show_one_use_petr_t * mp) } } - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SHOW_ONE_USE_PETR_REPLY, { rmp->status = status; @@ -567,7 +560,6 @@ vl_api_show_one_use_petr_t_handler (vl_api_show_one_use_petr_t * mp) ip_address_encode2 (ip, &rmp->ip_address); }); - /* *INDENT-ON* */ } static void @@ -789,7 +781,6 @@ vl_api_one_locator_set_dump_t_handler (vl_api_one_locator_set_dump_t * mp) return; filter = mp->filter; - /* *INDENT-OFF* */ pool_foreach (lsit, lcm->locator_set_pool) { if (filter && !((1 == filter && lsit->local) || @@ -800,7 +791,6 @@ vl_api_one_locator_set_dump_t_handler (vl_api_one_locator_set_dump_t * mp) send_one_locator_set_details (lcm, lsit, reg, mp->context, lsit - lcm->locator_set_pool); } - /* *INDENT-ON* */ } static void @@ -919,13 +909,11 @@ vl_api_one_eid_table_dump_t_handler (vl_api_one_eid_table_dump_t * mp) } else { - /* *INDENT-OFF* */ pool_foreach (mapit, lcm->mapping_pool) { send_one_eid_table_details(mapit, reg, mp->context, mp->filter); } - /* *INDENT-ON* */ } } @@ -1034,12 +1022,10 @@ vl_api_one_eid_table_map_dump_t_handler (vl_api_one_eid_table_map_dump_t * mp) vni_table = lcm->table_id_by_vni; } - /* *INDENT-OFF* */ hash_foreach_pair (p, vni_table, ({ send_eid_table_map_pair (p, reg, mp->context); })); - /* *INDENT-ON* */ } static void @@ -1112,12 +1098,10 @@ static void vl_api_show_one_rloc_probe_state_reply_t *rmp = 0; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SHOW_ONE_RLOC_PROBE_STATE_REPLY, { rmp->is_enable = vnet_lisp_rloc_probe_state_get (); }); - /* *INDENT-ON* */ } static void @@ -1127,12 +1111,10 @@ static void vl_api_show_one_map_register_state_reply_t *rmp = 0; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SHOW_ONE_MAP_REGISTER_STATE_REPLY, { rmp->is_enable = vnet_lisp_map_register_state_get (); }); - /* *INDENT-ON* */ } static void @@ -1147,13 +1129,11 @@ vl_api_one_adjacencies_get_t_handler (vl_api_one_adjacencies_get_t * mp) adjs = vnet_lisp_adjacencies_get_by_vni (vni); size = vec_len (adjs) * sizeof (vl_api_one_adjacency_t); - /* *INDENT-OFF* */ REPLY_MACRO4 (VL_API_ONE_ADJACENCIES_GET_REPLY, size, { rmp->count = clib_host_to_net_u32 (vec_len (adjs)); one_adjacency_copy (rmp->adjacencies, adjs); }); - /* *INDENT-ON* */ vec_free (adjs); } @@ -1170,7 +1150,6 @@ vl_api_one_eid_table_vni_dump_t_handler (vl_api_one_eid_table_vni_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ hash_foreach_pair (p, lcm->table_id_by_vni, ({ hash_set (vnis, p->key, 0); @@ -1185,7 +1164,6 @@ vl_api_one_eid_table_vni_dump_t_handler (vl_api_one_eid_table_vni_dump_t * mp) ({ send_eid_table_vni (p->key, reg, mp->context); })); - /* *INDENT-ON* */ hash_free (vnis); } @@ -1196,13 +1174,11 @@ vl_api_show_one_status_t_handler (vl_api_show_one_status_t * mp) vl_api_show_one_status_reply_t *rmp = NULL; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_SHOW_ONE_STATUS_REPLY, ({ rmp->gpe_status = vnet_lisp_gpe_enable_disable_status (); rmp->feature_status = vnet_lisp_enable_disable_status (); })); - /* *INDENT-ON* */ } static void @@ -1226,13 +1202,11 @@ static void tmp_str = format (0, "%s", loc_set->name); } - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_ONE_GET_MAP_REQUEST_ITR_RLOCS_REPLY, ({ strncpy((char *) rmp->locator_set_name, (char *) tmp_str, ARRAY_LEN(rmp->locator_set_name) - 1); })); - /* *INDENT-ON* */ vec_free (tmp_str); } @@ -1269,14 +1243,12 @@ vl_api_show_one_nsh_mapping_t_handler (vl_api_show_one_nsh_mapping_t * mp) } vec_add1 (tmp_str, 0); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_SHOW_ONE_NSH_MAPPING_REPLY, ({ rmp->is_set = is_set; strncpy((char *) rmp->locator_set_name, (char *) tmp_str, ARRAY_LEN(rmp->locator_set_name) - 1); })); - /* *INDENT-ON* */ } static void @@ -1312,14 +1284,12 @@ vl_api_show_one_pitr_t_handler (vl_api_show_one_pitr_t * mp) } vec_add1 (tmp_str, 0); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_SHOW_ONE_PITR_REPLY, ({ rmp->status = lcm->flags & LISP_FLAG_PITR_MODE; strncpy((char *) rmp->locator_set_name, (char *) tmp_str, ARRAY_LEN(rmp->locator_set_name) - 1); })); - /* *INDENT-ON* */ } static void @@ -1329,12 +1299,10 @@ static void vl_api_show_one_stats_enable_disable_reply_t *rmp = NULL; vnet_api_error_t rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SHOW_ONE_STATS_ENABLE_DISABLE_REPLY, ({ rmp->is_enable = vnet_lisp_stats_enable_disable_state (); })); - /* *INDENT-ON* */ } static void @@ -1366,7 +1334,6 @@ vl_api_one_stats_dump_t_handler (vl_api_one_stats_dump_t * mp) stats = vnet_lisp_get_stats (); vec_foreach (stat, stats) { - /* *INDENT-OFF* */ REPLY_DETAILS (VL_API_ONE_STATS_DETAILS, ({ fid_to_api_eid (&stat->deid, &rmp->deid); @@ -1379,7 +1346,6 @@ vl_api_one_stats_dump_t_handler (vl_api_one_stats_dump_t * mp) rmp->pkt_count = clib_host_to_net_u32 (stat->counters.packets); rmp->bytes = clib_host_to_net_u32 (stat->counters.bytes); })); - /* *INDENT-ON* */ } } @@ -1439,7 +1405,6 @@ vl_api_one_ndp_bd_get_t_handler (vl_api_one_ndp_bd_get_t * mp) u32 *bds = vnet_lisp_ndp_bds_get (); u32 size = hash_elts (bds) * sizeof (u32); - /* *INDENT-OFF* */ REPLY_MACRO4 (VL_API_ONE_NDP_BD_GET_REPLY, size, { rmp->count = clib_host_to_net_u32 (hash_elts (bds)); @@ -1448,7 +1413,6 @@ vl_api_one_ndp_bd_get_t_handler (vl_api_one_ndp_bd_get_t * mp) rmp->bridge_domains[i++] = clib_host_to_net_u32 (p->key); })); }); - /* *INDENT-ON* */ hash_free (bds); } @@ -1464,7 +1428,6 @@ vl_api_one_l2_arp_bd_get_t_handler (vl_api_one_l2_arp_bd_get_t * mp) u32 *bds = vnet_lisp_l2_arp_bds_get (); u32 size = hash_elts (bds) * sizeof (u32); - /* *INDENT-OFF* */ REPLY_MACRO4 (VL_API_ONE_L2_ARP_BD_GET_REPLY, size, { rmp->count = clib_host_to_net_u32 (hash_elts (bds)); @@ -1473,7 +1436,6 @@ vl_api_one_l2_arp_bd_get_t_handler (vl_api_one_l2_arp_bd_get_t * mp) rmp->bridge_domains[i++] = clib_host_to_net_u32 (p->key); })); }); - /* *INDENT-ON* */ hash_free (bds); } @@ -1491,7 +1453,6 @@ vl_api_one_l2_arp_entries_get_t_handler (vl_api_one_l2_arp_entries_get_t * mp) entries = vnet_lisp_l2_arp_entries_get_by_bd (bd); u32 size = vec_len (entries) * sizeof (vl_api_one_l2_arp_entry_t); - /* *INDENT-OFF* */ REPLY_MACRO4 (VL_API_ONE_L2_ARP_ENTRIES_GET_REPLY, size, { rmp->count = clib_host_to_net_u32 (vec_len (entries)); @@ -1502,7 +1463,6 @@ vl_api_one_l2_arp_entries_get_t_handler (vl_api_one_l2_arp_entries_get_t * mp) i++; } }); - /* *INDENT-ON* */ vec_free (entries); } @@ -1528,12 +1488,10 @@ static void u32 value = vnet_lisp_map_register_fallback_threshold_get (); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SHOW_ONE_MAP_REGISTER_FALLBACK_THRESHOLD_REPLY, ({ rmp->value = clib_host_to_net_u32 (value); })); - /* *INDENT-ON* */ } static void @@ -1556,12 +1514,10 @@ static void int rv = 0; u8 proto = (u8) vnet_lisp_get_transport_protocol (); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_ONE_GET_TRANSPORT_PROTOCOL_REPLY, ({ rmp->protocol = proto; })); - /* *INDENT-ON* */ } static void @@ -1577,7 +1533,6 @@ vl_api_one_ndp_entries_get_t_handler (vl_api_one_ndp_entries_get_t * mp) entries = vnet_lisp_ndp_entries_get_by_bd (bd); u32 size = vec_len (entries) * sizeof (vl_api_one_ndp_entry_t); - /* *INDENT-OFF* */ REPLY_MACRO4 (VL_API_ONE_NDP_ENTRIES_GET_REPLY, size, { rmp->count = clib_host_to_net_u32 (vec_len (entries)); @@ -1588,7 +1543,6 @@ vl_api_one_ndp_entries_get_t_handler (vl_api_one_ndp_entries_get_t * mp) i++; } }); - /* *INDENT-ON* */ vec_free (entries); } @@ -1609,12 +1563,10 @@ vl_api_one_show_xtr_mode_t_handler (vl_api_one_show_xtr_mode_t * mp) vl_api_one_show_xtr_mode_reply_t *rmp = 0; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_ONE_SHOW_XTR_MODE_REPLY, { rmp->is_enable = vnet_lisp_get_xtr_mode (); }); - /* *INDENT-ON* */ } static void @@ -1633,12 +1585,10 @@ vl_api_one_show_pitr_mode_t_handler (vl_api_one_show_pitr_mode_t * mp) vl_api_one_show_pitr_mode_reply_t *rmp = 0; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_ONE_SHOW_PITR_MODE_REPLY, { rmp->is_enable = vnet_lisp_get_pitr_mode (); }); - /* *INDENT-ON* */ } static void @@ -1657,12 +1607,10 @@ vl_api_one_show_petr_mode_t_handler (vl_api_one_show_petr_mode_t * mp) vl_api_one_show_petr_mode_reply_t *rmp = 0; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_ONE_SHOW_PETR_MODE_REPLY, { rmp->is_enable = vnet_lisp_get_petr_mode (); }); - /* *INDENT-ON* */ } /* @@ -1687,12 +1635,10 @@ VLIB_API_INIT_FUNCTION (one_api_hookup); #include <vlib/unix/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Locator ID Separation Protocol (LISP)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lisp/lisp-cp/one_cli.c b/src/plugins/lisp/lisp-cp/one_cli.c index b85fea16ea7..8658d5fafd7 100644 --- a/src/plugins/lisp/lisp-cp/one_cli.c +++ b/src/plugins/lisp/lisp-cp/one_cli.c @@ -62,13 +62,11 @@ lisp_show_adjacencies_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_adjacencies_command) = { .path = "show one adjacencies", .short_help = "show one adjacencies", .function = lisp_show_adjacencies_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_add_del_map_server_command_fn (vlib_main_t * vm, @@ -116,13 +114,11 @@ lisp_add_del_map_server_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_add_del_map_server_command) = { .path = "one map-server", .short_help = "one map-server add|del <ip>", .function = lisp_add_del_map_server_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -224,14 +220,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_add_del_local_eid_command) = { .path = "one eid-table", .short_help = "one eid-table add/del [vni <vni>] eid <eid> " "locator-set <locator-set> [key <secret-key> key-id sha1|sha256 ]", .function = lisp_add_del_local_eid_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_eid_table_map_command_fn (vlib_main_t * vm, @@ -271,13 +265,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_eid_table_map_command) = { .path = "one eid-table map", .short_help = "one eid-table map [del] vni <vni> vrf <vrf> | bd <bdi>", .function = lisp_eid_table_map_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_add_del_ndp_entry_command_fn (vlib_main_t * vm, @@ -335,13 +327,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_add_del_ndp_entry_command) = { .path = "one ndp", .short_help = "one ndp [del] bd <bd> mac <mac> ip <ipv6>", .function = lisp_add_del_ndp_entry_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_add_del_l2_arp_entry_command_fn (vlib_main_t * vm, @@ -399,13 +389,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_add_del_l2_arp_entry_command) = { .path = "one l2 arp", .short_help = "one l2 arp [del] bd <bd> mac <mac> ip <ipv4>", .function = lisp_add_del_l2_arp_entry_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_l2_arp_entries_command_fn (vlib_main_t * vm, @@ -416,7 +404,6 @@ lisp_show_l2_arp_entries_command_fn (vlib_main_t * vm, lisp_api_l2_arp_entry_t *entries, *e; hash_pair_t *p; - /* *INDENT-OFF* */ hash_foreach_pair (p, ht, ({ entries = vnet_lisp_l2_arp_entries_get_by_bd (p->key); @@ -429,19 +416,16 @@ lisp_show_l2_arp_entries_command_fn (vlib_main_t * vm, } vec_free (entries); })); - /* *INDENT-ON* */ hash_free (ht); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_l2_arp_entries_command) = { .path = "show one l2 arp entries", .short_help = "Show ONE L2 ARP entries", .function = lisp_show_l2_arp_entries_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_ndp_entries_command_fn (vlib_main_t * vm, @@ -452,7 +436,6 @@ lisp_show_ndp_entries_command_fn (vlib_main_t * vm, lisp_api_ndp_entry_t *entries, *e; hash_pair_t *p; - /* *INDENT-OFF* */ hash_foreach_pair (p, ht, ({ entries = vnet_lisp_ndp_entries_get_by_bd (p->key); @@ -465,19 +448,16 @@ lisp_show_ndp_entries_command_fn (vlib_main_t * vm, } vec_free (entries); })); - /* *INDENT-ON* */ hash_free (ht); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_ndp_entries_command) = { .path = "show one ndp entries", .short_help = "Show ONE NDP entries", .function = lisp_show_ndp_entries_command_fn, }; -/* *INDENT-ON* */ /** * Handler for add/del remote mapping CLI. @@ -613,7 +593,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_add_del_remote_mapping_command) = { .path = "one remote-mapping", .short_help = @@ -623,7 +602,6 @@ VLIB_CLI_COMMAND (one_add_del_remote_mapping_command) = { "[rloc <dst-locator> ... ]", .function = lisp_add_del_remote_mapping_command_fn, }; -/* *INDENT-ON* */ /** * Handler for add/del adjacency CLI. @@ -721,14 +699,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_add_del_adjacency_command) = { .path = "one adjacency", .short_help = "one adjacency add|del vni <vni> reid <remote-eid> " "leid <local-eid>", .function = lisp_add_del_adjacency_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -770,13 +746,11 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_map_request_mode_command) = { .path = "one map-request mode", .short_help = "one map-request mode dst-only|src-dst", .function = lisp_map_request_mode_command_fn, }; -/* *INDENT-ON* */ static u8 * @@ -804,13 +778,11 @@ lisp_show_map_request_mode_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_map_request_mode_command) = { .path = "show one map-request mode", .short_help = "show one map-request mode", .function = lisp_show_map_request_mode_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_map_resolvers_command_fn (vlib_main_t * vm, @@ -827,13 +799,11 @@ lisp_show_map_resolvers_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_map_resolvers_command) = { .path = "show one map-resolvers", .short_help = "show one map-resolvers", .function = lisp_show_map_resolvers_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_nsh_set_locator_set_command_fn (vlib_main_t * vm, @@ -884,13 +854,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_nsh_set_locator_set_command) = { .path = "one nsh-mapping", .short_help = "one nsh-mapping [del] ls <locator-set-name>", .function = lisp_nsh_set_locator_set_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_map_register_fallback_threshold_show_command_fn (vlib_main_t * vm, @@ -904,14 +872,12 @@ lisp_map_register_fallback_threshold_show_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_map_register_fallback_threshold_show_command) = { .path = "show one map-register fallback-threshold", .short_help = "show one map-register fallback-threshold", .function = lisp_map_register_fallback_threshold_show_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_map_register_fallback_threshold_command_fn (vlib_main_t * vm, @@ -949,13 +915,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_map_register_fallback_threshold_command) = { .path = "one map-register fallback-threshold", .short_help = "one map-register fallback-threshold <count>", .function = lisp_map_register_fallback_threshold_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_pitr_set_locator_set_command_fn (vlib_main_t * vm, @@ -1006,13 +970,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_pitr_set_locator_set_command) = { .path = "one pitr", .short_help = "one pitr [disable] ls <locator-set-name>", .function = lisp_pitr_set_locator_set_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_pitr_command_fn (vlib_main_t * vm, @@ -1059,13 +1021,11 @@ lisp_show_pitr_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_pitr_command) = { .path = "show one pitr", .short_help = "Show pitr", .function = lisp_show_pitr_command_fn, }; -/* *INDENT-ON* */ static u8 * format_eid_entry (u8 * s, va_list * args) @@ -1156,7 +1116,6 @@ lisp_show_eid_table_command_fn (vlib_main_t * vm, if (print_all) { - /* *INDENT-OFF* */ pool_foreach (mapit, lcm->mapping_pool) { if (mapit->pitr_set || mapit->nsh_set) @@ -1172,7 +1131,6 @@ lisp_show_eid_table_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%U", format_eid_entry, lcm->vnet_main, lcm, mapit, ls); } - /* *INDENT-ON* */ } else { @@ -1200,13 +1158,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_show_eid_table_command) = { .path = "show one eid-table", .short_help = "show one eid-table [local|remote|eid <eid>]", .function = lisp_show_eid_table_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_enable_disable_pitr_mode_command_fn (vlib_main_t * vm, @@ -1253,13 +1209,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_enable_disable_pitr_mode_command) = { .path = "one pitr mode", .short_help = "one pitr mode [enable|disable]", .function = lisp_enable_disable_pitr_mode_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -1307,13 +1261,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_enable_disable_petr_mode_command) = { .path = "one petr mode", .short_help = "one petr mode [enable|disable]", .function = lisp_enable_disable_petr_mode_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_enable_disable_xtr_mode_command_fn (vlib_main_t * vm, @@ -1360,13 +1312,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_enable_disable_xtr_mode_command) = { .path = "one xtr mode", .short_help = "one xtr mode [enable|disable]", .function = lisp_enable_disable_xtr_mode_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * one_enable_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -1381,13 +1331,11 @@ one_enable_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_enable_command) = { .path = "one enable", .short_help = "one enable", .function = one_enable_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * one_disable_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -1402,13 +1350,11 @@ one_disable_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_disable_command) = { .path = "one disable", .short_help = "one disable", .function = one_disable_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_map_register_set_ttl_command_fn (vlib_main_t * vm, @@ -1449,13 +1395,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_map_register_set_ttl_command) = { .path = "one map-register ttl", .short_help = "one map-register ttl", .function = lisp_map_register_set_ttl_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_map_register_show_ttl_command_fn (vlib_main_t * vm, @@ -1468,14 +1412,12 @@ lisp_map_register_show_ttl_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_map_register_show_ttl_command) = { .path = "show one map-register ttl", .short_help = "show one map-register ttl", .function = lisp_map_register_show_ttl_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_map_register_enable_disable_command_fn (vlib_main_t * vm, @@ -1522,13 +1464,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_map_register_enable_disable_command) = { .path = "one map-register", .short_help = "one map-register [enable|disable]", .function = lisp_map_register_enable_disable_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_rloc_probe_enable_disable_command_fn (vlib_main_t * vm, @@ -1575,13 +1515,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_rloc_probe_enable_disable_command) = { .path = "one rloc-probe", .short_help = "one rloc-probe [enable|disable]", .function = lisp_rloc_probe_enable_disable_command_fn, }; -/* *INDENT-ON* */ static u8 * format_lisp_status (u8 * s, va_list * args) @@ -1602,13 +1540,11 @@ lisp_show_status_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_status_command) = { .path = "show one status", .short_help = "show one status", .function = lisp_show_status_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_eid_table_map_command_fn (vlib_main_t * vm, @@ -1654,12 +1590,10 @@ lisp_show_eid_table_map_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%=10s%=10s", "VNI", is_l2 ? "BD" : "VRF"); - /* *INDENT-OFF* */ hash_foreach_pair (p, vni_table, ({ vlib_cli_output (vm, "%=10d%=10d", p->key, p->value[0]); })); - /* *INDENT-ON* */ done: unformat_free (line_input); @@ -1667,13 +1601,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_eid_table_map_command) = { .path = "show one eid-table map", .short_help = "show one eid-table map l2|l3", .function = lisp_show_eid_table_map_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -1742,14 +1674,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_add_del_locator_set_command) = { .path = "one locator-set", .short_help = "one locator-set add/del <name> [iface <iface-name> " "p <priority> w <weight>]", .function = lisp_add_del_locator_set_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_add_del_locator_in_set_command_fn (vlib_main_t * vm, @@ -1818,14 +1748,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_add_del_locator_in_set_command) = { .path = "one locator", .short_help = "one locator add/del locator-set <name> iface <iface-name> " "p <priority> w <weight>", .function = lisp_add_del_locator_in_set_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm, @@ -1840,7 +1768,6 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%s%=16s%=16s%=16s", "Locator-set", "Locator", "Priority", "Weight"); - /* *INDENT-OFF* */ pool_foreach (lsit, lcm->locator_set_pool) { u8 * msg = 0; @@ -1872,17 +1799,14 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%v", msg); vec_free (msg); } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_show_locator_sets_command) = { .path = "show one locator-set", .short_help = "Shows locator-sets", .function = lisp_cp_show_locator_sets_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -1936,13 +1860,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_add_del_map_resolver_command) = { .path = "one map-resolver", .short_help = "one map-resolver add/del <ip_address>", .function = lisp_add_del_map_resolver_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -1991,13 +1913,11 @@ done: } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_add_del_map_request_command) = { .path = "one map-request itr-rlocs", .short_help = "one map-request itr-rlocs add/del <locator_set_name>", .function = lisp_add_del_mreq_itr_rlocs_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_mreq_itr_rlocs_command_fn (vlib_main_t * vm, @@ -2021,13 +1941,11 @@ lisp_show_mreq_itr_rlocs_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_map_request_command) = { .path = "show one map-request itr-rlocs", .short_help = "Shows map-request itr-rlocs", .function = lisp_show_mreq_itr_rlocs_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_use_petr_set_locator_set_command_fn (vlib_main_t * vm, @@ -2073,7 +1991,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_use_petr_set_locator_set_command) = { .path = "one use-petr", .short_help = "one use-petr [disable] <petr-ip>", @@ -2125,13 +2042,11 @@ lisp_show_petr_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_petr_command) = { .path = "show one petr", .short_help = "Show petr", .function = lisp_show_petr_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_map_servers_command_fn (vlib_main_t * vm, @@ -2148,13 +2063,11 @@ lisp_show_map_servers_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_map_servers_command) = { .path = "show one map-servers", .short_help = "show one map servers", .function = lisp_show_map_servers_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_map_register_state_command_fn (vlib_main_t * vm, @@ -2170,13 +2083,11 @@ lisp_show_map_register_state_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_map_register_state_command) = { .path = "show one map-register state", .short_help = "show one map-register state", .function = lisp_show_map_register_state_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_rloc_probe_state_command_fn (vlib_main_t * vm, @@ -2192,13 +2103,11 @@ lisp_show_rloc_probe_state_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_rloc_probe_state_command) = { .path = "show one rloc state", .short_help = "show one RLOC state", .function = lisp_show_rloc_probe_state_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_stats_command_fn (vlib_main_t * vm, @@ -2210,13 +2119,11 @@ lisp_show_stats_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_stats_command) = { .path = "show one statistics status", .short_help = "show ONE statistics enable/disable status", .function = lisp_show_stats_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_stats_details_command_fn (vlib_main_t * vm, @@ -2244,13 +2151,11 @@ lisp_show_stats_details_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_show_stats_details_command) = { .path = "show one statistics details", .short_help = "show ONE statistics", .function = lisp_show_stats_details_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_stats_enable_disable_command_fn (vlib_main_t * vm, @@ -2282,13 +2187,11 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_stats_enable_disable_command) = { .path = "one statistics", .short_help = "enable/disable ONE statistics collecting", .function = lisp_stats_enable_disable_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_stats_flush_command_fn (vlib_main_t * vm, @@ -2299,13 +2202,11 @@ lisp_stats_flush_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_stats_flush_command) = { .path = "one statistics flush", .short_help = "Flush ONE statistics", .function = lisp_stats_flush_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_show_one_modes_command_fn (vlib_main_t * vm, @@ -2323,13 +2224,11 @@ lisp_show_one_modes_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (one_cp_show_one_modes_modes_command) = { .path = "show one modes", .short_help = "show one modes", .function = lisp_show_one_modes_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lisp/lisp-cp/one_test.c b/src/plugins/lisp/lisp-cp/one_test.c index ad308b73c5e..475b52de15e 100644 --- a/src/plugins/lisp/lisp-cp/one_test.c +++ b/src/plugins/lisp/lisp-cp/one_test.c @@ -671,7 +671,6 @@ vl_api_show_one_pitr_reply_t_handler (vl_api_show_one_pitr_reply_t * mp) vam->result_ready = 1; } -/* *INDENT-OFF* */ /** Used for parsing LISP eids */ typedef CLIB_PACKED(struct{ union { @@ -682,7 +681,6 @@ typedef CLIB_PACKED(struct{ u32 len; /**< prefix length if IP */ u8 type; /**< type of eid */ }) lisp_eid_vat_t; -/* *INDENT-ON* */ static uword unformat_lisp_eid_vat (unformat_input_t * input, va_list * args) diff --git a/src/plugins/lisp/lisp-cp/packets.c b/src/plugins/lisp/lisp-cp/packets.c index 3f4292b4841..6c36a550ab4 100644 --- a/src/plugins/lisp/lisp-cp/packets.c +++ b/src/plugins/lisp/lisp-cp/packets.c @@ -217,7 +217,6 @@ pkt_push_ecm_hdr (vlib_buffer_t * b) return h; } -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lisp/lisp-cp/packets.h b/src/plugins/lisp/lisp-cp/packets.h index 68cd949e75d..c10fdb28c79 100644 --- a/src/plugins/lisp/lisp-cp/packets.h +++ b/src/plugins/lisp/lisp-cp/packets.h @@ -27,7 +27,6 @@ void *pkt_push_udp_and_ip (vlib_main_t * vm, vlib_buffer_t * b, u16 sp, void *pkt_push_ecm_hdr (vlib_buffer_t * b); -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lisp/lisp-gpe/decap.c b/src/plugins/lisp/lisp-gpe/decap.c index 59fd5646ee7..18e32675a32 100644 --- a/src/plugins/lisp/lisp-gpe/decap.c +++ b/src/plugins/lisp/lisp-gpe/decap.c @@ -456,7 +456,6 @@ static char *lisp_gpe_ip4_input_error_strings[] = { #undef lisp_gpe_error }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_gpe_ip4_input_node) = { .function = lisp_gpe_ip4_input, .name = "lisp-gpe-ip4-input", @@ -476,9 +475,7 @@ VLIB_REGISTER_NODE (lisp_gpe_ip4_input_node) = { .format_trace = format_lisp_gpe_rx_trace, // $$$$ .unformat_buffer = unformat_lisp_gpe_header, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_gpe_ip6_input_node) = { .function = lisp_gpe_ip6_input, .name = "lisp-gpe-ip6-input", @@ -498,7 +495,6 @@ VLIB_REGISTER_NODE (lisp_gpe_ip6_input_node) = { .format_trace = format_lisp_gpe_rx_trace, // $$$$ .unformat_buffer = unformat_lisp_gpe_header, }; -/* *INDENT-ON* */ /** * Adds arc from lisp-gpe-input to nsh-input if nsh-input is available @@ -556,7 +552,6 @@ static char *lisp_gpe_nsh_placeholder_error_strings[] = { "lisp gpe placeholder nsh decap", }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (lisp_gpe_nsh_placeholder_input_node) = { .function = lisp_gpe_nsh_placeholder_input, .name = "lisp-gpe-nsh-placeholder-input", @@ -571,7 +566,6 @@ VLIB_REGISTER_NODE (lisp_gpe_nsh_placeholder_input_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ static clib_error_t * lisp_add_placeholder_nsh_node_command_fn (vlib_main_t * vm, @@ -586,12 +580,10 @@ lisp_add_placeholder_nsh_node_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_add_placeholder_nsh_node_command, static) = { .path = "test one nsh add-placeholder-decap-node", .function = lisp_add_placeholder_nsh_node_command_fn, }; -/* *INDENT-ON* */ VLIB_INIT_FUNCTION (gpe_decap_init); diff --git a/src/plugins/lisp/lisp-gpe/interface.c b/src/plugins/lisp/lisp-gpe/interface.c index 05669ae975f..ed2b08f9aaf 100644 --- a/src/plugins/lisp/lisp-gpe/interface.c +++ b/src/plugins/lisp/lisp-gpe/interface.c @@ -158,12 +158,10 @@ format_lisp_gpe_name (u8 * s, va_list * args) return format (s, "lisp_gpe%d", dev_instance); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (lisp_gpe_device_class) = { .name = "LISP_GPE", .format_device_name = format_lisp_gpe_name, }; -/* *INDENT-ON* */ u8 * format_lisp_gpe_header_with_length (u8 * s, va_list * args) @@ -188,14 +186,12 @@ format_lisp_gpe_header_with_length (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (lisp_gpe_hw_class) = { .name = "LISP_GPE", .format_header = format_lisp_gpe_header_with_length, .build_rewrite = lisp_gpe_build_rewrite, .update_adjacency = lisp_gpe_update_adjacency, }; -/* *INDENT-ON* */ typedef struct @@ -300,14 +296,12 @@ format_l2_lisp_gpe_name (u8 * s, va_list * args) return format (s, "l2_lisp_gpe%d", dev_instance); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (l2_lisp_gpe_device_class,static) = { .name = "L2_LISP_GPE", .format_device_name = format_l2_lisp_gpe_name, .format_tx_trace = format_l2_lisp_gpe_tx_trace, .tx_function = l2_lisp_gpe_interface_tx, }; -/* *INDENT-ON* */ typedef struct { @@ -404,14 +398,12 @@ format_nsh_lisp_gpe_name (u8 * s, va_list * args) return format (s, "nsh_lisp_gpe%d", dev_instance); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (nsh_lisp_gpe_device_class,static) = { .name = "NSH_LISP_GPE", .format_device_name = format_nsh_lisp_gpe_name, .format_tx_trace = format_nsh_lisp_gpe_tx_trace, .tx_function = nsh_lisp_gpe_interface_tx, }; -/* *INDENT-ON* */ static vnet_hw_interface_t * lisp_gpe_create_iface (lisp_gpe_main_t * lgm, u32 vni, u32 dp_table, @@ -924,13 +916,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (add_del_lisp_gpe_iface_command, static) = { .path = "gpe iface", .short_help = "gpe iface add/del vni <vni> vrf <vrf>", .function = lisp_gpe_add_del_iface_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe.c b/src/plugins/lisp/lisp-gpe/lisp_gpe.c index 1ae3131323c..7474d0fb6a5 100644 --- a/src/plugins/lisp/lisp-gpe/lisp_gpe.c +++ b/src/plugins/lisp/lisp-gpe/lisp_gpe.c @@ -169,7 +169,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_gpe_add_del_fwd_entry_command, static) = { .path = "gpe entry", .short_help = "gpe entry add/del vni <vni> vrf/bd <id> [leid <leid>]" @@ -177,7 +176,6 @@ VLIB_CLI_COMMAND (lisp_gpe_add_del_fwd_entry_command, static) = { "[negative action <action>]", .function = lisp_gpe_add_del_fwd_entry_command_fn, }; -/* *INDENT-ON* */ /** Check if LISP-GPE is enabled. */ u8 @@ -271,13 +269,11 @@ gpe_set_encap_mode_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (gpe_set_encap_mode_command, static) = { .path = "gpe encap", .short_help = "gpe encap [lisp|vxlan]", .function = gpe_set_encap_mode_command_fn, }; -/* *INDENT-ON* */ /** Format GPE encap mode. */ u8 * @@ -307,13 +303,11 @@ gpe_show_encap_mode_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (gpe_show_encap_mode_command, static) = { .path = "show gpe encap", .short_help = "show GPE encapulation mode", .function = gpe_show_encap_mode_command_fn, }; -/* *INDENT-ON* */ /** CLI command to enable/disable LISP-GPE. */ static clib_error_t * @@ -352,13 +346,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (enable_disable_lisp_gpe_command, static) = { .path = "gpe", .short_help = "gpe [enable|disable]", .function = lisp_gpe_enable_disable_command_fn, }; -/* *INDENT-ON* */ /** CLI command to show LISP-GPE interfaces. */ static clib_error_t * @@ -371,31 +363,25 @@ lisp_show_iface_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%=10s%=12s", "vrf", "hw_if_index"); - /* *INDENT-OFF* */ hash_foreach_pair (p, lgm->l3_ifaces.hw_if_index_by_dp_table, ({ vlib_cli_output (vm, "%=10d%=10d", p->key, p->value[0]); })); - /* *INDENT-ON* */ if (0 != lgm->l2_ifaces.hw_if_index_by_dp_table) { vlib_cli_output (vm, "%=10s%=12s", "bd_id", "hw_if_index"); - /* *INDENT-OFF* */ hash_foreach_pair (p, lgm->l2_ifaces.hw_if_index_by_dp_table, ({ vlib_cli_output (vm, "%=10d%=10d", p->key, p->value[0]); })); - /* *INDENT-ON* */ } return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_show_iface_command) = { .path = "show gpe interface", .short_help = "show gpe interface", .function = lisp_show_iface_command_fn, }; -/* *INDENT-ON* */ /** CLI command to show GPE fwd native route path. */ static clib_error_t * @@ -428,13 +414,11 @@ gpe_show_native_fwd_rpath_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (gpe_show_native_fwd_rpath_command) = { .path = "show gpe native-forward", .short_help = "show gpe native-forward", .function = gpe_show_native_fwd_rpath_command_fn, }; -/* *INDENT-ON* */ void gpe_update_native_fwd_path (u8 ip_version) @@ -578,14 +562,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (gpe_native_forward_command) = { .path = "gpe native-forward", .short_help = "gpe native-forward [del] via <nh-ip-addr> [iface] " "[table <table>]", .function = gpe_native_forward_command_fn, }; -/* *INDENT-ON* */ /** Format LISP-GPE status. */ u8 * @@ -709,13 +691,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_test_nsh_command, static) = { .path = "test one nsh", .short_help = "test gpe nsh pcap <path-to-pcap-file>", .function = lisp_test_nsh_command_fn, }; -/* *INDENT-ON* */ VLIB_INIT_FUNCTION (lisp_gpe_init); diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe.h b/src/plugins/lisp/lisp-gpe/lisp_gpe.h index 10dc4fe7aa7..d7e877124a1 100644 --- a/src/plugins/lisp/lisp-gpe/lisp_gpe.h +++ b/src/plugins/lisp/lisp-gpe/lisp_gpe.h @@ -36,22 +36,18 @@ #include <vppinfra/bihash_template.h> /** IP4-UDP-LISP encap header */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip4_header_t ip4; /* 20 bytes */ udp_header_t udp; /* 8 bytes */ lisp_gpe_header_t lisp; /* 8 bytes */ }) ip4_udp_lisp_gpe_header_t; -/* *INDENT-ON* */ /** IP6-UDP-LISP encap header */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip6_header_t ip6; /* 40 bytes */ udp_header_t udp; /* 8 bytes */ lisp_gpe_header_t lisp; /* 8 bytes */ }) ip6_udp_lisp_gpe_header_t; -/* *INDENT-ON* */ #define foreach_lisp_gpe_ip_input_next \ _(DROP, "error-drop") \ diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c index 7c857b92575..562b3b5eafb 100644 --- a/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c +++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c @@ -557,7 +557,6 @@ lisp_gpe_adjacency_show (vlib_main_t * vm, } else { - /* *INDENT-OFF* */ pool_foreach (ladj, lisp_adj_pool) { vlib_cli_output (vm, "[%d] %U\n", @@ -565,19 +564,16 @@ lisp_gpe_adjacency_show (vlib_main_t * vm, format_lisp_gpe_adjacency, ladj, LISP_GPE_ADJ_FORMAT_FLAG_NONE); } - /* *INDENT-ON* */ } return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_lisp_gpe_tunnel_command, static) = { .path = "show gpe adjacency", .function = lisp_gpe_adjacency_show, }; -/* *INDENT-ON* */ #define LISP_ADJ_NBR_DEFAULT_HASH_NUM_BUCKETS (256) #define LISP_ADJ_NBR_DEFAULT_HASH_MEMORY_SIZE (1<<20) diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_api.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_api.c index df90ef54403..f77a6f4059f 100644 --- a/src/plugins/lisp/lisp-gpe/lisp_gpe_api.c +++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_api.c @@ -212,7 +212,6 @@ vl_api_gpe_fwd_entry_vnis_get_t_handler (vl_api_gpe_fwd_entry_vnis_get_t * mp) u32 *vnis = vnet_lisp_gpe_get_fwd_entry_vnis (); u32 size = hash_elts (vnis) * sizeof (u32); - /* *INDENT-OFF* */ REPLY_MACRO4 (VL_API_GPE_FWD_ENTRY_VNIS_GET_REPLY, size, { rmp->count = clib_host_to_net_u32 (hash_elts (vnis)); @@ -221,7 +220,6 @@ vl_api_gpe_fwd_entry_vnis_get_t_handler (vl_api_gpe_fwd_entry_vnis_get_t * mp) rmp->vnis[i++] = clib_host_to_net_u32 (p->key); })); }); - /* *INDENT-ON* */ hash_free (vnis); } @@ -239,14 +237,12 @@ vl_api_gpe_fwd_entries_get_t_handler (vl_api_gpe_fwd_entries_get_t * mp) e = vnet_lisp_gpe_fwd_entries_get_by_vni (mp->vni); size = vec_len (e) * sizeof (vl_api_gpe_fwd_entry_t); - /* *INDENT-OFF* */ REPLY_MACRO4 (VL_API_GPE_FWD_ENTRIES_GET_REPLY, size, { rmp->count = vec_len (e); gpe_fwd_entries_copy (rmp->entries, e); gpe_fwd_entries_get_reply_t_host_to_net (rmp); }); - /* *INDENT-ON* */ vec_free (e); } @@ -294,12 +290,10 @@ vl_api_gpe_add_del_fwd_entry_t_handler (vl_api_gpe_add_del_fwd_entry_t * mp) rv = vnet_lisp_gpe_add_del_fwd_entry (a, 0); vec_free (pairs); send_reply: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_GPE_ADD_DEL_FWD_ENTRY_REPLY, { rmp->fwd_entry_index = clib_host_to_net_u32 (a->fwd_entry_index); }); - /* *INDENT-ON* */ } static void @@ -365,12 +359,10 @@ vl_api_gpe_get_encap_mode_t_handler (vl_api_gpe_get_encap_mode_t * mp) vl_api_gpe_get_encap_mode_reply_t *rmp; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_GPE_GET_ENCAP_MODE_REPLY, ({ rmp->encap_mode = vnet_gpe_get_encap_mode (); })); - /* *INDENT-ON* */ } static void @@ -464,7 +456,6 @@ vl_api_gpe_native_fwd_rpaths_get_t_handler (vl_api_gpe_native_fwd_rpaths_get_t size = vec_len (lgm->native_fwd_rpath[rpath_index]) * sizeof (vl_api_gpe_native_fwd_rpath_t); - /* *INDENT-OFF* */ REPLY_MACRO4 (VL_API_GPE_NATIVE_FWD_RPATHS_GET_REPLY, size, { rmp->count = vec_len (lgm->native_fwd_rpath[rpath_index]); @@ -472,7 +463,6 @@ vl_api_gpe_native_fwd_rpaths_get_t_handler (vl_api_gpe_native_fwd_rpaths_get_t lgm->native_fwd_rpath[rpath_index]); gpe_native_fwd_rpaths_get_reply_t_host_to_net (rmp); }); - /* *INDENT-ON* */ } /* diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c index 5f196fb22e3..d0d86d58391 100644 --- a/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c +++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c @@ -1356,7 +1356,6 @@ vnet_lisp_gpe_fwd_entry_flush (void) lisp_gpe_main_t *lgm = &lisp_gpe_main; lisp_gpe_fwd_entry_t *lfe; - /* *INDENT-OFF* */ pool_foreach (lfe, lgm->lisp_fwd_entry_pool) { switch (fid_addr_type(&lfe->key->rmt)) @@ -1372,7 +1371,6 @@ vnet_lisp_gpe_fwd_entry_flush (void) break; } } - /* *INDENT-ON* */ } static u8 * @@ -1476,7 +1474,6 @@ lisp_gpe_fwd_entry_show (vlib_main_t * vm, return (NULL); } - /* *INDENT-OFF* */ pool_foreach (lfe, lgm->lisp_fwd_entry_pool) { if ((vni == ~0) || @@ -1484,18 +1481,15 @@ lisp_gpe_fwd_entry_show (vlib_main_t * vm, vlib_cli_output (vm, "%U", format_lisp_gpe_fwd_entry, lfe, LISP_GPE_FWD_ENTRY_FORMAT_NONE); } - /* *INDENT-ON* */ return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_gpe_fwd_entry_show_command, static) = { .path = "show gpe entry", .short_help = "show gpe entry vni <vni> vrf <vrf> [leid <leid>] reid <reid>", .function = lisp_gpe_fwd_entry_show, }; -/* *INDENT-ON* */ clib_error_t * lisp_gpe_fwd_entry_init (vlib_main_t * vm) @@ -1521,12 +1515,10 @@ vnet_lisp_gpe_get_fwd_entry_vnis (void) lisp_gpe_fwd_entry_t *lfe; u32 *vnis = 0; - /* *INDENT-OFF* */ pool_foreach (lfe, lgm->lisp_fwd_entry_pool) { hash_set (vnis, lfe->key->vni, 0); } - /* *INDENT-ON* */ return vnis; } @@ -1538,7 +1530,6 @@ vnet_lisp_gpe_fwd_entries_get_by_vni (u32 vni) lisp_gpe_fwd_entry_t *lfe; lisp_api_gpe_fwd_entry_t *entries = 0, e; - /* *INDENT-OFF* */ pool_foreach (lfe, lgm->lisp_fwd_entry_pool) { if (lfe->key->vni == vni) @@ -1554,7 +1545,6 @@ vnet_lisp_gpe_fwd_entries_get_by_vni (u32 vni) vec_add1 (entries, e); } } - /* *INDENT-ON* */ return entries; } diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c index c316f6c9825..4ba46c8240f 100644 --- a/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c +++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c @@ -243,23 +243,19 @@ lisp_gpe_sub_interface_show (vlib_main_t * vm, vlib_cli_output (vm, "%-16s%=8s%=15s%s", "Name", "VNI", "sw_if_index", "local RLOC"); - /* *INDENT-OFF* */ pool_foreach (l3s, lisp_gpe_sub_interface_pool) { vlib_cli_output (vm, "%U", format_lisp_gpe_sub_interface, l3s); } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_gpe_sub_interface_command) = { .path = "show gpe sub-interface", .short_help = "show gpe sub-interface", .function = lisp_gpe_sub_interface_show, }; -/* *INDENT-ON* */ static clib_error_t * lisp_gpe_sub_interface_module_init (vlib_main_t * vm) diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c index b6173b273c0..450c611c5f7 100644 --- a/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c +++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c @@ -262,13 +262,11 @@ lisp_gpe_tenant_flush (void) { lisp_gpe_tenant_t *lt; - /* *INDENT-OFF* */ pool_foreach (lt, lisp_gpe_tenant_pool) { lisp_gpe_tenant_l2_iface_unlock(lt->lt_vni); lisp_gpe_tenant_l3_iface_unlock(lt->lt_vni); } - /* *INDENT-ON* */ } /** @@ -305,23 +303,19 @@ lisp_gpe_tenant_show (vlib_main_t * vm, { lisp_gpe_tenant_t *lt; - /* *INDENT-OFF* */ pool_foreach (lt, lisp_gpe_tenant_pool) { vlib_cli_output (vm, "%U", format_lisp_gpe_tenant, lt); } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_gpe_tenant_command) = { .path = "show gpe tenant", .short_help = "show gpe tenant", .function = lisp_gpe_tenant_show, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_test.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_test.c index 2f1a4187551..10167b14975 100644 --- a/src/plugins/lisp/lisp-gpe/lisp_gpe_test.c +++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_test.c @@ -256,7 +256,6 @@ end: } -/* *INDENT-OFF* */ /** Used for parsing LISP eids */ typedef CLIB_PACKED(struct{ union { @@ -267,7 +266,6 @@ typedef CLIB_PACKED(struct{ u32 len; /**< prefix length if IP */ u8 type; /**< type of eid */ }) lisp_eid_vat_t; -/* *INDENT-ON* */ static uword unformat_lisp_eid_vat (unformat_input_t * input, va_list * args) diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c index 14ee095d2de..8dca55c4315 100644 --- a/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c +++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c @@ -253,24 +253,20 @@ show_lisp_gpe_tunnel_command_fn (vlib_main_t * vm, } else { - /* *INDENT-OFF* */ pool_foreach (lgt, lisp_gpe_tunnel_pool) { vlib_cli_output (vm, "%U", format_lisp_gpe_tunnel, lgt); } - /* *INDENT-ON* */ } return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_lisp_gpe_tunnel_command, static) = { .path = "show gpe tunnel", .function = show_lisp_gpe_tunnel_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * lisp_gpe_tunnel_module_init (vlib_main_t * vm) diff --git a/src/plugins/lisp/test/lisp_cp_test.c b/src/plugins/lisp/test/lisp_cp_test.c index 228ff32d010..d1908566f8e 100644 --- a/src/plugins/lisp/test/lisp_cp_test.c +++ b/src/plugins/lisp/test/lisp_cp_test.c @@ -99,7 +99,6 @@ test_lisp_msg_push_ecm () /* clear ip checksum */ clib_memset ((u8 *) ih + 10, 0, 2); - /* *INDENT-OFF* */ u8 expected_ip4_hdr[] = { 0x45, /* version; IHL */ 0x00, /* services */ @@ -112,7 +111,6 @@ test_lisp_msg_push_ecm () 0xd4, 0xc3, 0xb2, 0xa1, /* src IP */ 0x63, 0x72, 0x81, 0x90, /* dst IP */ }; - /* *INDENT-ON* */ _assert (0 == memcmp (ih, expected_ip4_hdr, sizeof (expected_ip4_hdr))); @@ -120,14 +118,12 @@ test_lisp_msg_push_ecm () /* clear udp checksum */ clib_memset ((u8 *) uh + 6, 0, 2); - /* *INDENT-OFF* */ u8 expected_udp_hdr[] = { 0x00, 0x15, /* src port */ 0x00, 0x14, /* dst port */ 0x03, 0x8c, /* length */ 0x00, 0x00, /* checksum */ }; - /* *INDENT-ON* */ _assert (0 == memcmp (uh, expected_udp_hdr, sizeof (expected_udp_hdr))); @@ -149,7 +145,6 @@ test_lisp_msg_parse_mapping_record () b = clib_mem_alloc (buff_len); clib_memset ((u8 *) b, 0, buff_len); - /* *INDENT-OFF* */ u8 map_reply_records[] = { /* 1. record */ 0x01, 0x02, 0x03, 0x04, /* record TTL */ @@ -167,7 +162,6 @@ test_lisp_msg_parse_mapping_record () 0x00, 0x01, /* Loc-AFI */ 0xaa, 0xbb, 0xcc, 0xdd, /* Loator */ }; - /* *INDENT-ON* */ b->current_length = buff_len; clib_memcpy (b->data, map_reply_records, sizeof (map_reply_records)); @@ -322,7 +316,6 @@ test_lisp_msg_put_mreq_with_lcaf () /* clear Nonce to simplify comparison */ clib_memset ((u8 *) h + 4, 0, 8); - /* *INDENT-OFF* */ u8 expected_data[] = { 0x10, 0x40, 0x00, 0x01, /* type; flags; IRC; REC count */ @@ -349,7 +342,6 @@ test_lisp_msg_put_mreq_with_lcaf () 0x00, 0x01, /* EID-prefix-AFI */ 0xf0, 0xde, 0xbc, 0x9a, /* EID-prefix */ }; - /* *INDENT-ON* */ _assert (0 == memcmp (expected_data, (u8 *) h, sizeof (expected_data))); done: @@ -377,7 +369,6 @@ test_lisp_msg_put_mreq () print_map_request (h); - /* *INDENT-OFF* */ u8 expected_data[50] = { 0x10, 0x40, 0x01, 0x01, /* type; flags; IRC; REC count */ 0x00, 0x00, 0x00, 0x00, @@ -400,7 +391,6 @@ test_lisp_msg_put_mreq () 0x00, 0x01, /* EID-prefix-AFI */ 0xf0, 0xde, 0xbc, 0x9a, /* EID-prefix */ }; - /* *INDENT-ON* */ _assert (0 == memcmp (expected_data, (u8 *) h, sizeof (expected_data))); @@ -415,7 +405,6 @@ build_test_map_records () { mapping_t *records = 0; - /* *INDENT-OFF* */ mapping_t r = { .ttl = MAP_REGISTER_DEFAULT_TTL, .eid = { @@ -439,7 +428,6 @@ build_test_map_records () } } }; - /* *INDENT-ON* */ vec_add1 (r.locators, loc); vec_add1 (records, r); @@ -482,7 +470,6 @@ test_lisp_map_register () /* clear authentication data */ clib_memset ((u8 *) b->data + 16, 0, 20); - /* *INDENT-OFF* */ u8 expected_data[] = { 0x30, 0x00, 0x01, 0x01, /* type; rsvd; want notify; REC count */ 0x00, 0x00, 0x00, 0x00, @@ -509,7 +496,6 @@ test_lisp_map_register () 0x00, 0x04, 0x00, 0x01, /* flags, AFI = ipv4 */ 0x66, 0x77, 0x88, 0x99, /* ipv4 locator address */ }; - /* *INDENT-ON* */ _assert (0 == memcmp (expected_data, b->data, sizeof (expected_data))); done: @@ -537,20 +523,17 @@ test_lisp_parse_map_reply () { clib_error_t *error = 0; - /* *INDENT-OFF* */ u8 map_reply_data[] = { 0x00, 0x00, 0x00, 0x01, /* type; rsvd; mapping count */ 0x00, 0x00, 0x00, 0x00, }; - /* *INDENT-ON* */ vlib_buffer_t *b = create_buffer (map_reply_data, sizeof (map_reply_data)); map_records_arg_t *mrecs = parse_map_reply (b); _assert (0 == mrecs); clib_mem_free (b); - /* *INDENT-OFF* */ u8 map_reply_data2[] = { 0x00, 0x00, 0x00, 0x01, /* type; rsvd */ @@ -561,7 +544,6 @@ test_lisp_parse_map_reply () 0x01, 0x02, 0x03, 0x04, /* record TTL */ 0x01, /* locator count */ }; - /* *INDENT-ON* */ b = create_buffer (map_reply_data2, sizeof (map_reply_data2)); mrecs = parse_map_reply (b); @@ -585,7 +567,6 @@ test_lisp_parse_lcaf () b = clib_mem_alloc (buff_len); clib_memset ((u8 *) b, 0, buff_len); - /* *INDENT-OFF* */ u8 map_reply_records[] = { /* 1. record */ @@ -644,7 +625,6 @@ test_lisp_parse_lcaf () 0x00, 0x01, /* Loc-AFI */ 0xaa, 0xbb, 0xcc, 0xdd, /* Loator */ }; - /* *INDENT-ON* */ b->current_length = buff_len; memcpy (b->data, map_reply_records, sizeof (map_reply_records)); @@ -785,13 +765,11 @@ test_gid_parse_ip_pref () gid_address_t _gid_addr, *gid_addr = &_gid_addr; gid_address_t _gid_addr_copy, *copy = &_gid_addr_copy; - /* *INDENT-OFF* */ u8 data[] = { 0x00, 0x01, /* AFI = IPv4 */ 0x10, 0xbb, 0xcc, 0xdd, /* ipv4 address */ }; - /* *INDENT-ON* */ u32 len = gid_address_parse (data, gid_addr); _assert (6 == len); @@ -808,14 +786,12 @@ test_gid_parse_mac () gid_address_t _gid, *gid = &_gid; gid_address_t _gid_copy, *gid_copy = &_gid_copy; - /* *INDENT-OFF* */ u8 data[] = { 0x40, 0x05, /* AFI = MAC address */ 0x10, 0xbb, 0xcc, 0xdd, /* MAC */ 0x77, 0x99, }; - /* *INDENT-ON* */ u32 len = gid_address_parse (data, gid); _assert (8 == len); @@ -843,7 +819,6 @@ test_gid_write_nsh (void) u16 len = gid_address_put (b, &g); - /* *INDENT-OFF* */ u8 expected[] = { 0x40, 0x03, 0x00, 0x00, /* AFI = LCAF*/ @@ -852,7 +827,6 @@ test_gid_write_nsh (void) /* Service Path ID, Service index */ 0x11, 0x22, 0x33, 0x42, /* SPI, SI */ }; - /* *INDENT-ON* */ _assert (sizeof (expected) == len); _assert (0 == memcmp (expected, b, len)); @@ -871,7 +845,6 @@ test_gid_parse_nsh () clib_memset (gid_addr, 0, sizeof (gid_addr[0])); clib_memset (copy, 0, sizeof (copy[0])); - /* *INDENT-OFF* */ u8 data[] = { 0x40, 0x03, 0x00, 0x00, /* AFI = LCAF*/ @@ -880,7 +853,6 @@ test_gid_parse_nsh () /* Service Path ID, Service index */ 0x55, 0x99, 0x42, 0x09, /* SPI, SI */ }; - /* *INDENT-ON* */ u32 len = gid_address_parse (data, gid_addr); _assert (sizeof (data) == len); @@ -907,7 +879,6 @@ test_gid_parse_lcaf () clib_memset (gid_addr, 0, sizeof (gid_addr[0])); clib_memset (gid_addr_copy, 0, sizeof (gid_addr_copy[0])); - /* *INDENT-OFF* */ u8 data[] = { 0x40, 0x03, /* AFI = LCAF*/ @@ -922,7 +893,6 @@ test_gid_parse_lcaf () 0x00, 0x01, /* AFI = ipv4 */ 0x10, 0xbb, 0xcc, 0xdd, /* ipv4 address */ }; - /* *INDENT-ON* */ u32 len = gid_address_parse (data, gid_addr); _assert (18 == len); @@ -951,7 +921,6 @@ test_gid_parse_lcaf_complex () clib_memset (gid_addr, 0, sizeof (gid_addr[0])); clib_memset (gid_addr_copy, 0, sizeof (gid_addr_copy[0])); - /* *INDENT-OFF* */ u8 data[] = { 0x40, 0x03, /* AFI = LCAF */ @@ -988,7 +957,6 @@ test_gid_parse_lcaf_complex () 0x10, 0xbb, 0xcc, 0xdd, 0x10, 0xbb, 0xcc, 0xdd, /* ipv6 address */ }; - /* *INDENT-ON* */ u32 len = gid_address_parse (data, gid_addr); _assert (54 == len); @@ -1056,7 +1024,6 @@ test_write_mac_in_lcaf (void) u16 len = gid_address_put (b, &g); - /* *INDENT-OFF* */ u8 expected[] = { 0x40, 0x03, /* AFI = LCAF */ @@ -1071,7 +1038,6 @@ test_write_mac_in_lcaf (void) 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 /* MAC */ }; - /* *INDENT-ON* */ _assert (sizeof (expected) == len); _assert (0 == memcmp (expected, b, len)); @@ -1096,14 +1062,12 @@ test_mac_address_write (void) u16 len = gid_address_put (b, &g); _assert (8 == len); - /* *INDENT-OFF* */ u8 expected[] = { 0x40, 0x05, /* AFI = MAC */ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 /* MAC */ }; - /* *INDENT-ON* */ _assert (0 == memcmp (expected, b, len)); done: @@ -1118,7 +1082,6 @@ test_src_dst_with_vni_serdes (void) u8 *b = clib_mem_alloc (500); clib_memset (b, 0, 500); - /* *INDENT-OFF* */ fid_address_t src = { .type = FID_ADDR_IP_PREF, @@ -1161,7 +1124,6 @@ test_src_dst_with_vni_serdes (void) .vni_mask = 0x9 }; - /* *INDENT-ON* */ u16 size_to_put = gid_address_size_to_put (&g); _assert (36 == size_to_put); @@ -1170,7 +1132,6 @@ test_src_dst_with_vni_serdes (void) u16 write_len = gid_address_put (b, &g); _assert (size_to_put == write_len); - /* *INDENT-OFF* */ u8 expected_data[] = { 0x40, 0x03, 0x00, 0x00, /* AFI = LCAF, reserved1, flags */ @@ -1187,7 +1148,6 @@ test_src_dst_with_vni_serdes (void) 0x00, 0x01, /* AFI = ip4 */ 0x09, 0x08, 0x00, 0x00, /* destination */ }; - /* *INDENT-ON* */ _assert (0 == memcmp (expected_data, b, sizeof (expected_data))); @@ -1205,7 +1165,6 @@ test_src_dst_deser_bad_afi (void) { clib_error_t *error = 0; - /* *INDENT-OFF* */ u8 expected_data[] = { 0x40, 0x03, 0x00, 0x00, /* AFI = LCAF, reserved1, flags */ @@ -1220,7 +1179,6 @@ test_src_dst_deser_bad_afi (void) 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, /* destination */ }; - /* *INDENT-ON* */ gid_address_t p; _assert (~0 == gid_address_parse (expected_data, &p)); @@ -1265,7 +1223,6 @@ test_src_dst_serdes (void) u16 write_len = gid_address_put (b, &g); _assert (size_to_put == write_len); - /* *INDENT-OFF* */ u8 expected_data[] = { 0x40, 0x03, 0x00, 0x00, /* AFI = LCAF, reserved1, flags */ @@ -1280,7 +1237,6 @@ test_src_dst_serdes (void) 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, /* destination */ }; - /* *INDENT-ON* */ _assert (0 == memcmp (expected_data, b, sizeof (expected_data))); @@ -1320,7 +1276,6 @@ test_gid_address_write (void) u16 write_len = gid_address_put (b, &g); _assert (18 == write_len); - /* *INDENT-OFF* */ u8 expected_gid_data[] = { 0x40, 0x03, /* AFI = LCAF */ @@ -1334,7 +1289,6 @@ test_gid_address_write (void) 0x00, 0x01, /* AFI = IPv4 */ 0xdd, 0xcc, 0xbb, 0xaa, /* ipv4 addr */ }; - /* *INDENT-ON* */ _assert (0 == memcmp (expected_gid_data, b, sizeof (expected_gid_data))); done: @@ -1413,25 +1367,21 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (lisp_cp_command, static) = { .path = "test lisp cp", .short_help = "lisp cp internal unit tests", .function = lisp_cp_test, }; -/* *INDENT-ON* */ #include <vlib/unix/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Test Locator ID Separation Protocol (LISP)", .default_disabled = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lldp/lldp_api.c b/src/plugins/lldp/lldp_api.c index 6d3f6d7e761..bb5d1cbb5e8 100644 --- a/src/plugins/lldp/lldp_api.c +++ b/src/plugins/lldp/lldp_api.c @@ -178,12 +178,10 @@ VLIB_API_INIT_FUNCTION (lldp_api_hookup); #include <vlib/unix/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Link Layer Discovery Protocol (LLDP)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/lldp/lldp_cli.c b/src/plugins/lldp/lldp_cli.c index 317595ff6a5..1ed3efa4251 100644 --- a/src/plugins/lldp/lldp_cli.c +++ b/src/plugins/lldp/lldp_cli.c @@ -298,7 +298,6 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(set_interface_lldp_cmd, static) = { .path = "set interface lldp", .short_help = "set interface lldp <interface> | sw_if_index <idx>" @@ -313,7 +312,6 @@ VLIB_CLI_COMMAND(set_lldp_cmd, static) = { "[tx-interval <value>]", .function = lldp_cfg_cmd, }; -/* *INDENT-ON* */ static const char * lldp_chassis_id_subtype_str (lldp_chassis_id_subtype_t t) @@ -580,7 +578,6 @@ format_lldp_intfs_detail (u8 * s, vlib_main_t * vm, const lldp_main_t * lm) s = format (s, "\nLLDP-enabled interface table:\n"); f64 now = vlib_time_now (vm); - /* *INDENT-OFF* */ pool_foreach ( n, lm->intfs) { hw = vnet_get_hw_interface(vnm, n->hw_if_index); @@ -640,7 +637,6 @@ format_lldp_intfs_detail (u8 * s, vlib_main_t * vm, const lldp_main_t * lm) now, format_time_ago, n->last_heard, now); } } - /* *INDENT-ON* */ return s; } @@ -663,7 +659,6 @@ format_lldp_intfs (u8 * s, va_list * va) "Peer chassis ID", "Remote port ID", "Last heard", "Last sent", "Status"); - /* *INDENT-OFF* */ pool_foreach ( n, lm->intfs) { const vnet_hw_interface_t *hw = @@ -689,7 +684,6 @@ format_lldp_intfs (u8 * s, va_list * va) format_time_ago, n->last_sent, now, "inactive"); } } - /* *INDENT-ON* */ return s; } @@ -710,13 +704,11 @@ show_lldp (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(show_lldp_command, static) = { .path = "show lldp", .short_help = "show lldp [detail]", .function = show_lldp, }; -/* *INDENT-ON* */ /* * packet trace format function, very similar to diff --git a/src/plugins/lldp/lldp_node.c b/src/plugins/lldp/lldp_node.c index d4b6d529d9b..dbbb5d46402 100644 --- a/src/plugins/lldp/lldp_node.c +++ b/src/plugins/lldp/lldp_node.c @@ -102,7 +102,6 @@ lldp_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, /* * lldp input graph node declaration */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(lldp_input_node, static) = { .function = lldp_node_fn, .name = "lldp-input", @@ -120,7 +119,6 @@ VLIB_REGISTER_NODE(lldp_input_node, static) = { [LLDP_INPUT_NEXT_NORMAL] = "error-drop", }, }; -/* *INDENT-ON* */ /* * lldp process node function @@ -230,13 +228,11 @@ lldp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) /* * lldp process node declaration */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(lldp_process_node, static) = { .function = lldp_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "lldp-process", }; -/* *INDENT-ON* */ void lldp_schedule_intf (lldp_main_t * lm, lldp_intf_t * n) diff --git a/src/plugins/lldp/lldp_protocol.h b/src/plugins/lldp/lldp_protocol.h index e641b26e20d..c4219162dfe 100644 --- a/src/plugins/lldp/lldp_protocol.h +++ b/src/plugins/lldp/lldp_protocol.h @@ -56,12 +56,10 @@ struct lldp_tlv_head u8 byte2; /* contains the lower bits of length */ }; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { struct lldp_tlv_head head; u8 v[0]; }) lldp_tlv_t; -/* *INDENT-ON* */ lldp_tlv_code_t lldp_tlv_get_code (const lldp_tlv_t * tlv); void lldp_tlv_set_code (lldp_tlv_t * tlv, lldp_tlv_code_t code); @@ -89,13 +87,11 @@ typedef enum #undef F } lldp_chassis_id_subtype_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { struct lldp_tlv_head head; u8 subtype; u8 id[0]; }) lldp_chassis_id_tlv_t; -/* *INDENT-ON* */ #define foreach_port_id_subtype(F) \ F (0, reserved, "Reserved") \ @@ -118,7 +114,6 @@ typedef enum #undef F } lldp_port_id_subtype_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { struct lldp_tlv_head head; u8 subtype; @@ -129,7 +124,6 @@ typedef CLIB_PACKED (struct { struct lldp_tlv_head head; u16 ttl; }) lldp_ttl_tlv_t; -/* *INDENT-ON* */ #endif /* __included_lldp_protocol_h__ */ diff --git a/src/plugins/mactime/mactime.c b/src/plugins/mactime/mactime.c index ffb41c2d8c7..933e44ea5c1 100644 --- a/src/plugins/mactime/mactime.c +++ b/src/plugins/mactime/mactime.c @@ -140,7 +140,6 @@ mactime_enable_disable_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (mactime_enable_disable_command, static) = { .path = "mactime enable-disable", @@ -148,7 +147,6 @@ VLIB_CLI_COMMAND (mactime_enable_disable_command, static) = "mactime enable-disable <interface-name> [disable]", .function = mactime_enable_disable_command_fn, }; -/* *INDENT-ON* */ /** Enable / disable time-base src mac filtration on an interface @@ -193,7 +191,6 @@ vl_api_mactime_dump_t_handler (vl_api_mactime_dump_t * mp) goto send_reply; } - /* *INDENT-OFF* */ pool_foreach (dev, mm->devices) { message_size = sizeof(*ep) + vec_len(dev->device_name) + @@ -230,15 +227,12 @@ vl_api_mactime_dump_t_handler (vl_api_mactime_dump_t * mp) ep->device_name [ARRAY_LEN(ep->device_name) -1] = 0; vl_api_send_msg (rp, (u8 *)ep); } - /* *INDENT-OFF* */ send_reply: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_MACTIME_DUMP_REPLY, ({ rmp->table_epoch = clib_host_to_net_u32 (mm->device_table_epoch); })); - /* *INDENT-ON* */ } /** Create a lookup table entry for the indicated mac address @@ -428,12 +422,10 @@ mactime_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (mactime_init) = { .runs_after = VLIB_INITS("ip_neighbor_init"), }; -/* *INDENT-ON* */ static clib_error_t * mactime_config (vlib_main_t * vm, unformat_input_t * input) @@ -461,30 +453,24 @@ mactime_config (vlib_main_t * vm, unformat_input_t * input) VLIB_CONFIG_FUNCTION (mactime_config, "mactime"); -/* *INDENT-OFF* */ VNET_FEATURE_INIT (mactime, static) = { .arc_name = "device-input", .node_name = "mactime", .runs_before = VNET_FEATURES ("ethernet-input"), }; -/* *INDENT-ON */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (mactime_tx, static) = { .arc_name = "interface-output", .node_name = "mactime-tx", .runs_before = VNET_FEATURES ("interface-output-arc-end"), }; -/* *INDENT-ON */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Time-based MAC Source Address Filter", }; -/* *INDENT-ON* */ u8 * format_bytes_with_width (u8 * s, va_list * va) @@ -575,12 +561,10 @@ show_mactime_command_fn (vlib_main_t * vm, if (verbose) vlib_cli_output (vm, "Time now: %U", format_clib_timebase_time, now); - /* *INDENT-OFF* */ pool_foreach (dp, mm->devices) { vec_add1 (pool_indices, dp - mm->devices); } - /* *INDENT-ON* */ vlib_cli_output (vm, "%-15s %18s %14s %10s %11s %13s", "Device Name", "Addresses", "Status", @@ -692,14 +676,12 @@ show_mactime_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_mactime_command, static) = { .path = "show mactime", .short_help = "show mactime [verbose]", .function = show_mactime_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * clear_mactime_command_fn (vlib_main_t * vm, @@ -718,14 +700,12 @@ clear_mactime_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_mactime_command, static) = { .path = "clear mactime", .short_help = "clear mactime counters", .function = clear_mactime_command_fn, }; -/* *INDENT-ON* */ diff --git a/src/plugins/mactime/mactime_test.c b/src/plugins/mactime/mactime_test.c index 67655ccefad..5f31dca7012 100644 --- a/src/plugins/mactime/mactime_test.c +++ b/src/plugins/mactime/mactime_test.c @@ -281,12 +281,10 @@ api_mactime_dump (vat_main_t * vam) W (ret); fformat (vam->ofp, "%U", format_device, 0 /* header */ , 0 /* verbose */ ); - /* *INDENT-OFF* */ pool_foreach (dev, tm->devices) { fformat (vam->ofp, "%U", format_device, dev, verbose); } - /* *INDENT-ON* */ return ret; } diff --git a/src/plugins/mactime/mactime_top.c b/src/plugins/mactime/mactime_top.c index 60c3e5cca65..1517ec43e17 100644 --- a/src/plugins/mactime/mactime_top.c +++ b/src/plugins/mactime/mactime_top.c @@ -191,12 +191,10 @@ scrape_stats_segment (mt_main_t * mm) int i, j; vec_reset_length (pool_indices); - /* *INDENT-OFF* */ pool_foreach (dev, mm->devices) { vec_add1 (pool_indices, dev->pool_index); } - /* *INDENT-ON* */ /* Nothing to do... */ if (vec_len (pool_indices) == 0) @@ -440,12 +438,10 @@ print_device_table (mt_main_t * mm) mactime_device_t *dev; fformat (stdout, "%U", format_device, NULL /* header */, 0 /* verbose */); - /* *INDENT-OFF* */ pool_foreach (dev, mm->devices) { fformat (stdout, "%U", format_device, dev, 0 /* verbose */); } - /* *INDENT-ON* */ } int diff --git a/src/plugins/mactime/node.c b/src/plugins/mactime/node.c index 465cee380b1..fad487e666e 100644 --- a/src/plugins/mactime/node.c +++ b/src/plugins/mactime/node.c @@ -349,7 +349,6 @@ mactime_node_fn (vlib_main_t * vm, return mactime_node_inline (vm, node, frame, 0 /* is_tx */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (mactime_node) = { .function = mactime_node_fn, @@ -370,7 +369,6 @@ VLIB_REGISTER_NODE (mactime_node) = [MACTIME_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ static uword mactime_tx_node_fn (vlib_main_t * vm, @@ -379,7 +377,6 @@ mactime_tx_node_fn (vlib_main_t * vm, return mactime_node_inline (vm, node, frame, 1 /* is_tx */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (mactime_tx_node) = { .function = mactime_tx_node_fn, @@ -400,7 +397,6 @@ VLIB_REGISTER_NODE (mactime_tx_node) = [MACTIME_NEXT_ETHERNET_INPUT] = "ethernet-input", /* notused */ }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/map/ip4_map.c b/src/plugins/map/ip4_map.c index 710bd1003b4..652808e6d37 100644 --- a/src/plugins/map/ip4_map.c +++ b/src/plugins/map/ip4_map.c @@ -326,7 +326,6 @@ ip4_map (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) return frame->n_vectors; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip4_map_feature, static) = { .arc_name = "ip4-unicast", @@ -355,7 +354,6 @@ VLIB_REGISTER_NODE(ip4_map_node) = { [IP4_MAP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/map/ip4_map_t.c b/src/plugins/map/ip4_map_t.c index 8ae76f331f6..fe29af458a2 100644 --- a/src/plugins/map/ip4_map_t.c +++ b/src/plugins/map/ip4_map_t.c @@ -56,7 +56,6 @@ typedef enum //This is used to pass information within the buffer data. //Buffer structure being too small to contain big structures like this. -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip6_address_t daddr; ip6_address_t saddr; @@ -64,7 +63,6 @@ typedef CLIB_PACKED (struct { //sizeof(ip6) + sizeof(ip_frag) - sizeof(ip4) u8 unused[28]; }) ip4_mapt_pseudo_header_t; -/* *INDENT-ON* */ typedef struct { @@ -684,7 +682,6 @@ ip4_map_t (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) return frame->n_vectors; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip4_map_t_feature, static) = { .arc_name = "ip4-unicast", .node_name = "ip4-map-t", @@ -710,9 +707,7 @@ VLIB_REGISTER_NODE(ip4_map_t_fragmented_node) = { [IP4_MAPT_FRAGMENTED_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(ip4_map_t_icmp_node) = { .function = ip4_map_t_icmp, .name = "ip4-map-t-icmp", @@ -731,9 +726,7 @@ VLIB_REGISTER_NODE(ip4_map_t_icmp_node) = { [IP4_MAPT_ICMP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(ip4_map_t_tcp_udp_node) = { .function = ip4_map_t_tcp_udp, .name = "ip4-map-t-tcp-udp", @@ -752,9 +745,7 @@ VLIB_REGISTER_NODE(ip4_map_t_tcp_udp_node) = { [IP4_MAPT_TCP_UDP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(ip4_map_t_node) = { .function = ip4_map_t, .name = "ip4-map-t", @@ -774,7 +765,6 @@ VLIB_REGISTER_NODE(ip4_map_t_node) = { [IP4_MAPT_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/map/ip6_map.c b/src/plugins/map/ip6_map.c index 1193dda0a80..3d9b21dfcd9 100644 --- a/src/plugins/map/ip6_map.c +++ b/src/plugins/map/ip6_map.c @@ -803,7 +803,6 @@ ip6_map_icmp_relay (vlib_main_t * vm, } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip6_map_feature, static) = { .arc_name = "ip6-unicast", @@ -836,9 +835,7 @@ VLIB_REGISTER_NODE(ip6_map_node) = { [IP6_MAP_NEXT_ICMP] = "ip6-icmp-error", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(ip6_map_post_ip4_reass_node) = { .function = ip6_map_post_ip4_reass, .name = "ip6-map-post-ip4-reass", @@ -854,9 +851,7 @@ VLIB_REGISTER_NODE(ip6_map_post_ip4_reass_node) = { [IP6_MAP_POST_IP4_REASS_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(ip6_map_icmp_relay_node, static) = { .function = ip6_map_icmp_relay, .name = "ip6-map-icmp-relay", @@ -871,7 +866,6 @@ VLIB_REGISTER_NODE(ip6_map_icmp_relay_node, static) = { [IP6_ICMP_RELAY_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ clib_error_t * ip6_map_init (vlib_main_t * vm) diff --git a/src/plugins/map/ip6_map_t.c b/src/plugins/map/ip6_map_t.c index 861c049b0f4..6bfc8e0f952 100644 --- a/src/plugins/map/ip6_map_t.c +++ b/src/plugins/map/ip6_map_t.c @@ -687,7 +687,6 @@ ip6_map_t (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(ip6_map_t_fragmented_node) = { .function = ip6_map_t_fragmented, .name = "ip6-map-t-fragmented", @@ -707,9 +706,7 @@ VLIB_REGISTER_NODE(ip6_map_t_fragmented_node) = { [IP6_MAPT_FRAGMENTED_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(ip6_map_t_icmp_node) = { .function = ip6_map_t_icmp, .name = "ip6-map-t-icmp", @@ -729,9 +726,7 @@ VLIB_REGISTER_NODE(ip6_map_t_icmp_node) = { [IP6_MAPT_ICMP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(ip6_map_t_tcp_udp_node) = { .function = ip6_map_t_tcp_udp, .name = "ip6-map-t-tcp-udp", @@ -751,9 +746,7 @@ VLIB_REGISTER_NODE(ip6_map_t_tcp_udp_node) = { [IP6_MAPT_TCP_UDP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip6_map_t_feature, static) = { .arc_name = "ip6-unicast", .node_name = "ip6-map-t", @@ -781,7 +774,6 @@ VLIB_REGISTER_NODE(ip6_map_t_node) = { [IP6_MAPT_NEXT_ICMP] = "ip6-icmp-error", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/map/map.c b/src/plugins/map/map.c index 7ae14828d20..6c9668dde51 100644 --- a/src/plugins/map/map.c +++ b/src/plugins/map/map.c @@ -979,10 +979,8 @@ show_map_domain_command_fn (vlib_main_t * vm, unformat_input_t * input, /* Get a line of input. */ if (!unformat_user (input, unformat_line_input, line_input)) { - /* *INDENT-OFF* */ pool_foreach (d, mm->domains) {vlib_cli_output(vm, "%U", format_map_domain, d, counters);} - /* *INDENT-ON* */ return 0; } @@ -1008,10 +1006,8 @@ show_map_domain_command_fn (vlib_main_t * vm, unformat_input_t * input, if (map_domain_index == ~0) { - /* *INDENT-OFF* */ pool_foreach (d, mm->domains) {vlib_cli_output(vm, "%U", format_map_domain, d, counters);} - /* *INDENT-ON* */ } else { @@ -1062,7 +1058,6 @@ show_map_stats_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } - /* *INDENT-OFF* */ pool_foreach (d, mm->domains) { if (d->rules) { rulecount+= 0x1 << d->psid_length; @@ -1071,7 +1066,6 @@ show_map_stats_command_fn (vlib_main_t * vm, unformat_input_t * input, domains += sizeof(*d); domaincount++; } - /* *INDENT-ON* */ vlib_cli_output (vm, "MAP domains structure: %d\n", sizeof (map_domain_t)); vlib_cli_output (vm, "MAP domains: %d (%d bytes)\n", domaincount, domains); @@ -1255,7 +1249,6 @@ done: } -/* *INDENT-OFF* */ /*? * Set or copy the IP TOS/Traffic Class field @@ -1469,7 +1462,6 @@ VLIB_PLUGIN_REGISTER() = { .description = "Mapping of Address and Port (MAP)", }; -/* *INDENT-ON* */ /* * map_init diff --git a/src/plugins/map/map_api.c b/src/plugins/map/map_api.c index f81216dddbd..1dbff4ca0d1 100644 --- a/src/plugins/map/map_api.c +++ b/src/plugins/map/map_api.c @@ -50,13 +50,11 @@ vl_api_map_add_domain_t_handler (vl_api_map_add_domain_t * mp) mp->ip6_src.len, mp->ea_bits_len, mp->psid_offset, mp->psid_length, &index, mp->mtu, flags, mp->tag); - /* *INDENT-OFF* */ REPLY_MACRO2_END(VL_API_MAP_ADD_DOMAIN_REPLY, ({ rmp->index = index; })); - /* *INDENT-ON* */ } static void @@ -98,7 +96,6 @@ send_domain_details (u32 map_domain_index, vl_api_registration_t * rp, vec_elt_at_index (mm->domain_extras, map_domain_index); int tag_len = clib_min (ARRAY_LEN (rmp->tag), vec_len (de->tag) + 1); - /* *INDENT-OFF* */ REPLY_MACRO_DETAILS4(VL_API_MAP_DOMAIN_DETAILS, rp, context, ({ rmp->domain_index = htonl (map_domain_index); @@ -119,7 +116,6 @@ send_domain_details (u32 map_domain_index, vl_api_registration_t * rp, memcpy (rmp->tag, de->tag, tag_len - 1); rmp->tag[tag_len - 1] = '\0'; })); - /* *INDENT-ON* */ } static void @@ -136,12 +132,10 @@ vl_api_map_domain_dump_t_handler (vl_api_map_domain_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach_index (i, mm->domains) { send_domain_details(i, reg, mp->context); } - /* *INDENT-ON* */ } static void @@ -152,12 +146,10 @@ vl_api_map_domains_get_t_handler (vl_api_map_domains_get_t * mp) i32 rv = 0; - /* *INDENT-OFF* */ REPLY_AND_DETAILS_MACRO (VL_API_MAP_DOMAINS_GET_REPLY, mm->domains, ({ send_domain_details (cursor, rp, mp->context); })); - /* *INDENT-ON* */ } static void diff --git a/src/plugins/marvell/plugin.c b/src/plugins/marvell/plugin.c index fe673092a5e..ed90776ba95 100644 --- a/src/plugins/marvell/plugin.c +++ b/src/plugins/marvell/plugin.c @@ -19,12 +19,10 @@ #include <vnet/plugin/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Marvell PP2 Device Driver", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/marvell/pp2/cli.c b/src/plugins/marvell/pp2/cli.c index 28ef35b2b24..f4ecb1873c9 100644 --- a/src/plugins/marvell/pp2/cli.c +++ b/src/plugins/marvell/pp2/cli.c @@ -59,13 +59,11 @@ mrvl_pp2_create_command_fn (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (mrvl_pp2_create_command, static) = { .path = "create interface marvell pp2", .short_help = "create interface marvell pp2 [name <ifname>] [rx-queue-size slots] [tx-queue-size slots]", .function = mrvl_pp2_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * mrvl_pp2_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -110,14 +108,12 @@ mrvl_pp2_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (mrvl_pp2_delete_command, static) = { .path = "delete interface marvell pp2", .short_help = "delete interface marvell pp2 " "{<interface> | sw_if_index <sw_idx>}", .function = mrvl_pp2_delete_command_fn, }; -/* *INDENT-ON* */ clib_error_t * mrvl_pp2_cli_init (vlib_main_t * vm) diff --git a/src/plugins/marvell/pp2/input.c b/src/plugins/marvell/pp2/input.c index 106148db023..2545f91becb 100644 --- a/src/plugins/marvell/pp2/input.c +++ b/src/plugins/marvell/pp2/input.c @@ -369,7 +369,6 @@ mrvl_pp2_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return n_rx; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (mrvl_pp2_input_node) = { .function = mrvl_pp2_input_fn, .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, @@ -382,7 +381,6 @@ VLIB_REGISTER_NODE (mrvl_pp2_input_node) = { .error_strings = mrvl_pp2_input_error_strings, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/marvell/pp2/pp2.c b/src/plugins/marvell/pp2/pp2.c index 7aaa3676eab..030ab9b4496 100644 --- a/src/plugins/marvell/pp2/pp2.c +++ b/src/plugins/marvell/pp2/pp2.c @@ -129,7 +129,6 @@ mrvl_pp2_delete_if (mrvl_pp2_if_t * ppif) pp2_ppio_deinit (ppif->ppio); } - /* *INDENT-OFF* */ /* free buffers hanging in the tx ring */ vec_foreach (outq, ppif->outqs) { @@ -162,7 +161,6 @@ mrvl_pp2_delete_if (mrvl_pp2_if_t * ppif) pp2_bpool_deinit (inq->bpool); } vec_free (ppif->inqs); - /* *INDENT-ON* */ pool_put (ppm->interfaces, ppif); @@ -375,7 +373,6 @@ static char *mrvl_pp2_tx_func_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (mrvl_pp2_device_class,) = { .name = "Marvell PPv2 interface", @@ -388,7 +385,6 @@ VNET_DEVICE_CLASS (mrvl_pp2_device_class,) = .clear_counters = mrvl_pp2_clear_interface_counters, .rx_redirect_to_node = mrvl_pp2_set_interface_next_node, }; -/* *INDENT-ON* */ static clib_error_t * mrvl_pp2_init (vlib_main_t * vm) diff --git a/src/plugins/mdata/mdata.c b/src/plugins/mdata/mdata.c index d90c20d9e9c..c45b1e38910 100644 --- a/src/plugins/mdata/mdata.c +++ b/src/plugins/mdata/mdata.c @@ -214,14 +214,12 @@ mdata_enable_disable_command_fn (vlib_main_t * vm, * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (mdata_enable_disable_command, static) = { .path = "buffer metadata tracking", .short_help = "buffer metadata tracking [on][off]", .function = mdata_enable_disable_command_fn, }; -/* *INDENT-ON* */ /* API message handler */ static void vl_api_mdata_enable_disable_t_handler @@ -256,13 +254,11 @@ mdata_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (mdata_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Buffer metadata change tracker." }; -/* *INDENT-ON* */ #define foreach_primary_metadata_field \ @@ -478,14 +474,12 @@ show_metadata_command_fn (vlib_main_t * vm, * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_metadata_command, static) = { .path = "show buffer metadata", .short_help = "show buffer metadata", .function = show_metadata_command_fn, }; -/* *INDENT-OFF* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/memif/cli.c b/src/plugins/memif/cli.c index 309cd8e49d7..c2ed63747fa 100644 --- a/src/plugins/memif/cli.c +++ b/src/plugins/memif/cli.c @@ -80,13 +80,11 @@ memif_socket_filename_create_command_fn (vlib_main_t * vm, return err; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (memif_socket_filename_create_command, static) = { .path = "create memif socket", .short_help = "create memif socket [id <id>] [filename <path>]", .function = memif_socket_filename_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * memif_socket_filename_delete_command_fn (vlib_main_t * vm, @@ -124,13 +122,11 @@ memif_socket_filename_delete_command_fn (vlib_main_t * vm, return memif_socket_filename_add_del (0, socket_id, 0); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (memif_socket_filename_delete_command, static) = { .path = "delete memif socket", .short_help = "delete memif socket [id <id>]", .function = memif_socket_filename_delete_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * memif_create_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -211,7 +207,6 @@ memif_create_command_fn (vlib_main_t * vm, unformat_input_t * input, return err; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (memif_create_command, static) = { .path = "create interface memif", .short_help = "create interface memif [id <id>] [socket-id <socket-id>] " @@ -221,7 +216,6 @@ VLIB_CLI_COMMAND (memif_create_command, static) = { "[mode ip] [secret <string>]", .function = memif_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * memif_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -268,13 +262,11 @@ memif_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (memif_delete_command, static) = { .path = "delete interface memif", .short_help = "delete interface memif {<interface> | sw_if_index <sw_idx>}", .function = memif_delete_command_fn, }; -/* *INDENT-ON* */ static u8 * format_memif_if_flags (u8 * s, va_list * args) @@ -396,7 +388,6 @@ memif_show_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "sockets\n"); vlib_cli_output (vm, " %-3s %-11s %s\n", "id", "listener", "filename"); - /* *INDENT-OFF* */ hash_foreach (sock_id, msf_idx, mm->socket_file_index_by_sock_id, ({ memif_socket_file_t *msf; @@ -412,17 +403,14 @@ memif_show_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output(vm, " %-3u %-11v %s\n", sock_id, s, filename); vec_reset_length (s); })); - /* *INDENT-ON* */ vec_free (s); vlib_cli_output (vm, "\n"); if (vec_len (hw_if_indices) == 0) { - /* *INDENT-OFF* */ pool_foreach (mif, mm->interfaces) vec_add1 (hw_if_indices, mif->hw_if_index); - /* *INDENT-ON* */ } for (hw_if_index = 0; hw_if_index < vec_len (hw_if_indices); hw_if_index++) @@ -457,7 +445,6 @@ memif_show_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, " remote-disc-reason \"%s\"", mif->remote_disc_string); - /* *INDENT-OFF* */ vec_foreach_index (i, mif->regions) { mr = vec_elt_at_index (mif->regions, i); @@ -478,20 +465,17 @@ memif_show_command_fn (vlib_main_t * vm, unformat_input_t * input, if (show_descr) vlib_cli_output (vm, " %U", format_memif_descriptor, mif, mq); } - /* *INDENT-ON* */ } done: vec_free (hw_if_indices); return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (memif_show_command, static) = { .path = "show memif", .short_help = "show memif [<interface>] [descriptors]", .function = memif_show_command_fn, }; -/* *INDENT-ON* */ clib_error_t * memif_cli_init (vlib_main_t * vm) diff --git a/src/plugins/memif/device.c b/src/plugins/memif/device.c index a7b6a98011a..017a001168b 100644 --- a/src/plugins/memif/device.c +++ b/src/plugins/memif/device.c @@ -741,7 +741,6 @@ memif_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index, u32 qid, return 0; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (memif_device_class) = { .name = "memif", .format_device_name = format_memif_device_name, @@ -755,7 +754,6 @@ VNET_DEVICE_CLASS (memif_device_class) = { .rx_mode_change_function = memif_interface_rx_mode_change, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c index 5440c5909d4..7e3dd44db2c 100644 --- a/src/plugins/memif/memif.c +++ b/src/plugins/memif/memif.c @@ -148,7 +148,6 @@ memif_disconnect (memif_if_t * mif, clib_error_t * err) vlib_worker_thread_barrier_sync (vm); } - /* *INDENT-OFF* */ vec_foreach_index (i, mif->rx_queues) { mq = vec_elt_at_index (mif->rx_queues, i); @@ -163,7 +162,6 @@ memif_disconnect (memif_if_t * mif, clib_error_t * err) } vnet_hw_if_unregister_all_rx_queues (vnm, mif->hw_if_index); - /* *INDENT-OFF* */ vec_foreach_index (i, mif->tx_queues) { mq = vec_elt_at_index (mif->tx_queues, i); @@ -200,7 +198,6 @@ memif_disconnect (memif_if_t * mif, clib_error_t * err) if (mr->fd > -1) close (mr->fd); } - /* *INDENT-ON* */ vec_free (mif->regions); vec_free (mif->remote_name); vec_free (mif->remote_if_name); @@ -265,7 +262,6 @@ memif_connect (memif_if_t * mif) vec_free (mif->local_disc_string); vec_free (mif->remote_disc_string); - /* *INDENT-OFF* */ vec_foreach (mr, mif->regions) { if (mr->shm) @@ -284,7 +280,6 @@ memif_connect (memif_if_t * mif) goto error; } } - /* *INDENT-ON* */ template.read_function = memif_int_fd_read_ready; template.write_function = memif_int_fd_write_ready; @@ -296,7 +291,6 @@ memif_connect (memif_if_t * mif) if (with_barrier) vlib_worker_thread_barrier_sync (vm); - /* *INDENT-OFF* */ vec_foreach_index (i, mif->tx_queues) { memif_queue_t *mq = vec_elt_at_index (mif->tx_queues, i); @@ -434,7 +428,6 @@ memif_connect (memif_if_t * mif) vnet_hw_if_rx_queue_set_int_pending (vnm, qi); } } - /* *INDENT-ON* */ if (1 << max_log2_ring_sz > vec_len (mm->per_thread_data[0].desc_data)) { @@ -534,7 +527,6 @@ memif_init_regions_and_queues (memif_if_t * mif) if (mif->flags & MEMIF_IF_FLAG_ZERO_COPY) { vlib_buffer_pool_t *bp; - /* *INDENT-OFF* */ vec_foreach (bp, vm->buffer_main->buffer_pools) { vlib_physmem_map_t *pm; @@ -545,7 +537,6 @@ memif_init_regions_and_queues (memif_if_t * mif) r->shm = pm->base; r->is_external = 1; } - /* *INDENT-ON* */ } for (i = 0; i < mif->run.num_s2m_rings; i++) @@ -590,7 +581,6 @@ memif_init_regions_and_queues (memif_if_t * mif) vec_validate_aligned (mif->tx_queues, mif->run.num_s2m_rings - 1, CLIB_CACHE_LINE_BYTES); - /* *INDENT-OFF* */ vec_foreach_index (i, mif->tx_queues) { memif_queue_t *mq = vec_elt_at_index (mif->tx_queues, i); @@ -611,13 +601,11 @@ memif_init_regions_and_queues (memif_if_t * mif) vec_validate_aligned (mq->buffers, 1 << mq->log2_ring_size, CLIB_CACHE_LINE_BYTES); } - /* *INDENT-ON* */ ASSERT (mif->rx_queues == 0); vec_validate_aligned (mif->rx_queues, mif->run.num_m2s_rings - 1, CLIB_CACHE_LINE_BYTES); - /* *INDENT-OFF* */ vec_foreach_index (i, mif->rx_queues) { memif_queue_t *mq = vec_elt_at_index (mif->rx_queues, i); @@ -637,7 +625,6 @@ memif_init_regions_and_queues (memif_if_t * mif) vec_validate_aligned (mq->buffers, 1 << mq->log2_ring_size, CLIB_CACHE_LINE_BYTES); } - /* *INDENT-ON* */ return 0; @@ -688,7 +675,6 @@ memif_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) } last_run_duration = start_time = vlib_time_now (vm); - /* *INDENT-OFF* */ pool_foreach (mif, mm->interfaces) { memif_socket_file_t * msf = vec_elt_at_index (mm->socket_files, mif->socket_file_index); @@ -741,7 +727,6 @@ memif_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) } } } - /* *INDENT-ON* */ last_run_duration = vlib_time_now (vm) - last_run_duration; } return 0; @@ -934,10 +919,8 @@ memif_delete_if (vlib_main_t *vm, memif_if_t *mif) if (msf->is_listener) { int i; - /* *INDENT-OFF* */ vec_foreach_index (i, msf->pending_clients) memif_socket_close (msf->pending_clients + i); - /* *INDENT-ON* */ memif_socket_close (&msf->sock); vec_free (msf->pending_clients); } @@ -966,13 +949,11 @@ memif_delete_if (vlib_main_t *vm, memif_if_t *mif) return 0; } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (memif_ip_hw_if_class, static) = { .name = "memif-ip", .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P, .tx_hash_fn_type = VNET_HASH_FN_TYPE_IP, }; -/* *INDENT-ON* */ static void memif_prepare_dma_args (vlib_dma_config_t *args) @@ -1245,12 +1226,10 @@ memif_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (memif_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Packet Memory Interface (memif) -- Experimental", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/memif/memif_api.c b/src/plugins/memif/memif_api.c index 16d3686d3d4..16a52ffc0dc 100644 --- a/src/plugins/memif/memif_api.c +++ b/src/plugins/memif/memif_api.c @@ -195,12 +195,10 @@ vl_api_memif_create_t_handler (vl_api_memif_create_t * mp) vec_free (args.secret); reply: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_MEMIF_CREATE_REPLY, ({ rmp->sw_if_index = htonl (args.sw_if_index); })); - /* *INDENT-ON* */ } /** @@ -397,7 +395,6 @@ vl_api_memif_dump_t_handler (vl_api_memif_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (mif, mm->interfaces) { swif = vnet_get_sw_interface (vnm, mif->sw_if_index); @@ -409,7 +406,6 @@ vl_api_memif_dump_t_handler (vl_api_memif_dump_t * mp) send_memif_details (reg, mif, swif, if_name, mp->context); vec_set_len (if_name, 0); } - /* *INDENT-ON* */ vec_free (if_name); } @@ -453,7 +449,6 @@ void if (!reg) return; - /* *INDENT-OFF* */ hash_foreach (sock_id, msf_idx, mm->socket_file_index_by_sock_id, ({ memif_socket_file_t *msf; @@ -463,7 +458,6 @@ void filename = msf->filename; send_memif_socket_filename_details(reg, sock_id, filename, mp->context); })); - /* *INDENT-ON* */ } /* Set up the API message handling tables */ diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c index 1c678397ad7..70933f4aa9d 100644 --- a/src/plugins/memif/node.c +++ b/src/plugins/memif/node.c @@ -1359,7 +1359,6 @@ VLIB_NODE_FN (memif_input_node) (vlib_main_t * vm, return n_rx; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (memif_input_node) = { .name = "memif-input", .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, @@ -1371,7 +1370,6 @@ VLIB_REGISTER_NODE (memif_input_node) = { .error_counters = memif_input_error_counters, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/memif/socket.c b/src/plugins/memif/socket.c index adf13c0f7db..001f26f13ef 100644 --- a/src/plugins/memif/socket.c +++ b/src/plugins/memif/socket.c @@ -445,14 +445,12 @@ memif_msg_receive (memif_if_t ** mifp, clib_socket_t * sock, clib_file_t * uf) if ((err = memif_init_regions_and_queues (mif))) goto error; memif_msg_enq_init (mif); - /* *INDENT-OFF* */ vec_foreach_index (i, mif->regions) memif_msg_enq_add_region (mif, i); vec_foreach_index (i, mif->tx_queues) memif_msg_enq_add_ring (mif, i, MEMIF_RING_S2M); vec_foreach_index (i, mif->rx_queues) memif_msg_enq_add_ring (mif, i, MEMIF_RING_M2S); - /* *INDENT-ON* */ memif_msg_enq_connect (mif); break; diff --git a/src/plugins/nat/det44/det44.c b/src/plugins/nat/det44/det44.c index a8aea28d948..f251bc9c608 100644 --- a/src/plugins/nat/det44/det44.c +++ b/src/plugins/nat/det44/det44.c @@ -29,7 +29,6 @@ det44_main_t det44_main; -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip4_det44_in2out, static) = { .arc_name = "ip4-unicast", .node_name = "det44-in2out", @@ -47,7 +46,6 @@ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Deterministic NAT (CGN)", }; -/* *INDENT-ON* */ void det44_add_del_addr_to_fib (ip4_address_t * addr, u8 p_len, u32 sw_if_index, @@ -150,14 +148,12 @@ snat_det_add_map (ip4_address_t * in_addr, u8 in_plen, } /* Add/del external address range to FIB */ - /* *INDENT-OFF* */ pool_foreach (i, dm->interfaces) { if (det44_interface_is_inside(i)) continue; det44_add_del_addr_to_fib(out_addr, out_plen, i->sw_if_index, is_add); goto out; } - /* *INDENT-ON* */ out: return 0; } @@ -203,7 +199,6 @@ det44_interface_add_del (u32 sw_if_index, u8 is_inside, int is_del) // rather make a structure and when enable call is used // then register nodes - /* *INDENT-OFF* */ pool_foreach (tmp, dm->interfaces) { if (tmp->sw_if_index == sw_if_index) { @@ -211,7 +206,6 @@ det44_interface_add_del (u32 sw_if_index, u8 is_inside, int is_del) goto out; } } - /* *INDENT-ON* */ out: feature_name = is_inside ? "det44-in2out" : "det44-out2in"; @@ -270,7 +264,6 @@ out: // add/del outside interface fib to registry u8 found = 0; det44_fib_t *outside_fib; - /* *INDENT-OFF* */ vec_foreach (outside_fib, dm->outside_fibs) { if (outside_fib->fib_index == fib_index) @@ -292,7 +285,6 @@ out: break; } } - /* *INDENT-ON* */ if (!is_del && !found) { vec_add2 (dm->outside_fibs, outside_fib, 1); @@ -301,12 +293,10 @@ out: } // add/del outside address to FIB snat_det_map_t *mp; - /* *INDENT-OFF* */ pool_foreach (mp, dm->det_maps) { det44_add_del_addr_to_fib(&mp->out_addr, mp->out_plen, sw_if_index, !is_del); } - /* *INDENT-ON* */ } return 0; } @@ -441,12 +431,10 @@ det44_plugin_disable () } vec_free (interfaces); - /* *INDENT-OFF* */ pool_foreach (mp, dm->det_maps) { vec_free (mp->sessions); } - /* *INDENT-ON* */ det44_reset_timeouts (); @@ -479,7 +467,6 @@ det44_update_outside_fib (ip4_main_t * im, if (!vec_len (dm->outside_fibs)) return; - /* *INDENT-OFF* */ pool_foreach (i, dm->interfaces) { if (i->sw_if_index == sw_if_index) @@ -489,7 +476,6 @@ det44_update_outside_fib (ip4_main_t * im, match = 1; } } - /* *INDENT-ON* */ if (!match) return; diff --git a/src/plugins/nat/det44/det44.h b/src/plugins/nat/det44/det44.h index 7d290f4a956..e576bfb65e8 100644 --- a/src/plugins/nat/det44/det44.h +++ b/src/plugins/nat/det44/det44.h @@ -279,13 +279,11 @@ snat_det_map_by_user (ip4_address_t * user_addr) { det44_main_t *dm = &det44_main; snat_det_map_t *mp; - /* *INDENT-OFF* */ pool_foreach (mp, dm->det_maps) { if (is_addr_in_net(user_addr, &mp->in_addr, mp->in_plen)) return mp; } - /* *INDENT-ON* */ return 0; } @@ -294,13 +292,11 @@ snat_det_map_by_out (ip4_address_t * out_addr) { det44_main_t *dm = &det44_main; snat_det_map_t *mp; - /* *INDENT-OFF* */ pool_foreach (mp, dm->det_maps) { if (is_addr_in_net(out_addr, &mp->out_addr, mp->out_plen)) return mp; } - /* *INDENT-ON* */ return 0; } diff --git a/src/plugins/nat/det44/det44_api.c b/src/plugins/nat/det44/det44_api.c index 1486180aa99..c7e17dfd147 100644 --- a/src/plugins/nat/det44/det44_api.c +++ b/src/plugins/nat/det44/det44_api.c @@ -67,14 +67,12 @@ vl_api_det44_forward_t_handler (vl_api_det44_forward_t * mp) hi_port = lo_port + m->ports_per_host - 1; send_reply: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_DET44_FORWARD_REPLY, ({ rmp->out_port_lo = ntohs (lo_port); rmp->out_port_hi = ntohs (hi_port); clib_memcpy (rmp->out_addr, &out_addr, 4); })) - /* *INDENT-ON* */ } static void @@ -98,12 +96,10 @@ vl_api_det44_reverse_t_handler (vl_api_det44_reverse_t * mp) snat_det_reverse (m, &out_addr, htons (mp->out_port), &in_addr); send_reply: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_DET44_REVERSE_REPLY, ({ clib_memcpy (rmp->in_addr, &in_addr, 4); })) - /* *INDENT-ON* */ } static void @@ -139,10 +135,8 @@ vl_api_det44_map_dump_t_handler (vl_api_det44_map_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ vec_foreach(m, dm->det_maps) sent_det44_map_details(m, reg, mp->context); - /* *INDENT-ON* */ } static void @@ -328,12 +322,10 @@ vl_api_det44_interface_dump_t_handler (vl_api_det44_interface_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (i, dm->interfaces) { det44_send_interface_details(i, reg, mp->context); } - /* *INDENT-ON* */ } static void @@ -359,7 +351,6 @@ vl_api_det44_get_timeouts_t_handler (vl_api_det44_get_timeouts_t * mp) nat_timeouts_t timeouts; int rv = 0; timeouts = det44_get_timeouts (); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_DET44_GET_TIMEOUTS_REPLY, ({ rmp->udp = htonl (timeouts.udp); @@ -367,7 +358,6 @@ vl_api_det44_get_timeouts_t_handler (vl_api_det44_get_timeouts_t * mp) rmp->tcp_transitory = htonl (timeouts.tcp.transitory); rmp->icmp = htonl (timeouts.icmp); })) - /* *INDENT-ON* */ } /* @@ -412,14 +402,12 @@ vl_api_nat_det_forward_t_handler (vl_api_nat_det_forward_t * mp) hi_port = lo_port + m->ports_per_host - 1; send_reply: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_NAT_DET_FORWARD_REPLY, ({ rmp->out_port_lo = ntohs (lo_port); rmp->out_port_hi = ntohs (hi_port); clib_memcpy (rmp->out_addr, &out_addr, 4); })) - /* *INDENT-ON* */ } static void @@ -443,12 +431,10 @@ vl_api_nat_det_reverse_t_handler (vl_api_nat_det_reverse_t * mp) snat_det_reverse (m, &out_addr, htons (mp->out_port), &in_addr); send_reply: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_NAT_DET_REVERSE_REPLY, ({ clib_memcpy (rmp->in_addr, &in_addr, 4); })) - /* *INDENT-ON* */ } static void @@ -484,10 +470,8 @@ vl_api_nat_det_map_dump_t_handler (vl_api_nat_det_map_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ vec_foreach(m, dm->det_maps) sent_nat_det_map_details(m, reg, mp->context); - /* *INDENT-ON* */ } static void diff --git a/src/plugins/nat/det44/det44_in2out.c b/src/plugins/nat/det44/det44_in2out.c index 5fe4a9a0658..3f5e05a064c 100644 --- a/src/plugins/nat/det44/det44_in2out.c +++ b/src/plugins/nat/det44/det44_in2out.c @@ -1011,7 +1011,6 @@ VLIB_NODE_FN (det44_in2out_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (det44_in2out_node) = { .name = "det44-in2out", .vector_size = sizeof (u32), @@ -1028,7 +1027,6 @@ VLIB_REGISTER_NODE (det44_in2out_node) = { [DET44_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/det44/det44_inlines.h b/src/plugins/nat/det44/det44_inlines.h index aeb55b385d3..e5e70bbaebc 100644 --- a/src/plugins/nat/det44/det44_inlines.h +++ b/src/plugins/nat/det44/det44_inlines.h @@ -91,7 +91,6 @@ det44_translate (vlib_node_runtime_t * node, u32 sw_if_index0, if (sw_if_index == ~0) { // TODO: go over use cases - /* *INDENT-OFF* */ vec_foreach (outside_fib, dm->outside_fibs) { fei = fib_table_lookup (outside_fib->fib_index, &pfx); @@ -102,18 +101,15 @@ det44_translate (vlib_node_runtime_t * node, u32 sw_if_index0, break; } } - /* *INDENT-ON* */ } if (sw_if_index != ~0) { det44_interface_t *i; - /* *INDENT-OFF* */ pool_foreach (i, dm->interfaces) { /* NAT packet aimed at outside interface */ if ((det44_interface_is_outside (i)) && (sw_if_index == i->sw_if_index)) return 0; } - /* *INDENT-ON* */ } } return 1; diff --git a/src/plugins/nat/det44/det44_out2in.c b/src/plugins/nat/det44/det44_out2in.c index 4871e752db0..ab6acd4f8e9 100644 --- a/src/plugins/nat/det44/det44_out2in.c +++ b/src/plugins/nat/det44/det44_out2in.c @@ -818,7 +818,6 @@ VLIB_NODE_FN (det44_out2in_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (det44_out2in_node) = { .name = "det44-out2in", .vector_size = sizeof (u32), @@ -835,7 +834,6 @@ VLIB_REGISTER_NODE (det44_out2in_node) = { [DET44_OUT2IN_NEXT_ICMP_ERROR] = "ip4-icmp-error", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/dslite/dslite.c b/src/plugins/nat/dslite/dslite.c index 4fe4422df13..a2654b5a44b 100644 --- a/src/plugins/nat/dslite/dslite.c +++ b/src/plugins/nat/dslite/dslite.c @@ -101,7 +101,6 @@ dslite_init_datastructures (void) u32 b4_buckets = 128; u32 b4_memory_size = 64 << 20; - /* *INDENT-OFF* */ vec_foreach (td, dm->per_thread_data) { clib_bihash_init_24_8 (&td->in2out, "dslite in2out", translation_buckets, @@ -112,7 +111,6 @@ dslite_init_datastructures (void) clib_bihash_init_16_8 (&td->b4_hash, "dslite b4s", b4_buckets, b4_memory_size); } - /* *INDENT-ON* */ dm->is_enabled = 1; } @@ -281,13 +279,11 @@ format_dslite_ce_trace (u8 * s, va_list * args) VLIB_INIT_FUNCTION (dslite_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Dual-Stack Lite", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/dslite/dslite.h b/src/plugins/nat/dslite/dslite.h index 3c798bf54fe..f05670c9bf5 100644 --- a/src/plugins/nat/dslite/dslite.h +++ b/src/plugins/nat/dslite/dslite.h @@ -61,7 +61,6 @@ typedef struct }; } dslite_session_key_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { nat_session_key_t out2in; @@ -72,7 +71,6 @@ typedef CLIB_PACKED (struct u64 total_bytes; u32 total_pkts; }) dslite_session_t; -/* *INDENT-ON* */ typedef struct { diff --git a/src/plugins/nat/dslite/dslite_api.c b/src/plugins/nat/dslite/dslite_api.c index 420e8212ad9..4bb53c37660 100644 --- a/src/plugins/nat/dslite/dslite_api.c +++ b/src/plugins/nat/dslite/dslite_api.c @@ -53,13 +53,11 @@ vl_api_dslite_get_aftr_addr_t_handler (vl_api_dslite_get_aftr_addr_t * mp) dslite_main_t *dm = &dslite_main; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_DSLITE_GET_AFTR_ADDR_REPLY, ({ memcpy (rmp->ip4_addr, &dm->aftr_ip4_addr.as_u8, 4); memcpy (rmp->ip6_addr, &dm->aftr_ip6_addr.as_u8, 16); })) - /* *INDENT-ON* */ } static void @@ -88,13 +86,11 @@ vl_api_dslite_get_b4_addr_t_handler (vl_api_dslite_get_b4_addr_t * mp) dslite_main_t *dm = &dslite_main; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_DSLITE_GET_B4_ADDR_REPLY, ({ memcpy (rmp->ip4_addr, &dm->b4_ip4_addr.as_u8, 4); memcpy (rmp->ip6_addr, &dm->b4_ip6_addr.as_u8, 16); })) - /* *INDENT-ON* */ } static void @@ -154,12 +150,10 @@ vl_api_dslite_address_dump_t_handler (vl_api_dslite_address_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ vec_foreach (a, dm->pool.pool_addr) { send_dslite_address_details (a, reg, mp->context); } - /* *INDENT-ON* */ } /* API definitions */ diff --git a/src/plugins/nat/dslite/dslite_ce_decap.c b/src/plugins/nat/dslite/dslite_ce_decap.c index f36a87f8bc1..b5bdafc0e26 100644 --- a/src/plugins/nat/dslite/dslite_ce_decap.c +++ b/src/plugins/nat/dslite/dslite_ce_decap.c @@ -114,7 +114,6 @@ VLIB_NODE_FN (dslite_ce_decap_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dslite_ce_decap_node) = { .name = "dslite-ce-decap", .vector_size = sizeof (u32), @@ -130,7 +129,6 @@ VLIB_REGISTER_NODE (dslite_ce_decap_node) = { [DSLITE_IN2OUT_NEXT_IP6_ICMP] = "ip6-icmp-input", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/dslite/dslite_ce_encap.c b/src/plugins/nat/dslite/dslite_ce_encap.c index d8d0e400919..19596efd32d 100644 --- a/src/plugins/nat/dslite/dslite_ce_encap.c +++ b/src/plugins/nat/dslite/dslite_ce_encap.c @@ -107,7 +107,6 @@ VLIB_NODE_FN (dslite_ce_encap_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dslite_ce_encap_node) = { .name = "dslite-ce-encap", .vector_size = sizeof (u32), @@ -122,7 +121,6 @@ VLIB_REGISTER_NODE (dslite_ce_encap_node) = { [DSLITE_CE_ENCAP_NEXT_IP6_LOOKUP] = "ip6-lookup", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/dslite/dslite_cli.c b/src/plugins/nat/dslite/dslite_cli.c index 193cb3fe248..8ed9deb2a2d 100644 --- a/src/plugins/nat/dslite/dslite_cli.c +++ b/src/plugins/nat/dslite/dslite_cli.c @@ -95,12 +95,10 @@ dslite_show_pool_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "DS-Lite pool:"); - /* *INDENT-OFF* */ vec_foreach (a, dm->pool.pool_addr) { vlib_cli_output (vm, "%U", format_ip4_address, &a->addr); } - /* *INDENT-ON* */ return 0; } @@ -267,7 +265,6 @@ dslite_show_sessions_command_fn (vlib_main_t * vm, dslite_per_thread_data_t *td; dslite_b4_t *b4; - /* *INDENT-OFF* */ vec_foreach (td, dm->per_thread_data) { pool_foreach (b4, td->b4s) @@ -275,12 +272,10 @@ dslite_show_sessions_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%U", format_dslite_b4, td, b4); } } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ /*? * @cliexpar @@ -394,7 +389,6 @@ VLIB_CLI_COMMAND (dslite_show_sessions, static) = { .function = dslite_show_sessions_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/dslite/dslite_in2out.c b/src/plugins/nat/dslite/dslite_in2out.c index 409c59c218c..522c3cf4123 100644 --- a/src/plugins/nat/dslite/dslite_in2out.c +++ b/src/plugins/nat/dslite/dslite_in2out.c @@ -460,7 +460,6 @@ VLIB_NODE_FN (dslite_in2out_node) (vlib_main_t * vm, return dslite_in2out_node_fn_inline (vm, node, frame, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dslite_in2out_node) = { .name = "dslite-in2out", .vector_size = sizeof (u32), @@ -477,7 +476,6 @@ VLIB_REGISTER_NODE (dslite_in2out_node) = { [DSLITE_IN2OUT_NEXT_SLOWPATH] = "dslite-in2out-slowpath", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (dslite_in2out_slowpath_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -486,7 +484,6 @@ VLIB_NODE_FN (dslite_in2out_slowpath_node) (vlib_main_t * vm, return dslite_in2out_node_fn_inline (vm, node, frame, 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dslite_in2out_slowpath_node) = { .name = "dslite-in2out-slowpath", .vector_size = sizeof (u32), @@ -503,7 +500,6 @@ VLIB_REGISTER_NODE (dslite_in2out_slowpath_node) = { [DSLITE_IN2OUT_NEXT_SLOWPATH] = "dslite-in2out-slowpath", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/dslite/dslite_out2in.c b/src/plugins/nat/dslite/dslite_out2in.c index c2fa767bd7d..531bbb468bb 100644 --- a/src/plugins/nat/dslite/dslite_out2in.c +++ b/src/plugins/nat/dslite/dslite_out2in.c @@ -266,7 +266,6 @@ VLIB_NODE_FN (dslite_out2in_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (dslite_out2in_node) = { .name = "dslite-out2in", .vector_size = sizeof (u32), @@ -282,7 +281,6 @@ VLIB_REGISTER_NODE (dslite_out2in_node) = { [DSLITE_OUT2IN_NEXT_IP6_LOOKUP] = "ip6-lookup", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/lib/alloc.h b/src/plugins/nat/lib/alloc.h index 0c302bf4cfb..882809e829c 100644 --- a/src/plugins/nat/lib/alloc.h +++ b/src/plugins/nat/lib/alloc.h @@ -42,14 +42,12 @@ struct nat_ip4_pool_addr_s { ip4_address_t addr; u32 fib_index; -/* *INDENT-OFF* */ #define _(N, i, n, s) \ u16 busy_##n##_ports; \ u16 * busy_##n##_ports_per_thread; \ uword * busy_##n##_port_bitmap; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ }; struct nat_ip4_addr_port_s diff --git a/src/plugins/nat/lib/ipfix_logging.c b/src/plugins/nat/lib/ipfix_logging.c index 5f40db8d81c..593fa09f7e2 100644 --- a/src/plugins/nat/lib/ipfix_logging.c +++ b/src/plugins/nat/lib/ipfix_logging.c @@ -1630,11 +1630,9 @@ ipfix_flush_process (vlib_main_t *vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat_ipfix_flush_node) = { .function = ipfix_flush_process, .name = "nat-ipfix-flush", .type = VLIB_NODE_TYPE_INPUT, .state = VLIB_NODE_STATE_INTERRUPT, }; -/* *INDENT-ON* */ diff --git a/src/plugins/nat/nat44-ei/nat44_ei_ha.c b/src/plugins/nat/nat44-ei/nat44_ei_ha.c index 39bce255bd6..9546a595cc2 100644 --- a/src/plugins/nat/nat44-ei/nat44_ei_ha.c +++ b/src/plugins/nat/nat44-ei/nat44_ei_ha.c @@ -926,14 +926,12 @@ nat_ha_worker_fn (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat_ha_worker_node) = { .function = nat_ha_worker_fn, .type = VLIB_NODE_TYPE_INPUT, .state = VLIB_NODE_STATE_INTERRUPT, .name = "nat44-ei-ha-worker", }; -/* *INDENT-ON* */ /* periodically send interrupt to each thread */ static uword @@ -969,13 +967,11 @@ nat_ha_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat_ha_process_node) = { .function = nat_ha_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "nat44-ei-ha-process", }; -/* *INDENT-ON* */ void nat_ha_get_resync_status (u8 * in_resync, u32 * resync_ack_missed) @@ -1166,7 +1162,6 @@ nat_ha_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat_ha_node) = { .function = nat_ha_node_fn, .name = "nat44-ei-ha", @@ -1181,7 +1176,6 @@ VLIB_REGISTER_NODE (nat_ha_node) = { [NAT_HA_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ typedef struct { @@ -1286,7 +1280,6 @@ nat_ha_resync (u32 client_index, u32 pid, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat_ha_handoff_node) = { .function = nat_ha_handoff_node_fn, .name = "nat44-ei-ha-handoff", @@ -1300,7 +1293,6 @@ VLIB_REGISTER_NODE (nat_ha_handoff_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/nat64/nat64.c b/src/plugins/nat/nat64/nat64.c index 79e9da03a1e..950eea60e5e 100644 --- a/src/plugins/nat/nat64/nat64.c +++ b/src/plugins/nat/nat64/nat64.c @@ -26,7 +26,6 @@ nat64_main_t nat64_main; -/* *INDENT-OFF* */ /* Hook up input features */ VNET_FEATURE_INIT (nat64_in2out, static) = { .arc_name = "ip6-unicast", @@ -62,7 +61,6 @@ static u8 well_known_prefix[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -/* *INDENT-ON* */ #define nat_elog_str(_str) \ do \ @@ -171,14 +169,12 @@ nat64_get_worker_out2in (vlib_buffer_t * b, ip4_header_t * ip) clib_memset (&daddr, 0, sizeof (daddr)); daddr.ip4.as_u32 = ip->dst_address.as_u32; - /* *INDENT-OFF* */ vec_foreach (db, nm->db) { bibe = nat64_db_bib_entry_find (db, &daddr, 0, ip->protocol, 0, 0); if (bibe) return (u32) (db - nm->db); } - /* *INDENT-ON* */ return vlib_get_thread_index (); } @@ -296,12 +292,10 @@ nat64_init (vlib_main_t * vm) for (i = 0; i < nm->num_workers; i++) bitmap = clib_bitmap_set (bitmap, i, 1); - /* *INDENT-OFF* */ clib_bitmap_foreach (i, bitmap) { vec_add1(nm->workers, i); } - /* *INDENT-ON* */ clib_bitmap_free (bitmap); @@ -337,7 +331,6 @@ nat64_init_hash (nat64_config_t c) vec_validate (nm->db, tm->n_vlib_mains - 1); - /* *INDENT-OFF* */ vec_foreach (db, nm->db) { if (nat64_db_init (db, c, nat64_free_out_addr_and_port)) @@ -346,7 +339,6 @@ nat64_init_hash (nat64_config_t c) rv = 1; } } - /* *INDENT-ON* */ return rv; } @@ -358,7 +350,6 @@ nat64_free_hash () nat64_db_t *db; int rv = 0; - /* *INDENT-OFF* */ vec_foreach (db, nm->db) { if (nat64_db_free (db)) @@ -367,7 +358,6 @@ nat64_free_hash () rv = 1; } } - /* *INDENT-ON* */ vec_free (nm->db); @@ -422,7 +412,6 @@ nat64_add_del_pool_addr (u32 thread_index, if (a->fib_index != ~0) fib_table_unlock (a->fib_index, FIB_PROTOCOL_IP6, nm->fib_src_hi); /* Delete sessions using address */ - /* *INDENT-OFF* */ vec_foreach (db, nm->db) { nat64_db_free_out_addr (thread_index, db, &a->addr); @@ -431,12 +420,10 @@ nat64_add_del_pool_addr (u32 thread_index, vlib_set_simple_counter (&nm->total_sessions, db - nm->db, 0, db->st.st_entries_num); } - /* *INDENT-ON* */ vec_del1 (nm->addr_pool, i); } /* Add/del external address to FIB */ - /* *INDENT-OFF* */ pool_foreach (interface, nm->interfaces) { if (nat64_interface_is_inside(interface)) @@ -445,7 +432,6 @@ nat64_add_del_pool_addr (u32 thread_index, nat64_add_del_addr_to_fib (addr, 32, interface->sw_if_index, is_add); break; } - /* *INDENT-ON* */ return 0; } @@ -456,13 +442,11 @@ nat64_pool_addr_walk (nat64_pool_addr_walk_fn_t fn, void *ctx) nat64_main_t *nm = &nat64_main; nat64_address_t *a = 0; - /* *INDENT-OFF* */ vec_foreach (a, nm->addr_pool) { if (fn (a, ctx)) break; }; - /* *INDENT-ON* */ } int @@ -560,7 +544,6 @@ nat64_interface_add_del (u32 sw_if_index, u8 is_inside, u8 is_add) // TODO: is enabled ? we can't signal if it is not /* Check if interface already exists */ - /* *INDENT-OFF* */ pool_foreach (i, nm->interfaces) { if (i->sw_if_index == sw_if_index) @@ -569,7 +552,6 @@ nat64_interface_add_del (u32 sw_if_index, u8 is_inside, u8 is_add) break; } } - /* *INDENT-ON* */ if (is_add) { @@ -610,10 +592,8 @@ nat64_interface_add_del (u32 sw_if_index, u8 is_inside, u8 is_add) if (!is_inside) { - /* *INDENT-OFF* */ vec_foreach (ap, nm->addr_pool) nat64_add_del_addr_to_fib (&ap->addr, 32, sw_if_index, is_add); - /* *INDENT-ON* */ } if (nm->num_workers > 1) @@ -655,13 +635,11 @@ nat64_interfaces_walk (nat64_interface_walk_fn_t fn, void *ctx) nat64_main_t *nm = &nat64_main; nat64_interface_t *i = 0; - /* *INDENT-OFF* */ pool_foreach (i, nm->interfaces) { if (fn (i, ctx)) break; } - /* *INDENT-ON* */ } // TODO: plugin independent @@ -836,7 +814,6 @@ nat64_static_bib_worker_fn (vlib_main_t * vm, vlib_node_runtime_t * rt, nat64_db_bib_entry_t *bibe; ip46_address_t addr; - /* *INDENT-OFF* */ pool_foreach (static_bib, nm->static_bibs) { if ((static_bib->thread_index != thread_index) || (static_bib->done)) @@ -873,21 +850,18 @@ nat64_static_bib_worker_fn (vlib_main_t * vm, vlib_node_runtime_t * rt, static_bib->done = 1; } - /* *INDENT-ON* */ return 0; } static vlib_node_registration_t nat64_static_bib_worker_node; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat64_static_bib_worker_node, static) = { .function = nat64_static_bib_worker_fn, .type = VLIB_NODE_TYPE_INPUT, .state = VLIB_NODE_STATE_INTERRUPT, .name = "nat64-static-bib-worker", }; -/* *INDENT-ON* */ int nat64_add_del_static_bib_entry (ip6_address_t * in_addr, @@ -991,7 +965,6 @@ nat64_add_del_static_bib_entry (ip6_address_t * in_addr, if (nm->num_workers) { - /* *INDENT-OFF* */ pool_foreach (static_bib, nm->static_bibs) { if (static_bib->done) @@ -999,7 +972,6 @@ nat64_add_del_static_bib_entry (ip6_address_t * in_addr, } vec_foreach (index, to_be_free) pool_put_index (nm->static_bibs, index[0]); - /* *INDENT-ON* */ vec_free (to_be_free); pool_get (nm->static_bibs, static_bib); static_bib->in_addr.as_u64[0] = in_addr->as_u64[0]; @@ -1272,13 +1244,11 @@ nat64_prefix_walk (nat64_prefix_walk_fn_t fn, void *ctx) nat64_main_t *nm = &nat64_main; nat64_prefix_t *p = 0; - /* *INDENT-OFF* */ vec_foreach (p, nm->pref64) { if (fn (p, ctx)) break; }; - /* *INDENT-ON* */ } void @@ -1287,7 +1257,6 @@ nat64_compose_ip6 (ip6_address_t * ip6, ip4_address_t * ip4, u32 fib_index) nat64_main_t *nm = &nat64_main; nat64_prefix_t *p, *gp = 0, *prefix = 0; - /* *INDENT-OFF* */ vec_foreach (p, nm->pref64) { if (p->fib_index == fib_index) @@ -1299,7 +1268,6 @@ nat64_compose_ip6 (ip6_address_t * ip6, ip4_address_t * ip4, u32 fib_index) if (p->fib_index == 0) gp = p; }; - /* *INDENT-ON* */ if (!prefix) prefix = gp; @@ -1358,7 +1326,6 @@ nat64_extract_ip4 (ip6_address_t * ip6, ip4_address_t * ip4, u32 fib_index) nat64_prefix_t *p, *gp = 0; u8 plen = 0; - /* *INDENT-OFF* */ vec_foreach (p, nm->pref64) { if (p->fib_index == fib_index) @@ -1370,7 +1337,6 @@ nat64_extract_ip4 (ip6_address_t * ip6, ip4_address_t * ip4, u32 fib_index) if (p->vrf_id == 0) gp = p; }; - /* *INDENT-ON* */ if (!plen) { @@ -1445,14 +1411,12 @@ nat64_expire_worker_walk_fn (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat64_expire_worker_walk_node, static) = { .function = nat64_expire_worker_walk_fn, .type = VLIB_NODE_TYPE_INPUT, .state = VLIB_NODE_STATE_INTERRUPT, .name = "nat64-expire-worker-walk", }; -/* *INDENT-ON* */ /** * @brief Centralized process to drive per worker expire walk. @@ -1580,12 +1544,10 @@ nat64_plugin_disable () } nm->enabled = 0; - /* *INDENT-OFF* */ pool_foreach (i, nm->interfaces) { vec_add1 (interfaces, *i); } - /* *INDENT-ON* */ vec_foreach (i, interfaces) { rv = nat64_interface_add_del (i->sw_if_index, i->flags, 0); diff --git a/src/plugins/nat/nat64/nat64.h b/src/plugins/nat/nat64/nat64.h index 1180f9df778..9eb8d915390 100644 --- a/src/plugins/nat/nat64/nat64.h +++ b/src/plugins/nat/nat64/nat64.h @@ -93,14 +93,12 @@ typedef struct { ip4_address_t addr; u32 fib_index; -/* *INDENT-OFF* */ #define _(N, i, n, s) \ u16 busy_##n##_ports; \ u16 * busy_##n##_ports_per_thread; \ u32 busy_##n##_port_refcounts[65535]; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ } nat64_address_t; typedef struct diff --git a/src/plugins/nat/nat64/nat64_api.c b/src/plugins/nat/nat64/nat64_api.c index e64b6434fd2..87cca01b59b 100644 --- a/src/plugins/nat/nat64/nat64_api.c +++ b/src/plugins/nat/nat64/nat64_api.c @@ -69,7 +69,6 @@ vl_api_nat64_get_timeouts_t_handler (vl_api_nat64_get_timeouts_t * mp) vl_api_nat64_get_timeouts_reply_t *rmp; int rv = 0; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_NAT64_GET_TIMEOUTS_REPLY, ({ rmp->udp = htonl (nm->udp_timeout); @@ -77,7 +76,6 @@ vl_api_nat64_get_timeouts_t_handler (vl_api_nat64_get_timeouts_t * mp) rmp->tcp_transitory = htonl (nm->tcp_trans_timeout); rmp->icmp = htonl (nm->icmp_timeout); })) - /* *INDENT-ON* */ } static void @@ -298,10 +296,8 @@ vl_api_nat64_bib_dump_t_handler (vl_api_nat64_bib_dump_t * mp) .context = mp->context, }; - /* *INDENT-OFF* */ vec_foreach (db, nm->db) nat64_db_bib_walk (db, mp->proto, nat64_api_bib_walk, &ctx); - /* *INDENT-ON* */ } static int @@ -356,13 +352,11 @@ vl_api_nat64_st_dump_t_handler (vl_api_nat64_st_dump_t * mp) .context = mp->context, }; - /* *INDENT-OFF* */ vec_foreach (db, nm->db) { ctx.db = db; nat64_db_st_walk (db, mp->proto, nat64_api_st_walk, &ctx); } - /* *INDENT-ON* */ } static void diff --git a/src/plugins/nat/nat64/nat64_cli.c b/src/plugins/nat/nat64/nat64_cli.c index 3af715c2457..2cef71080f9 100644 --- a/src/plugins/nat/nat64/nat64_cli.c +++ b/src/plugins/nat/nat64/nat64_cli.c @@ -484,10 +484,8 @@ nat64_show_bib_command_fn (vlib_main_t * vm, else vlib_cli_output (vm, "NAT64 %U BIB entries:", format_nat_protocol, proto); - /* *INDENT-OFF* */ vec_foreach (db, nm->db) nat64_db_bib_walk (db, p, nat64_cli_bib_walk, vm); - /* *INDENT-ON* */ done: unformat_free (line_input); @@ -586,13 +584,11 @@ nat64_show_st_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "NAT64 sessions:"); else vlib_cli_output (vm, "NAT64 %U sessions:", format_nat_protocol, proto); - /* *INDENT-OFF* */ vec_foreach (db, nm->db) { ctx.db = db; nat64_db_st_walk (db, p, nat64_cli_st_walk, &ctx); } - /* *INDENT-ON* */ done: unformat_free (line_input); @@ -775,7 +771,6 @@ done: return error; } -/* *INDENT-OFF* */ /*? * @cliexpar * @cliexstart{nat64 plugin} @@ -983,7 +978,6 @@ VLIB_CLI_COMMAND (nat64_add_interface_address_command, static) = { .short_help = "nat64 add interface address <interface> [del]", .function = nat64_add_interface_address_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/nat64/nat64_db.c b/src/plugins/nat/nat64/nat64_db.c index 24f7f571c01..e4e9febcb12 100644 --- a/src/plugins/nat/nat64/nat64_db.c +++ b/src/plugins/nat/nat64/nat64_db.c @@ -54,13 +54,11 @@ nat64_db_free (nat64_db_t * db) clib_bihash_free_48_8 (&db->st.in2out); clib_bihash_free_48_8 (&db->st.out2in); -/* *INDENT-OFF* */ #define _(N, i, n, s) \ pool_free (db->bib._##n##_bib); \ pool_free (db->st._##n##_st); foreach_nat_protocol #undef _ -/* *INDENT-ON* */ pool_free (db->bib._unk_proto_bib); pool_free (db->st._unk_proto_st); @@ -89,7 +87,6 @@ nat64_db_bib_entry_create (u32 thread_index, nat64_db_t * db, /* create pool entry */ switch (ip_proto_to_nat_proto (proto)) { -/* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ pool_get (db->bib._##n##_bib, bibe); \ @@ -97,7 +94,6 @@ nat64_db_bib_entry_create (u32 thread_index, nat64_db_t * db, break; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ default: pool_get (db->bib._unk_proto_bib, bibe); kv.value = bibe - db->bib._unk_proto_bib; @@ -155,7 +151,6 @@ nat64_db_bib_entry_free (u32 thread_index, nat64_db_t * db, switch (ip_proto_to_nat_proto (bibe->proto)) { -/* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ bib = db->bib._##n##_bib; \ @@ -163,7 +158,6 @@ nat64_db_bib_entry_free (u32 thread_index, nat64_db_t * db, break; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ default: bib = db->bib._unk_proto_bib; st = db->st._unk_proto_st; @@ -232,14 +226,12 @@ nat64_db_bib_entry_find (nat64_db_t * db, ip46_address_t * addr, u16 port, switch (ip_proto_to_nat_proto (proto)) { -/* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ bib = db->bib._##n##_bib; \ break; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ default: bib = db->bib._unk_proto_bib; break; @@ -271,7 +263,6 @@ nat64_db_bib_walk (nat64_db_t * db, u8 proto, if (proto == 255) { - /* *INDENT-OFF* */ #define _(N, i, n, s) \ bib = db->bib._##n##_bib; \ pool_foreach (bibe, bib) { \ @@ -285,32 +276,27 @@ nat64_db_bib_walk (nat64_db_t * db, u8 proto, if (fn (bibe, ctx)) return; } - /* *INDENT-ON* */ } else { switch (ip_proto_to_nat_proto (proto)) { - /* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ bib = db->bib._##n##_bib; \ break; foreach_nat_protocol #undef _ - /* *INDENT-ON* */ default: bib = db->bib._unk_proto_bib; break; } - /* *INDENT-OFF* */ pool_foreach (bibe, bib) { if (fn (bibe, ctx)) return; } - /* *INDENT-ON* */ } } @@ -321,14 +307,12 @@ nat64_db_bib_entry_by_index (nat64_db_t * db, u8 proto, u32 bibe_index) switch (ip_proto_to_nat_proto (proto)) { -/* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ bib = db->bib._##n##_bib; \ break; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ default: bib = db->bib._unk_proto_bib; break; @@ -345,7 +329,6 @@ nat64_db_st_walk (nat64_db_t * db, u8 proto, if (proto == 255) { - /* *INDENT-OFF* */ #define _(N, i, n, s) \ st = db->st._##n##_st; \ pool_foreach (ste, st) { \ @@ -359,32 +342,27 @@ nat64_db_st_walk (nat64_db_t * db, u8 proto, if (fn (ste, ctx)) return; } - /* *INDENT-ON* */ } else { switch (ip_proto_to_nat_proto (proto)) { - /* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ st = db->st._##n##_st; \ break; foreach_nat_protocol #undef _ - /* *INDENT-ON* */ default: st = db->st._unk_proto_st; break; } - /* *INDENT-OFF* */ pool_foreach (ste, st) { if (fn (ste, ctx)) return; } - /* *INDENT-ON* */ } } @@ -408,7 +386,6 @@ nat64_db_st_entry_create (u32 thread_index, nat64_db_t * db, /* create pool entry */ switch (ip_proto_to_nat_proto (bibe->proto)) { -/* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ pool_get (db->st._##n##_st, ste); \ @@ -417,7 +394,6 @@ nat64_db_st_entry_create (u32 thread_index, nat64_db_t * db, break; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ default: pool_get (db->st._unk_proto_st, ste); kv.value = ste - db->st._unk_proto_st; @@ -494,7 +470,6 @@ nat64_db_st_entry_free (u32 thread_index, switch (ip_proto_to_nat_proto (ste->proto)) { -/* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ st = db->st._##n##_st; \ @@ -502,7 +477,6 @@ nat64_db_st_entry_free (u32 thread_index, break; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ default: st = db->st._unk_proto_st; bib = db->bib._unk_proto_bib; @@ -579,14 +553,12 @@ nat64_db_st_entry_find (nat64_db_t * db, ip46_address_t * l_addr, switch (ip_proto_to_nat_proto (proto)) { -/* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ st = db->st._##n##_st; \ break; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ default: st = db->st._unk_proto_st; break; @@ -622,14 +594,12 @@ nat64_db_st_entry_get_index (nat64_db_t * db, nat64_db_st_entry_t * ste) switch (ip_proto_to_nat_proto (ste->proto)) { -/* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ st = db->st._##n##_st; \ break; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ default: st = db->st._unk_proto_st; return (u32) ~ 0; @@ -645,14 +615,12 @@ nat64_db_st_entry_by_index (nat64_db_t * db, u8 proto, u32 ste_index) switch (ip_proto_to_nat_proto (proto)) { -/* *INDENT-OFF* */ #define _(N, i, n, s) \ case NAT_PROTOCOL_##N: \ st = db->st._##n##_st; \ break; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ default: st = db->st._unk_proto_st; break; @@ -667,7 +635,6 @@ nad64_db_st_free_expired (u32 thread_index, nat64_db_t * db, u32 now) u32 *ste_to_be_free = 0, *ste_index; nat64_db_st_entry_t *st, *ste; -/* *INDENT-OFF* */ #define _(N, i, n, s) \ st = db->st._##n##_st; \ pool_foreach (ste, st) {\ @@ -692,7 +659,6 @@ nad64_db_st_free_expired (u32 thread_index, nat64_db_t * db, u32 now) nat64_db_st_entry_free (thread_index, db, pool_elt_at_index(st, ste_index[0])); vec_free (ste_to_be_free); -/* *INDENT-ON* */ } void @@ -704,7 +670,6 @@ nat64_db_free_out_addr (u32 thread_index, nat64_db_bib_entry_t *bibe; db->addr_free = 1; -/* *INDENT-OFF* */ #define _(N, i, n, s) \ st = db->st._##n##_st; \ pool_foreach (ste, st) { \ @@ -730,7 +695,6 @@ nat64_db_free_out_addr (u32 thread_index, pool_elt_at_index(st, ste_index[0])); vec_free (ste_to_be_free); db->addr_free = 0; -/* *INDENT-ON* */ } /* diff --git a/src/plugins/nat/nat64/nat64_db.h b/src/plugins/nat/nat64/nat64_db.h index c34b671999a..a7d433fb8ea 100644 --- a/src/plugins/nat/nat64/nat64_db.h +++ b/src/plugins/nat/nat64/nat64_db.h @@ -47,7 +47,6 @@ typedef struct }; } nat64_db_bib_entry_key_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { ip6_address_t in_addr; @@ -59,17 +58,14 @@ typedef CLIB_PACKED(struct u8 proto; u8 is_static; }) nat64_db_bib_entry_t; -/* *INDENT-ON* */ typedef struct { /* BIBs */ -/* *INDENT-OFF* */ #define _(N, i, n, s) \ nat64_db_bib_entry_t *_##n##_bib; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ nat64_db_bib_entry_t *_unk_proto_bib; /* BIB lookup */ @@ -98,7 +94,6 @@ typedef struct }; } nat64_db_st_entry_key_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { ip6_address_t in_r_addr; @@ -109,17 +104,14 @@ typedef CLIB_PACKED(struct u8 proto; u8 tcp_state; }) nat64_db_st_entry_t; -/* *INDENT-ON* */ typedef struct { /* session tables */ -/* *INDENT-OFF* */ #define _(N, i, n, s) \ nat64_db_st_entry_t *_##n##_st; foreach_nat_protocol #undef _ -/* *INDENT-ON* */ nat64_db_st_entry_t *_unk_proto_st; /* session lookup */ diff --git a/src/plugins/nat/nat64/nat64_in2out.c b/src/plugins/nat/nat64/nat64_in2out.c index 52d3c7f0a3b..63eab72a7fb 100644 --- a/src/plugins/nat/nat64/nat64_in2out.c +++ b/src/plugins/nat/nat64/nat64_in2out.c @@ -86,14 +86,12 @@ nat64_not_translate (u32 sw_if_index, ip6_address_t ip6_addr) ip_lookup_main_t *lm6 = &im6->lookup_main; ip_interface_address_t *ia = 0; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm6, ia, sw_if_index, 0, ({ addr = ip_interface_address_get_address (lm6, ia); if (0 == ip6_address_compare (addr, &ip6_addr)) return 1; })); - /* *INDENT-ON* */ return 0; } @@ -744,7 +742,6 @@ nat64_in2out_tcp_udp_hairpinning (vlib_main_t * vm, vlib_buffer_t * b, daddr.ip4.as_u32 = ste->out_r_addr.as_u32; bibe = 0; - /* *INDENT-OFF* */ vec_foreach (db, nm->db) { bibe = nat64_db_bib_entry_find (db, &daddr, dport, proto, 0, 0); @@ -752,7 +749,6 @@ nat64_in2out_tcp_udp_hairpinning (vlib_main_t * vm, vlib_buffer_t * b, if (bibe) break; } - /* *INDENT-ON* */ if (!bibe) return -1; @@ -851,7 +847,6 @@ nat64_in2out_icmp_hairpinning (vlib_main_t * vm, vlib_buffer_t * b, daddr.ip4.as_u32 = bibe->out_addr.as_u32; ste = 0; - /* *INDENT-OFF* */ vec_foreach (db, nm->db) { ste = nat64_db_st_entry_find (db, &saddr, &daddr, sport, dport, proto, @@ -860,7 +855,6 @@ nat64_in2out_icmp_hairpinning (vlib_main_t * vm, vlib_buffer_t * b, if (ste) break; } - /* *INDENT-ON* */ if (!ste) return -1; @@ -1006,7 +1000,6 @@ nat64_in2out_unk_proto_hairpinning (vlib_main_t * vm, vlib_buffer_t * b, daddr.ip4.as_u32 = ste->out_r_addr.as_u32; bibe = 0; - /* *INDENT-OFF* */ vec_foreach (db, nm->db) { bibe = nat64_db_bib_entry_find (db, &daddr, 0, proto, 0, 0); @@ -1014,7 +1007,6 @@ nat64_in2out_unk_proto_hairpinning (vlib_main_t * vm, vlib_buffer_t * b, if (bibe) break; } - /* *INDENT-ON* */ if (!bibe) return -1; @@ -1226,7 +1218,6 @@ VLIB_NODE_FN (nat64_in2out_node) (vlib_main_t * vm, return nat64_in2out_node_fn_inline (vm, node, frame, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat64_in2out_node) = { .name = "nat64-in2out", .vector_size = sizeof (u32), @@ -1243,7 +1234,6 @@ VLIB_REGISTER_NODE (nat64_in2out_node) = { [NAT64_IN2OUT_NEXT_SLOWPATH] = "nat64-in2out-slowpath", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (nat64_in2out_slowpath_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1252,7 +1242,6 @@ VLIB_NODE_FN (nat64_in2out_slowpath_node) (vlib_main_t * vm, return nat64_in2out_node_fn_inline (vm, node, frame, 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat64_in2out_slowpath_node) = { .name = "nat64-in2out-slowpath", .vector_size = sizeof (u32), @@ -1269,7 +1258,6 @@ VLIB_REGISTER_NODE (nat64_in2out_slowpath_node) = { [NAT64_IN2OUT_NEXT_SLOWPATH] = "nat64-in2out-slowpath", }, }; -/* *INDENT-ON* */ typedef struct nat64_in2out_frag_set_ctx_t_ { @@ -1384,7 +1372,6 @@ VLIB_NODE_FN (nat64_in2out_handoff_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat64_in2out_handoff_node) = { .name = "nat64-in2out-handoff", .vector_size = sizeof (u32), @@ -1399,7 +1386,6 @@ VLIB_REGISTER_NODE (nat64_in2out_handoff_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/nat64/nat64_out2in.c b/src/plugins/nat/nat64/nat64_out2in.c index 7cc2d3d3b70..a8faead4470 100644 --- a/src/plugins/nat/nat64/nat64_out2in.c +++ b/src/plugins/nat/nat64/nat64_out2in.c @@ -639,7 +639,6 @@ VLIB_NODE_FN (nat64_out2in_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat64_out2in_node) = { .name = "nat64-out2in", .vector_size = sizeof (u32), @@ -655,7 +654,6 @@ VLIB_REGISTER_NODE (nat64_out2in_node) = { [NAT64_OUT2IN_NEXT_IP4_LOOKUP] = "ip4-lookup", }, }; -/* *INDENT-ON* */ typedef struct nat64_out2in_frag_set_ctx_t_ { @@ -769,7 +767,6 @@ VLIB_NODE_FN (nat64_out2in_handoff_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat64_out2in_handoff_node) = { .name = "nat64-out2in-handoff", .vector_size = sizeof (u32), @@ -784,7 +781,6 @@ VLIB_REGISTER_NODE (nat64_out2in_handoff_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/nat66/nat66_in2out.c b/src/plugins/nat/nat66/nat66_in2out.c index 356100f89ef..aa2229e1997 100644 --- a/src/plugins/nat/nat66/nat66_in2out.c +++ b/src/plugins/nat/nat66/nat66_in2out.c @@ -94,14 +94,12 @@ nat66_not_translate (u32 rx_fib_index, ip6_address_t ip6_addr) sw_if_index = fib_entry_get_resolving_interface (fei); } - /* *INDENT-OFF* */ pool_foreach (i, nm->interfaces) { /* NAT packet aimed at outside interface */ if (nat66_interface_is_outside (i) && sw_if_index == i->sw_if_index) return 0; } - /* *INDENT-ON* */ return 1; } @@ -235,7 +233,6 @@ VLIB_NODE_FN (nat66_in2out_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat66_in2out_node) = { .name = "nat66-in2out", .vector_size = sizeof (u32), @@ -250,7 +247,6 @@ VLIB_REGISTER_NODE (nat66_in2out_node) = { [NAT66_IN2OUT_NEXT_IP6_LOOKUP] = "ip6-lookup", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nat/nat66/nat66_out2in.c b/src/plugins/nat/nat66/nat66_out2in.c index 9d44b4880eb..820e0c79033 100644 --- a/src/plugins/nat/nat66/nat66_out2in.c +++ b/src/plugins/nat/nat66/nat66_out2in.c @@ -193,7 +193,6 @@ VLIB_NODE_FN (nat66_out2in_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nat66_out2in_node) = { .name = "nat66-out2in", .vector_size = sizeof (u32), @@ -208,7 +207,6 @@ VLIB_REGISTER_NODE (nat66_out2in_node) = { [NAT66_OUT2IN_NEXT_IP6_LOOKUP] = "ip6-lookup", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_export.c b/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_export.c index cb2bb2107c9..d2b59ababa9 100644 --- a/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_export.c +++ b/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_export.c @@ -136,14 +136,12 @@ set_nsh_md2_ioam_export_ipfix_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_nsh_md2_ioam_ipfix_command, static) = { .path = "set nsh-md2-ioam export ipfix", .short_help = "set nsh-md2-ioam export ipfix collector <ip4-address> src <ip4-address>", .function = set_nsh_md2_ioam_export_ipfix_command_fn, }; -/* *INDENT-ON* */ #define IPFIX_NSH_MD2_IOAM_EXPORT_ID 274 // TODO: Move this to ioam/ioam_export.h diff --git a/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_export_thread.c b/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_export_thread.c index 54dc01bc021..40ff8c087dd 100644 --- a/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_export_thread.c +++ b/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_export_thread.c @@ -33,14 +33,12 @@ nsh_md2_ioam_export_process (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nsh_md2_ioam_export_process_node, static) = { .function = nsh_md2_ioam_export_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "nsh-md2-ioam-export-process", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_node.c b/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_node.c index 06874f64a73..b3bf8c59b96 100644 --- a/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_node.c +++ b/src/plugins/nsh/nsh-md2-ioam/export-nsh-md2-ioam/nsh_md2_ioam_node.c @@ -129,7 +129,6 @@ nsh_md2_ioam_export_node_fn (vlib_main_t * vm, /* * Node for iOAM export */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nsh_md2_ioam_export_node) = { .function = nsh_md2_ioam_export_node_fn, @@ -144,7 +143,6 @@ VLIB_REGISTER_NODE (nsh_md2_ioam_export_node) = .next_nodes = {[EXPORT_NEXT_NSH_MD2_IOAM_INPUT] = "nsh-pop"}, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nsh/nsh-md2-ioam/md2_ioam_transit.c b/src/plugins/nsh/nsh-md2-ioam/md2_ioam_transit.c index 876e00324e3..6c372a5bd4e 100644 --- a/src/plugins/nsh/nsh-md2-ioam/md2_ioam_transit.c +++ b/src/plugins/nsh/nsh-md2-ioam/md2_ioam_transit.c @@ -53,13 +53,11 @@ typedef enum } nsh_md2_ioam_encap_transit_next_t; -/* *INDENT-OFF* */ VNET_FEATURE_INIT (nsh_md2_ioam_encap_transit, static) = { .arc_name = "ip4-output", .node_name = "nsh-md2-ioam-encap-transit", }; -/* *INDENT-ON* */ static uword @@ -162,7 +160,6 @@ nsh_md2_ioam_encap_transit (vlib_main_t * vm, } extern u8 *format_nsh_node_map_trace (u8 * s, va_list * args); -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (nsh_md2_ioam_encap_transit_node) = { .function = nsh_md2_ioam_encap_transit, .name = "nsh-md2-ioam-encap-transit", @@ -181,7 +178,6 @@ VLIB_REGISTER_NODE (nsh_md2_ioam_encap_transit_node) = { }, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c b/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c index b401530c875..2aac6760546 100644 --- a/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c +++ b/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c @@ -449,7 +449,6 @@ static clib_error_t *nsh_md2_ioam_set_transit_rewrite_command_fn return rv; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (nsh_md2_ioam_set_transit_rewrite_cmd, static) = { .path = "set nsh-md2-ioam-transit", .short_help = "set nsh-ioam-lisp-gpe-transit dst-ip <dst_ip> [outer-fib-index <outer_fib_index>] [disable]", diff --git a/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam_trace.c b/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam_trace.c index aad3cffb1db..2c553b39e45 100644 --- a/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam_trace.c +++ b/src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam_trace.c @@ -38,7 +38,6 @@ typedef union } time_u64_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { u16 class; u8 type; @@ -48,7 +47,6 @@ typedef CLIB_PACKED(struct { u8 reserve; u32 elts[0]; /* Variable type. So keep it generic */ }) nsh_md2_ioam_trace_option_t; -/* *INDENT-ON* */ #define foreach_nsh_md2_ioam_trace_stats \ @@ -333,13 +331,11 @@ nsh_md2_ioam_show_ioam_trace_cmd_fn (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (nsh_md2_ioam_show_ioam_trace_cmd, static) = { .path = "show ioam nsh-lisp-gpe trace", .short_help = "iOAM trace statistics", .function = nsh_md2_ioam_show_ioam_trace_cmd_fn, }; -/* *INDENT-ON* */ int @@ -376,12 +372,10 @@ nsh_md2_ioam_trace_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (nsh_md2_ioam_trace_init) = { .runs_after = VLIB_INITS ("nsh_init", "nsh_md2_ioam_init"), }; -/* *INDENT-ON* */ int nsh_md2_ioam_trace_profile_cleanup (void) diff --git a/src/plugins/nsh/nsh.c b/src/plugins/nsh/nsh.c index de7bdcebfca..a2c24e27b26 100644 --- a/src/plugins/nsh/nsh.c +++ b/src/plugins/nsh/nsh.c @@ -164,14 +164,12 @@ format_nsh_tunnel_with_length (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (nsh_hw_class) = { .name = "NSH", .format_header = format_nsh_tunnel_with_length, .build_rewrite = default_build_rewrite, .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P, }; -/* *INDENT-ON* */ void nsh_md2_set_next_ioam_export_override (uword next) @@ -284,12 +282,10 @@ nsh_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (nsh_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Network Service Header (NSH)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nsh/nsh_api.c b/src/plugins/nsh/nsh_api.c index da6650dac7c..c7a686c8b83 100644 --- a/src/plugins/nsh/nsh_api.c +++ b/src/plugins/nsh/nsh_api.c @@ -64,13 +64,11 @@ format_nsh_name (u8 * s, va_list * args) return format (s, "nsh_tunnel%d", dev_instance); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (nsh_device_class, static) = { .name = "NSH", .format_device_name = format_nsh_name, .admin_up_down_function = nsh_interface_admin_up_down, }; -/* *INDENT-ON* */ static void send_nsh_entry_details (nsh_entry_t * t, vl_api_registration_t * rp, u32 context) diff --git a/src/plugins/nsh/nsh_cli.c b/src/plugins/nsh/nsh_cli.c index 7bcaf1c51ad..4288a9654c5 100644 --- a/src/plugins/nsh/nsh_cli.c +++ b/src/plugins/nsh/nsh_cli.c @@ -140,7 +140,6 @@ nsh_get_adj_by_sw_if_index (u32 sw_if_index) { adj_index_t ai = ~0; - /* *INDENT-OFF* */ pool_foreach_index (ai, adj_pool) { if (sw_if_index == adj_get_sw_if_index(ai)) @@ -148,7 +147,6 @@ nsh_get_adj_by_sw_if_index (u32 sw_if_index) return ai; } } - /* *INDENT-ON* */ return ~0; } @@ -290,7 +288,6 @@ nsh_add_del_map_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_nsh_map_command, static) = { .path = "create nsh map", .short_help = @@ -299,7 +296,6 @@ VLIB_CLI_COMMAND (create_nsh_map_command, static) = { " encap-vxlan4-intf <nn> | encap-vxlan6-intf <nn>| encap-eth-intf <nn> | encap-none]\n", .function = nsh_add_del_map_command_fn, }; -/* *INDENT-ON* */ /** * CLI command for showing the mapping between NSH entries @@ -322,12 +318,10 @@ show_nsh_map_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_nsh_map_command, static) = { .path = "show nsh map", .function = show_nsh_map_command_fn, }; -/* *INDENT-ON* */ /** * CLI command for adding NSH entry @@ -494,7 +488,6 @@ nsh_add_del_entry_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_nsh_entry_command, static) = { .path = "create nsh entry", .short_help = @@ -502,7 +495,6 @@ VLIB_CLI_COMMAND (create_nsh_entry_command, static) = { " [c1 <nn> c2 <nn> c3 <nn> c4 <nn>] [tlv-ioam-trace] [del]\n", .function = nsh_add_del_entry_command_fn, }; -/* *INDENT-ON* */ /* format from network order */ u8 * @@ -621,12 +613,10 @@ show_nsh_entry_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_nsh_entry_command, static) = { .path = "show nsh entry", .function = show_nsh_entry_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nsh/nsh_node.c b/src/plugins/nsh/nsh_node.c index a467d2c34c2..5c084985948 100644 --- a/src/plugins/nsh/nsh_node.c +++ b/src/plugins/nsh/nsh_node.c @@ -906,7 +906,6 @@ static char *nsh_node_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ /* register nsh-input node */ VLIB_REGISTER_NODE (nsh_input_node) = { @@ -978,7 +977,6 @@ VLIB_REGISTER_NODE (nsh_aware_vnf_proxy_node) = #undef _ }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nsh/nsh_output.c b/src/plugins/nsh/nsh_output.c index 3a3da02f764..9b7014a0ed0 100644 --- a/src/plugins/nsh/nsh_output.c +++ b/src/plugins/nsh/nsh_output.c @@ -366,7 +366,6 @@ VNET_FEATURE_INIT (nsh_interface_output, static) = { }; /* Built-in ip4 tx feature path definition */ -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (nsh_eth_output, static) = { .arc_name = "nsh-eth-output", @@ -379,7 +378,6 @@ VNET_FEATURE_INIT (nsh_eth_tx_drop, static) = .node_name = "error-drop", .runs_before = 0, /* not before any other features */ }; -/* *INDENT-ON* */ /** * @brief Next index values from the NSH incomplete adj node */ diff --git a/src/plugins/nsim/node.c b/src/plugins/nsim/node.c index 159db4a1cc7..a8ba909ab07 100644 --- a/src/plugins/nsim/node.c +++ b/src/plugins/nsim/node.c @@ -299,7 +299,6 @@ VLIB_NODE_FN (nsim_node) (vlib_main_t * vm, vlib_node_runtime_t * node, 0 /* is_trace */ , 1 /* is_cross_connect */ ); } -/* *INDENT-OFF* */ #ifndef CLIB_MARCH_VARIANT VLIB_REGISTER_NODE (nsim_node) = { @@ -319,7 +318,6 @@ VLIB_REGISTER_NODE (nsim_node) = }, }; #endif /* CLIB_MARCH_VARIANT */ -/* *INDENT-ON* */ VLIB_NODE_FN (nsim_feature_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -333,7 +331,6 @@ VLIB_NODE_FN (nsim_feature_node) (vlib_main_t * vm, 0 /* is_trace */ , 0 /* is_cross_connect */ ); } -/* *INDENT-OFF* */ #ifndef CLIB_MARCH_VARIANT VLIB_REGISTER_NODE (nsim_feature_node) = { @@ -353,7 +350,6 @@ VLIB_REGISTER_NODE (nsim_feature_node) = }, }; #endif /* CLIB_MARCH_VARIANT */ -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nsim/nsim.c b/src/plugins/nsim/nsim.c index 45b5e11a902..1c5b26bbaaa 100644 --- a/src/plugins/nsim/nsim.c +++ b/src/plugins/nsim/nsim.c @@ -334,7 +334,6 @@ VLIB_CONFIG_FUNCTION (nsim_config, "nsim"); * @cliend * @cliexcmd{nsim enable-disable <intfc> <intfc> [disable]} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (nsim_enable_disable_command, static) = { .path = "nsim cross-connect enable-disable", @@ -343,7 +342,6 @@ VLIB_CLI_COMMAND (nsim_enable_disable_command, static) = "<interface-name-2> [disable]", .function = nsim_cross_connect_enable_disable_command_fn, }; -/* *INDENT-ON* */ /* API message handler */ static void vl_api_nsim_cross_connect_enable_disable_t_handler @@ -523,7 +521,6 @@ nsim_output_feature_enable_disable_command_fn (vlib_main_t * vm, * @cliend * @cliexcmd{nsim output-feature enable-disable <intfc> [disable]} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (nsim_output_feature_enable_disable_command, static) = { .path = "nsim output-feature enable-disable", @@ -531,7 +528,6 @@ VLIB_CLI_COMMAND (nsim_output_feature_enable_disable_command, static) = "nsim output-feature enable-disable <interface-name> [disable]", .function = nsim_output_feature_enable_disable_command_fn, }; -/* *INDENT-ON* */ #include <nsim/nsim.api.c> static clib_error_t * @@ -550,30 +546,24 @@ nsim_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (nsim_init); -/* *INDENT-OFF* */ VNET_FEATURE_INIT (nsim, static) = { .arc_name = "device-input", .node_name = "nsim", .runs_before = VNET_FEATURES ("ethernet-input"), }; -/* *INDENT-ON */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (nsim_feature, static) = { .arc_name = "interface-output", .node_name = "nsim-output-feature", .runs_before = VNET_FEATURES ("interface-output-arc-end"), }; -/* *INDENT-ON */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Network Delay Simulator", }; -/* *INDENT-ON* */ static uword unformat_delay (unformat_input_t * input, va_list * args) @@ -797,7 +787,6 @@ set_nsim_command_fn (vlib_main_t * vm, * @cliend * @cliexcmd{set nsim delay <nn> bandwidth <bb> packet-size <nn>} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_nsim_command, static) = { .path = "set nsim", @@ -805,7 +794,6 @@ VLIB_CLI_COMMAND (set_nsim_command, static) = " [packets-per-drop <nn>][drop-fraction <f64: 0.0 - 1.0>]", .function = set_nsim_command_fn, }; -/* *INDENT-ON*/ static clib_error_t * @@ -842,14 +830,12 @@ show_nsim_command_fn (vlib_main_t * vm, * @cliexcmd{show nsim} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_nsim_command, static) = { .path = "show nsim", .short_help = "Display network delay simulator configuration", .function = show_nsim_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/nsim/nsim_input.c b/src/plugins/nsim/nsim_input.c index 65a7ae11251..889d9c9841f 100644 --- a/src/plugins/nsim/nsim_input.c +++ b/src/plugins/nsim/nsim_input.c @@ -126,7 +126,6 @@ VLIB_NODE_FN (nsim_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, } -/* *INDENT-OFF* */ #ifndef CLIB_MARCH_VARIANT VLIB_REGISTER_NODE (nsim_input_node) = { @@ -142,7 +141,6 @@ VLIB_REGISTER_NODE (nsim_input_node) = .error_strings = nsim_tx_error_strings, }; #endif /* CLIB_MARCH_VARIANT */ -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/oddbuf/node.c b/src/plugins/oddbuf/node.c index a1de52a7e8c..6652baaaec5 100644 --- a/src/plugins/oddbuf/node.c +++ b/src/plugins/oddbuf/node.c @@ -183,7 +183,6 @@ VLIB_NODE_FN (oddbuf_node) (vlib_main_t * vm, vlib_node_runtime_t * node, 0 /* is_trace */ ); } -/* *INDENT-OFF* */ #ifndef CLIB_MARCH_VARIANT VLIB_REGISTER_NODE (oddbuf_node) = { @@ -203,7 +202,6 @@ VLIB_REGISTER_NODE (oddbuf_node) = }, }; #endif /* CLIB_MARCH_VARIANT */ -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/oddbuf/oddbuf.c b/src/plugins/oddbuf/oddbuf.c index 8277836aeb8..44cdd11eaae 100644 --- a/src/plugins/oddbuf/oddbuf.c +++ b/src/plugins/oddbuf/oddbuf.c @@ -106,7 +106,6 @@ oddbuf_enable_disable_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (oddbuf_enable_disable_command, static) = { .path = "oddbuf enable-disable", @@ -114,7 +113,6 @@ VLIB_CLI_COMMAND (oddbuf_enable_disable_command, static) = "oddbuf enable-disable <interface-name> [disable]", .function = oddbuf_enable_disable_command_fn, }; -/* *INDENT-ON* */ /* API message handler */ static void vl_api_oddbuf_enable_disable_t_handler @@ -157,23 +155,19 @@ oddbuf_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (oddbuf_init); -/* *INDENT-OFF* */ VNET_FEATURE_INIT (oddbuf, static) = { .arc_name = "device-input", .node_name = "oddbuf", .runs_before = VNET_FEATURES ("ethernet-input"), }; -/* *INDENT-ON */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Awkward chained buffer geometry generator", .default_disabled = 1, }; -/* *INDENT-ON* */ static clib_error_t * @@ -205,7 +199,6 @@ oddbuf_config_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (oddbuf_config_command, static) = { .path = "oddbuf configure", @@ -213,7 +206,6 @@ VLIB_CLI_COMMAND (oddbuf_config_command, static) = "oddbuf configure n_to_copy <nn> offset <nn> first_offset <nn>", .function = oddbuf_config_command_fn, }; -/* *INDENT-ON* */ diff --git a/src/plugins/ping/ping.c b/src/plugins/ping/ping.c index ca2fc1fa055..40e4495aaf2 100644 --- a/src/plugins/ping/ping.c +++ b/src/plugins/ping/ping.c @@ -275,7 +275,6 @@ ip6_icmp_echo_reply_node_fn (vlib_main_t * vm, 1 /* is_ip6 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_icmp_echo_reply_node, static) = { .function = ip6_icmp_echo_reply_node_fn, @@ -301,7 +300,6 @@ VLIB_REGISTER_NODE (ip4_icmp_echo_reply_node, static) = [ICMP46_ECHO_REPLY_NEXT_PUNT] = "ip4-punt", }, }; -/* *INDENT-ON* */ static uword ip4_icmp_echo_request (vlib_main_t * vm, @@ -496,7 +494,6 @@ format_icmp_input_trace (u8 * s, va_list * va) return s; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_icmp_echo_request_node,static) = { .function = ip4_icmp_echo_request, .name = "ip4-icmp-echo-request", @@ -510,7 +507,6 @@ VLIB_REGISTER_NODE (ip4_icmp_echo_request_node,static) = { [0] = "ip4-load-balance", }, }; -/* *INDENT-ON* */ typedef enum { @@ -1580,7 +1576,6 @@ done: * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ping_command, static) = { .path = "ping", @@ -1591,7 +1586,6 @@ VLIB_CLI_COMMAND (ping_command, static) = " [burst <count:1>] [verbose]", .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * ping_cli_init (vlib_main_t * vm) @@ -1619,12 +1613,10 @@ ping_cli_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (ping_cli_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Ping (ping)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/ping/ping.h b/src/plugins/ping/ping.h index e789300acd6..fdccd07b57d 100644 --- a/src/plugins/ping/ping.h +++ b/src/plugins/ping/ping.h @@ -72,7 +72,6 @@ extern ping_main_t ping_main; #define PING_CLI_UNKNOWN_NODE (~0) -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u16 id; @@ -81,7 +80,6 @@ typedef CLIB_PACKED (struct { u8 data[0]; }) icmp46_echo_request_t; -/* *INDENT-ON* */ typedef enum diff --git a/src/plugins/pppoe/pppoe.c b/src/plugins/pppoe/pppoe.c index 97adc2bd082..0d5f9c1aeac 100644 --- a/src/plugins/pppoe/pppoe.c +++ b/src/plugins/pppoe/pppoe.c @@ -77,13 +77,11 @@ pppoe_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) return /* no error */ 0; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (pppoe_device_class,static) = { .name = "PPPoE", .format_device_name = format_pppoe_name, .admin_up_down_function = pppoe_interface_admin_up_down, }; -/* *INDENT-ON* */ static u8 * format_pppoe_header_with_length (u8 * s, va_list * args) @@ -256,7 +254,6 @@ pppoe_update_adj (vnet_main_t * vnm, u32 sw_if_index, adj_index_t ai) dpo_reset (&dpo); } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (pppoe_hw_class) = { .name = "PPPoE", @@ -265,7 +262,6 @@ VNET_HW_INTERFACE_CLASS (pppoe_hw_class) = .update_adjacency = pppoe_update_adj, .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P, }; -/* *INDENT-ON* */ #define foreach_copy_field \ _(session_id) \ @@ -613,7 +609,6 @@ done: * @cliexcmd{create pppoe session client-ip 10.0.3.1 session-id 13 * client-mac 00:01:02:03:04:05 del } ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_pppoe_session_command, static) = { .path = "create pppoe session", .short_help = @@ -621,9 +616,7 @@ VLIB_CLI_COMMAND (create_pppoe_session_command, static) = { " client-mac <client-mac> [decap-vrf-id <nn>] [del]", .function = pppoe_add_del_session_command_fn, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ static clib_error_t * show_pppoe_session_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -642,7 +635,6 @@ show_pppoe_session_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-ON* */ /*? * Display all the PPPoE Session entries. @@ -654,13 +646,11 @@ show_pppoe_session_command_fn (vlib_main_t * vm, * local-mac a0:b0:c0:d0:e0:f0 client-mac 00:01:02:03:04:05 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_pppoe_session_command, static) = { .path = "show pppoe session", .short_help = "show pppoe session", .function = show_pppoe_session_command_fn, }; -/* *INDENT-ON* */ typedef struct pppoe_show_walk_ctx_t_ { @@ -737,13 +727,11 @@ show_pppoe_fib_command_fn (vlib_main_t * vm, * 52:54:00:53:18:55 2 GigabitEthernet0/8/1 3 1 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_pppoe_fib_command, static) = { .path = "show pppoe fib", .short_help = "show pppoe fib", .function = show_pppoe_fib_command_fn, }; -/* *INDENT-ON* */ clib_error_t * pppoe_init (vlib_main_t * vm) @@ -775,12 +763,10 @@ pppoe_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (pppoe_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "PPP over Ethernet (PPPoE)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/pppoe/pppoe.h b/src/plugins/pppoe/pppoe.h index a72b7349328..444de42f4a5 100644 --- a/src/plugins/pppoe/pppoe.h +++ b/src/plugins/pppoe/pppoe.h @@ -106,7 +106,6 @@ extern char *pppoe_error_strings[]; #define PPPOE_NUM_BUCKETS (64 * 1024) #define PPPOE_MEMORY_SIZE (8<<20) -/* *INDENT-OFF* */ /* * The PPPoE key is the mac address and session ID */ @@ -127,9 +126,7 @@ typedef struct u64 raw; }; } pppoe_entry_key_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ /* * The PPPoE entry results */ @@ -147,7 +144,6 @@ typedef struct u64 raw; }; } pppoe_entry_result_t; -/* *INDENT-ON* */ typedef struct { diff --git a/src/plugins/pppoe/pppoe_api.c b/src/plugins/pppoe/pppoe_api.c index 6705fb6acea..c7099a3491f 100644 --- a/src/plugins/pppoe/pppoe_api.c +++ b/src/plugins/pppoe/pppoe_api.c @@ -64,12 +64,10 @@ static void vl_api_pppoe_add_del_session_t_handler rv = vnet_pppoe_add_del_session (&a, &sw_if_index); out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_PPPOE_ADD_DEL_SESSION_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); })); - /* *INDENT-ON* */ } static void send_pppoe_session_details @@ -120,12 +118,10 @@ vl_api_pppoe_session_dump_t_handler (vl_api_pppoe_session_dump_t * mp) if (~0 == sw_if_index) { - /* *INDENT-OFF* */ pool_foreach (t, pem->sessions) { send_pppoe_session_details(t, reg, mp->context); } - /* *INDENT-ON* */ } else { @@ -148,9 +144,7 @@ vl_api_pppoe_add_del_cp_t_handler (vl_api_pppoe_add_del_cp_t * mp) rv = pppoe_add_del_cp (ntohl (mp->sw_if_index), mp->is_add); - /* *INDENT-OFF* */ REPLY_MACRO(VL_API_PPPOE_ADD_DEL_CP_REPLY); - /* *INDENT-ON* */ } #include <pppoe/pppoe.api.c> diff --git a/src/plugins/pppoe/pppoe_cp.c b/src/plugins/pppoe/pppoe_cp.c index 6c6ba249fcc..82891d5b654 100644 --- a/src/plugins/pppoe/pppoe_cp.c +++ b/src/plugins/pppoe/pppoe_cp.c @@ -97,14 +97,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_pppoe_cp_cmd, static) = { .path = "create pppoe cp", .short_help = "create pppoe cp-if-index <intfc> [del]", .function = pppoe_add_del_cp_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/pppoe/pppoe_decap.c b/src/plugins/pppoe/pppoe_decap.c index a1c37f6794f..7c456a7a9cc 100644 --- a/src/plugins/pppoe/pppoe_decap.c +++ b/src/plugins/pppoe/pppoe_decap.c @@ -494,11 +494,9 @@ VLIB_REGISTER_NODE (pppoe_input_node) = { .format_trace = format_pppoe_rx_trace, }; -/* *INDENT-OFF* */ VNET_FEATURE_INIT (pppoe_input_node, static) = { .arc_name = "device-input", .node_name = "pppoe-input", .runs_before = VNET_FEATURES ("ethernet-input"), }; -/* *INDENT-ON */ diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c index 88e3277a160..60d4ac21c19 100644 --- a/src/plugins/quic/quic.c +++ b/src/plugins/quic/quic.c @@ -106,7 +106,6 @@ quic_app_cert_key_pair_delete_callback (app_cert_key_pair_t * ckpair) for (i = 0; i < num_threads; i++) { - /* *INDENT-OFF* */ pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool) { if (crctx->ckpair_index == ckpair->cert_key_index) { @@ -114,7 +113,6 @@ quic_app_cert_key_pair_delete_callback (app_cert_key_pair_t * ckpair) clib_bihash_add_del_24_8 (&qm->wrk_ctx[i].crypto_context_hash, &kv, 0 /* is_add */ ); } } - /* *INDENT-ON* */ } return 0; } @@ -154,11 +152,9 @@ quic_list_crypto_context_command_fn (vlib_main_t * vm, int i, num_threads = 1 /* main thread */ + vtm->n_threads; for (i = 0; i < num_threads; i++) { - /* *INDENT-OFF* */ pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool) { vlib_cli_output (vm, "[%d][Q]%U", i, format_crypto_context, crctx); } - /* *INDENT-ON* */ } return 0; } @@ -2428,7 +2424,6 @@ quic_get_transport_endpoint (u32 ctx_index, u32 thread_index, quic_common_get_transport_endpoint (ctx, tep, is_lcl); } -/* *INDENT-OFF* */ static session_cb_vft_t quic_app_cb_vft = { .session_accept_callback = quic_udp_session_accepted_callback, .session_disconnect_callback = quic_udp_session_disconnect_callback, @@ -2464,7 +2459,6 @@ static const transport_proto_vft_t quic_proto = { .service_type = TRANSPORT_SERVICE_APP, }, }; -/* *INDENT-ON* */ static quicly_stream_open_t on_stream_open = { quic_on_stream_open }; static quicly_closed_by_remote_t on_closed_by_remote = { @@ -2704,7 +2698,6 @@ quic_show_aggregated_stats (vlib_main_t * vm) clib_memset (&agg_stats, 0, sizeof (agg_stats)); for (i = 0; i < num_workers + 1; i++) { - /* *INDENT-OFF* */ pool_foreach (ctx, qm->ctx_pool[i]) { if (quic_ctx_is_conn (ctx) && ctx->conn) @@ -2724,7 +2717,6 @@ quic_show_aggregated_stats (vlib_main_t * vm) else if (quic_ctx_is_stream (ctx)) nstream++; } - /* *INDENT-ON* */ } vlib_cli_output (vm, "-------- Connections --------"); vlib_cli_output (vm, "Current: %u", nconn); @@ -2899,7 +2891,6 @@ quic_show_connections_command_fn (vlib_main_t * vm, for (int i = 0; i < num_workers + 1; i++) { - /* *INDENT-OFF* */ pool_foreach (ctx, qm->ctx_pool[i]) { if (quic_ctx_is_stream (ctx) && show_stream) @@ -2909,7 +2900,6 @@ quic_show_connections_command_fn (vlib_main_t * vm, else if (quic_ctx_is_conn (ctx) && show_conn) vlib_cli_output (vm, "%U", quic_format_connection_ctx, ctx); } - /* *INDENT-ON* */ } done: @@ -2917,7 +2907,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (quic_plugin_crypto_command, static) = { .path = "quic set crypto api", .short_help = "quic set crypto api [picotls|vpp]", @@ -2958,7 +2947,6 @@ VLIB_PLUGIN_REGISTER () = .description = "Quic transport protocol", .default_disabled = 1, }; -/* *INDENT-ON* */ static clib_error_t * quic_config_fn (vlib_main_t * vm, unformat_input_t * input) @@ -3014,7 +3002,6 @@ quic_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (quic_input_node) = { .function = quic_node_fn, @@ -3024,7 +3011,6 @@ VLIB_REGISTER_NODE (quic_input_node) = .n_errors = ARRAY_LEN (quic_error_strings), .error_strings = quic_error_strings, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/rdma/api.c b/src/plugins/rdma/api.c index b4695cf3a7a..3fb17ff6ee0 100644 --- a/src/plugins/rdma/api.c +++ b/src/plugins/rdma/api.c @@ -162,10 +162,8 @@ vl_api_rdma_create_v2_t_handler (vl_api_rdma_create_v2_t * mp) rdma_create_if (vm, &args); rv = args.rv; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_RDMA_CREATE_V2_REPLY, ({ rmp->sw_if_index = ntohl (args.sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -192,10 +190,8 @@ vl_api_rdma_create_t_handler (vl_api_rdma_create_t * mp) rdma_create_if (vm, &args); rv = args.rv; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_RDMA_CREATE_REPLY, ({ rmp->sw_if_index = ntohl (args.sw_if_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/plugins/rdma/cli.c b/src/plugins/rdma/cli.c index 0edc83a05ce..bcedd625220 100644 --- a/src/plugins/rdma/cli.c +++ b/src/plugins/rdma/cli.c @@ -44,7 +44,6 @@ rdma_create_command_fn (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (rdma_create_command, static) = { .path = "create interface rdma", .short_help = "create interface rdma <host-if ifname> [name <name>]" @@ -54,7 +53,6 @@ VLIB_CLI_COMMAND (rdma_create_command, static) = { " [max-pktlen <size>]", .function = rdma_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * rdma_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -99,14 +97,12 @@ rdma_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (rdma_delete_command, static) = { .path = "delete interface rdma", .short_help = "delete interface rdma " "{<interface> | sw_if_index <sw_idx>}", .function = rdma_delete_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * test_rdma_dump_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -162,13 +158,11 @@ test_rdma_dump_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_rdma_mlx5dv_dump_command, static) = { .path = "test rdma dump", .short_help = "test rdma dump {<interface> | sw_if_index <sw_idx>}", .function = test_rdma_dump_command_fn, }; -/* *INDENT-ON* */ clib_error_t * rdma_cli_init (vlib_main_t * vm) diff --git a/src/plugins/rdma/input.c b/src/plugins/rdma/input.c index 8d2f447a73d..a7d41a1684d 100644 --- a/src/plugins/rdma/input.c +++ b/src/plugins/rdma/input.c @@ -228,7 +228,6 @@ rdma_device_input_refill (vlib_main_t * vm, rdma_device_t * rd, about what RDMA core does (CYCLIC_RQ or LINKED_LIST_RQ). In cyclic mode, the SRQ header is ignored anyways... */ -/* *INDENT-OFF* */ if (is_striding && !(current_data_seg & (wqe_sz - 1))) *(mlx5dv_wqe_srq_next_t *) wqe = (mlx5dv_wqe_srq_next_t) { @@ -237,7 +236,6 @@ rdma_device_input_refill (vlib_main_t * vm, rdma_device_t * rd, .signature = 0, .rsvd1 = {0} }; -/* *INDENT-ON* */ /* TODO: when log_skip_wqe > 2, hw_prefetcher doesn't work, lots of LLC store misses occur for wqes, to be fixed... */ @@ -1073,7 +1071,6 @@ VLIB_NODE_FN (rdma_input_node) (vlib_main_t * vm, return n_rx; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (rdma_input_node) = { .name = "rdma-input", .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, @@ -1085,7 +1082,6 @@ VLIB_REGISTER_NODE (rdma_input_node) = { .error_strings = rdma_input_error_strings, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/rdma/plugin.c b/src/plugins/rdma/plugin.c index b0dddee42b6..0d2cccc96f8 100644 --- a/src/plugins/rdma/plugin.c +++ b/src/plugins/rdma/plugin.c @@ -19,12 +19,10 @@ #include <vnet/plugin/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "RDMA IBverbs Device Driver", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-ad/ad.c b/src/plugins/srv6-ad/ad.c index 387df614e7f..fc8527d0f82 100644 --- a/src/plugins/srv6-ad/ad.c +++ b/src/plugins/srv6-ad/ad.c @@ -447,7 +447,6 @@ srv6_ad_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_ad2_rewrite, static) = { .arc_name = "device-input", @@ -475,7 +474,6 @@ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Dynamic Segment Routing for IPv6 (SRv6) Proxy", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-ad/node.c b/src/plugins/srv6-ad/node.c index f04d4ac2114..2b1d56b6570 100644 --- a/src/plugins/srv6-ad/node.c +++ b/src/plugins/srv6-ad/node.c @@ -271,7 +271,6 @@ srv6_ad_localsid_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_ad_localsid_node) = { .function = srv6_ad_localsid_fn, .name = "srv6-ad-localsid", @@ -286,7 +285,6 @@ VLIB_REGISTER_NODE (srv6_ad_localsid_node) = { [SRV6_AD_LOCALSID_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /******************************* Rewriting node *******************************/ @@ -407,7 +405,6 @@ srv6_ad2_rewrite_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_ad2_rewrite_node) = { .function = srv6_ad2_rewrite_fn, .name = "srv6-ad2-rewrite", @@ -422,7 +419,6 @@ VLIB_REGISTER_NODE (srv6_ad2_rewrite_node) = { [SRV6_AD_REWRITE_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /** @@ -550,7 +546,6 @@ srv6_ad4_rewrite_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_ad4_rewrite_node) = { .function = srv6_ad4_rewrite_fn, .name = "srv6-ad4-rewrite", @@ -565,7 +560,6 @@ VLIB_REGISTER_NODE (srv6_ad4_rewrite_node) = { [SRV6_AD_REWRITE_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /** @@ -688,7 +682,6 @@ srv6_ad6_rewrite_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_ad6_rewrite_node) = { .function = srv6_ad6_rewrite_fn, .name = "srv6-ad6-rewrite", @@ -703,7 +696,6 @@ VLIB_REGISTER_NODE (srv6_ad6_rewrite_node) = { [SRV6_AD_REWRITE_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-am/am.c b/src/plugins/srv6-am/am.c index bcc483e292b..f308b5167d9 100644 --- a/src/plugins/srv6-am/am.c +++ b/src/plugins/srv6-am/am.c @@ -226,7 +226,6 @@ srv6_am_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_am_rewrite, static) = { .arc_name = "ip6-unicast", @@ -240,7 +239,6 @@ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Masquerading Segment Routing for IPv6 (SRv6) Proxy", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-am/node.c b/src/plugins/srv6-am/node.c index dd2b1c4d542..beef6a30910 100644 --- a/src/plugins/srv6-am/node.c +++ b/src/plugins/srv6-am/node.c @@ -210,7 +210,6 @@ srv6_am_localsid_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_am_localsid_node) = { .function = srv6_am_localsid_fn, .name = "srv6-am-localsid", @@ -223,7 +222,6 @@ VLIB_REGISTER_NODE (srv6_am_localsid_node) = { [SRV6_AM_LOCALSID_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /******************************* Rewriting node *******************************/ @@ -326,7 +324,6 @@ srv6_am_rewrite_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_am_rewrite_node) = { .function = srv6_am_rewrite_fn, .name = "srv6-am-rewrite", @@ -341,7 +338,6 @@ VLIB_REGISTER_NODE (srv6_am_rewrite_node) = { [SRV6_AM_REWRITE_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-as/as.c b/src/plugins/srv6-as/as.c index 2d9b831075b..bdf17527ae8 100644 --- a/src/plugins/srv6-as/as.c +++ b/src/plugins/srv6-as/as.c @@ -557,7 +557,6 @@ srv6_as_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_as2_rewrite, static) = { .arc_name = "device-input", @@ -585,7 +584,6 @@ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Static Segment Routing for IPv6 (SRv6) Proxy", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-as/node.c b/src/plugins/srv6-as/node.c index 4beb8dfd7ac..e81881982af 100644 --- a/src/plugins/srv6-as/node.c +++ b/src/plugins/srv6-as/node.c @@ -234,7 +234,6 @@ srv6_as_localsid_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_as_localsid_node) = { .function = srv6_as_localsid_fn, .name = "srv6-as-localsid", @@ -249,7 +248,6 @@ VLIB_REGISTER_NODE (srv6_as_localsid_node) = { [SRV6_AS_LOCALSID_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /******************************* Rewriting node *******************************/ @@ -370,7 +368,6 @@ srv6_as2_rewrite_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_as2_rewrite_node) = { .function = srv6_as2_rewrite_fn, .name = "srv6-as2-rewrite", @@ -385,7 +382,6 @@ VLIB_REGISTER_NODE (srv6_as2_rewrite_node) = { [SRV6_AS_REWRITE_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /** @@ -514,7 +510,6 @@ srv6_as4_rewrite_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_as4_rewrite_node) = { .function = srv6_as4_rewrite_fn, .name = "srv6-as4-rewrite", @@ -529,7 +524,6 @@ VLIB_REGISTER_NODE (srv6_as4_rewrite_node) = { [SRV6_AS_REWRITE_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /** @@ -653,7 +647,6 @@ srv6_as6_rewrite_fn (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (srv6_as6_rewrite_node) = { .function = srv6_as6_rewrite_fn, .name = "srv6-as6-rewrite", @@ -668,7 +661,6 @@ VLIB_REGISTER_NODE (srv6_as6_rewrite_node) = { [SRV6_AS_REWRITE_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-mobile/gtp4_d.c b/src/plugins/srv6-mobile/gtp4_d.c index d5a5a6a567a..f519b4840cc 100644 --- a/src/plugins/srv6-mobile/gtp4_d.c +++ b/src/plugins/srv6-mobile/gtp4_d.c @@ -260,7 +260,6 @@ srv6_t_m_gtp4_d_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_t_m_gtp4_d, static) = { .arc_name = "ip4-unicast", @@ -269,7 +268,6 @@ VNET_FEATURE_INIT (srv6_t_m_gtp4_d, static) = }; VLIB_INIT_FUNCTION (srv6_t_m_gtp4_d_init); -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-mobile/gtp4_dt.c b/src/plugins/srv6-mobile/gtp4_dt.c index c4752b77557..10cea640036 100644 --- a/src/plugins/srv6-mobile/gtp4_dt.c +++ b/src/plugins/srv6-mobile/gtp4_dt.c @@ -193,7 +193,6 @@ srv6_t_m_gtp4_dt_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_t_m_gtp4_dt, static) = { .arc_name = "ip4-unicast", @@ -202,7 +201,6 @@ VNET_FEATURE_INIT (srv6_t_m_gtp4_dt, static) = }; VLIB_INIT_FUNCTION (srv6_t_m_gtp4_dt_init); -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-mobile/gtp4_e.c b/src/plugins/srv6-mobile/gtp4_e.c index 828f924464d..52f1615aa85 100644 --- a/src/plugins/srv6-mobile/gtp4_e.c +++ b/src/plugins/srv6-mobile/gtp4_e.c @@ -203,7 +203,6 @@ srv6_end_m_gtp4_e_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_end_m_gtp4_e, static) = { .arc_name = "ip6-unicast", @@ -217,7 +216,6 @@ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "SRv6 GTP Endpoint Functions", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-mobile/gtp6_d.c b/src/plugins/srv6-mobile/gtp6_d.c index 1f5b9ac0d0f..ef831ba750c 100644 --- a/src/plugins/srv6-mobile/gtp6_d.c +++ b/src/plugins/srv6-mobile/gtp6_d.c @@ -260,7 +260,6 @@ srv6_end_m_gtp6_d_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_end_m_gtp6_d, static) = { .arc_name = "ip6-unicast", @@ -269,7 +268,6 @@ VNET_FEATURE_INIT (srv6_end_m_gtp6_d, static) = }; VLIB_INIT_FUNCTION (srv6_end_m_gtp6_d_init); -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-mobile/gtp6_d_di.c b/src/plugins/srv6-mobile/gtp6_d_di.c index 80c0dbcec7c..94bc684161d 100644 --- a/src/plugins/srv6-mobile/gtp6_d_di.c +++ b/src/plugins/srv6-mobile/gtp6_d_di.c @@ -206,7 +206,6 @@ srv6_end_m_gtp6_d_di_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_end_m_gtp6_d_di, static) = { .arc_name = "ip6-unicast", @@ -215,7 +214,6 @@ VNET_FEATURE_INIT (srv6_end_m_gtp6_d_di, static) = }; VLIB_INIT_FUNCTION (srv6_end_m_gtp6_d_di_init); -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-mobile/gtp6_dt.c b/src/plugins/srv6-mobile/gtp6_dt.c index 5fc0918621d..c4d4175e321 100644 --- a/src/plugins/srv6-mobile/gtp6_dt.c +++ b/src/plugins/srv6-mobile/gtp6_dt.c @@ -185,7 +185,6 @@ srv6_end_m_gtp6_dt_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_end_m_gtp6_dt, static) = { .arc_name = "ip6-unicast", @@ -194,7 +193,6 @@ VNET_FEATURE_INIT (srv6_end_m_gtp6_dt, static) = }; VLIB_INIT_FUNCTION (srv6_end_m_gtp6_dt_init); -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-mobile/gtp6_e.c b/src/plugins/srv6-mobile/gtp6_e.c index 49b1bd1a6d9..dd3a889928b 100644 --- a/src/plugins/srv6-mobile/gtp6_e.c +++ b/src/plugins/srv6-mobile/gtp6_e.c @@ -168,7 +168,6 @@ srv6_end_m_gtp6_e_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_INIT (srv6_end_m_gtp6_e, static) = { .arc_name = "ip6-unicast", @@ -177,7 +176,6 @@ VNET_FEATURE_INIT (srv6_end_m_gtp6_e, static) = }; VLIB_INIT_FUNCTION (srv6_end_m_gtp6_e_init); -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/srv6-mobile/mobile.h b/src/plugins/srv6-mobile/mobile.h index 921abc90db2..a305a25b811 100644 --- a/src/plugins/srv6-mobile/mobile.h +++ b/src/plugins/srv6-mobile/mobile.h @@ -93,24 +93,19 @@ typedef enum mobile_localsid_function_list SRV6_MOBILE_LOCALSID_END_M_GTP6_D_DT46, } mobile_localsid_function_list_t; -/* *INDENT-OFF* */ typedef struct { u8 type; u8 restart_counter; } __attribute__ ((packed)) gtpu_recovery_ie; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef struct { u16 seq; u8 npdu_num; u8 nextexthdr; } __attribute__ ((packed)) gtpu_exthdr_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef struct { u8 ver_flags; @@ -119,7 +114,6 @@ typedef struct u32 teid; gtpu_exthdr_t ext[0]; } __attribute__ ((packed)) gtpu_header_t; -/* *INDENT-ON* */ #define GTPU_TYPE_ECHO_REQUEST 1 #define GTPU_TYPE_ECHO_REPLY 2 @@ -127,7 +121,6 @@ typedef struct #define GTPU_TYPE_END_MARKER 254 #define GTPU_TYPE_GTPU 255 -/* *INDENT-OFF* */ typedef struct { BITALIGN2 (u8 ppi:3, @@ -135,9 +128,7 @@ typedef struct u8 padding[3]; } __attribute__ ((packed)) gtpu_paging_policy_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef struct { u8 exthdrlen; @@ -155,7 +146,6 @@ typedef struct gtpu_paging_policy_t paging[0]; u8 nextexthdr; } __attribute__ ((packed)) gtpu_pdu_session_t; -/* *INDENT-ON* */ #define GTPU_PDU_SESSION_P_BIT_MASK 0x80 #define GTPU_PDU_SESSION_R_BIT_MASK 0x40 @@ -165,36 +155,30 @@ typedef struct #define SRV6_PDU_SESSION_R_BIT_MASK 0x02 #define SRV6_PDU_SESSION_QFI_MASK 0xfC -/* *INDENT-OFF* */ typedef struct { ip4_header_t ip4; /* 20 bytes */ udp_header_t udp; /* 8 bytes */ gtpu_header_t gtpu; /* 8 bytes */ } __attribute__ ((packed)) ip4_gtpu_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef struct { ip6_header_t ip6; /* 40 bytes */ udp_header_t udp; /* 8 bytes */ gtpu_header_t gtpu; /* 8 bytes */ } __attribute__ ((packed)) ip6_gtpu_header_t; -/* *INDENT-ON* */ #define GTPU_V1_VER (1<<5) #define GTPU_PT_GTP (1<<4) -/* *INDENT-OFF* */ typedef struct { u8 type; u8 length; u8 value[0]; } __attribute__ ((packed)) user_plane_sub_tlv_t; -/* *INDENT-ON* */ #define USER_PLANE_SUB_TLV_IE 0x01 diff --git a/src/plugins/stn/stn.c b/src/plugins/stn/stn.c index 241f7169e8b..6e789feca5d 100644 --- a/src/plugins/stn/stn.c +++ b/src/plugins/stn/stn.c @@ -195,7 +195,6 @@ stn_ip6_punt_fn (vlib_main_t * vm, return stn_ip46_punt_fn(vm, node, frame, 0); } -/** *INDENT-OFF* */ VLIB_REGISTER_NODE (stn_ip6_punt, static) = { .function = stn_ip6_punt_fn, @@ -215,7 +214,6 @@ VNET_FEATURE_INIT (stn_ip6_punt_feat_node, static) = { .node_name = "stn-ip6-punt", .runs_before = VNET_FEATURES("ip6-punt-redirect"), }; -/** *INDENT-ON* */ u8 * format_stn_ip4_punt_trace (u8 * s, va_list * args) @@ -230,7 +228,6 @@ stn_ip4_punt_fn (vlib_main_t * vm, return stn_ip46_punt_fn(vm, node, frame, 1); } -/** *INDENT-OFF* */ VLIB_REGISTER_NODE (stn_ip4_punt, static) = { .function = stn_ip4_punt_fn, @@ -250,7 +247,6 @@ VNET_FEATURE_INIT (stn_ip4_punt_feat_node, static) = { .node_name = "stn-ip4-punt", .runs_before = VNET_FEATURES("ip4-punt-redirect"), }; -/** *INDENT-ON* */ clib_error_t * stn_init (vlib_main_t * vm) @@ -275,12 +271,10 @@ stn_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (stn_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "VPP Steals the NIC (STN) for Container Integration", }; -/* *INDENT-ON* */ int stn_rule_add_del (stn_rule_add_del_args_t *args) { diff --git a/src/plugins/stn/stn_api.c b/src/plugins/stn/stn_api.c index 8d96014331a..4d1af36d448 100644 --- a/src/plugins/stn/stn_api.c +++ b/src/plugins/stn/stn_api.c @@ -82,11 +82,9 @@ vl_api_stn_rules_dump_t_handler (vl_api_stn_rules_dump_t * mp) if (reg == 0) return; - /* *INDENT-OFF* */ pool_foreach (r, stn->rules) { send_stn_rules_details (r, reg, mp->context); } - /* *INDENT-ON* */ } #include <stn/stn.api.c> diff --git a/src/plugins/svs/svs.c b/src/plugins/svs/svs.c index 555283397ff..4da7fb9263d 100644 --- a/src/plugins/svs/svs.c +++ b/src/plugins/svs/svs.c @@ -363,7 +363,6 @@ format_svs_input_trace (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (svs_ip4_node) = { .function = svs_input_ip4, @@ -402,7 +401,6 @@ VNET_FEATURE_INIT (svs_ip6_feat, static) = .arc_name = "ip6-unicast", .node_name = "svs-ip6", }; -/* *INDENT-ON* */ static clib_error_t * svs_table_cli (vlib_main_t * vm, @@ -443,13 +441,11 @@ svs_table_cli (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (svs_table_cmd_cli, static) = { .path = "svs table", .short_help = "Source VRF select table [add|delete] [ip4|ip6] table-id X", .function = svs_table_cli, }; -/* *INDENT-ON* */ static clib_error_t * svs_enable_cli (vlib_main_t * vm, @@ -497,13 +493,11 @@ svs_enable_cli (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (svs_enable_cli_cmd, static) = { .path = "svs enable", .short_help = "Source VRF select [enable|disable] [ip4|ip6] <table-id> X <interface>", .function = svs_enable_cli, }; -/* *INDENT-ON* */ static clib_error_t * svs_route_cli (vlib_main_t * vm, @@ -559,13 +553,11 @@ svs_route_cli (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (svs_route_cmd_cli, static) = { .path = "svs route", .short_help = "Source VRF select route [add|delete] <table-id> <prefix> <src-table-id>", .function = svs_route_cli, }; -/* *INDENT-ON* */ static clib_error_t * svs_show_cli (vlib_main_t * vm, @@ -588,13 +580,11 @@ svs_show_cli (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (svs_show_cli_cmd, static) = { .path = "show svs", .short_help = "Source VRF select show", .function = svs_show_cli, }; -/* *INDENT-ON* */ static clib_error_t * svs_init (vlib_main_t * vm) diff --git a/src/plugins/tlsmbedtls/tls_mbedtls.c b/src/plugins/tlsmbedtls/tls_mbedtls.c index 00ac7fe6e17..af04f1adeb0 100644 --- a/src/plugins/tlsmbedtls/tls_mbedtls.c +++ b/src/plugins/tlsmbedtls/tls_mbedtls.c @@ -688,19 +688,15 @@ tls_mbedtls_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (tls_mbedtls_init) = { .runs_after = VLIB_INITS("tls_init"), }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Transport Layer Security (TLS) Engine, Mbedtls Based", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/tlsopenssl/tls_async.c b/src/plugins/tlsopenssl/tls_async.c index bea9b892fa2..d85af686d21 100644 --- a/src/plugins/tlsopenssl/tls_async.c +++ b/src/plugins/tlsopenssl/tls_async.c @@ -510,7 +510,6 @@ tls_async_process (vlib_main_t * vm, vlib_node_runtime_t * rt, VLIB_INIT_FUNCTION (tls_async_init); -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tls_async_process_node,static) = { .function = tls_async_process, .type = VLIB_NODE_TYPE_INPUT, @@ -518,7 +517,6 @@ VLIB_REGISTER_NODE (tls_async_process_node,static) = { .state = VLIB_NODE_STATE_DISABLED, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/tlsopenssl/tls_openssl.c b/src/plugins/tlsopenssl/tls_openssl.c index 5e58913342b..87674337807 100644 --- a/src/plugins/tlsopenssl/tls_openssl.c +++ b/src/plugins/tlsopenssl/tls_openssl.c @@ -1231,12 +1231,10 @@ tls_openssl_init (vlib_main_t * vm) return error; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (tls_openssl_init) = { .runs_after = VLIB_INITS("tls_init"), }; -/* *INDENT-ON* */ #ifdef HAVE_OPENSSL_ASYNC static clib_error_t * @@ -1307,22 +1305,18 @@ tls_openssl_set_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tls_openssl_set_command, static) = { .path = "tls openssl set", .short_help = "tls openssl set [engine <engine name>] [alg [algorithm] [async]", .function = tls_openssl_set_command_fn, }; -/* *INDENT-ON* */ #endif -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Transport Layer Security (TLS) Engine, OpenSSL Based", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/tlspicotls/tls_picotls.c b/src/plugins/tlspicotls/tls_picotls.c index 0ab2488e4f4..88b99a48aa1 100644 --- a/src/plugins/tlspicotls/tls_picotls.c +++ b/src/plugins/tlspicotls/tls_picotls.c @@ -786,18 +786,14 @@ tls_picotls_init (vlib_main_t * vm) return error; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (tls_picotls_init) = { .runs_after = VLIB_INITS ("tls_init"), }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Transport Layer Security (TLS) Engine, Picotls Based", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/tracedump/graph_cli.c b/src/plugins/tracedump/graph_cli.c index 2de191b2348..e83aabaf1fe 100644 --- a/src/plugins/tracedump/graph_cli.c +++ b/src/plugins/tracedump/graph_cli.c @@ -132,13 +132,11 @@ graph_node_show_cmd (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (graph_node_show_command, static) = { .path = "show graph", .short_help = "show graph [node <index>|<name>] [want_arcs] [input|trace_supported] [drop] [output] [punt] [handoff] [no_free] [polling] [interrupt]", .function = graph_node_show_cmd, }; -/* *INDENT-ON* */ /* diff --git a/src/plugins/tracedump/tracedump.c b/src/plugins/tracedump/tracedump.c index 08d338b1de0..6a26865c1f0 100644 --- a/src/plugins/tracedump/tracedump.c +++ b/src/plugins/tracedump/tracedump.c @@ -552,13 +552,11 @@ tracedump_init (vlib_main_t * vm) } VLIB_INIT_FUNCTION (tracedump_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Streaming packet trace dump plugin", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/api_fuzz_test.c b/src/plugins/unittest/api_fuzz_test.c index 9cf767a5ccd..121c52a310b 100644 --- a/src/plugins/unittest/api_fuzz_test.c +++ b/src/plugins/unittest/api_fuzz_test.c @@ -126,14 +126,12 @@ test_api_fuzz_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_api_fuzz, static) = { .path = "test api fuzz", .short_help = "test api fuzz [disable][seed nnn]\n" " [fuzz-first nn][fuzz-cli-first nn][fuzz-cli-last nn]", .function = test_api_fuzz_command_fn, }; -/* *INDENT-ON* */ static u8 main_loop_enter_enable_api_fuzz; diff --git a/src/plugins/unittest/bihash_test.c b/src/plugins/unittest/bihash_test.c index f0c6da2acc3..1d3aeeca23d 100644 --- a/src/plugins/unittest/bihash_test.c +++ b/src/plugins/unittest/bihash_test.c @@ -541,14 +541,12 @@ test_bihash_command_fn (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_bihash_command, static) = { .path = "test bihash", .short_help = "test bihash", .function = test_bihash_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * bihash_test_init (vlib_main_t * vm) diff --git a/src/plugins/unittest/bitmap_test.c b/src/plugins/unittest/bitmap_test.c index eb232bd11e5..1b05be7b333 100644 --- a/src/plugins/unittest/bitmap_test.c +++ b/src/plugins/unittest/bitmap_test.c @@ -220,13 +220,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_bitmap_command, static) = { .path = "test bitmap", .short_help = "Coverage test for bitmap.h", .function = test_bitmap_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/crypto/aes_cbc.c b/src/plugins/unittest/crypto/aes_cbc.c index 05a16c29a5c..89b0163207f 100644 --- a/src/plugins/unittest/crypto/aes_cbc.c +++ b/src/plugins/unittest/crypto/aes_cbc.c @@ -53,7 +53,6 @@ static u8 ciphertext128[] = { 0x12, 0x0E, 0xCA, 0x30, 0x75, 0x86, 0xE1, 0xA7, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes128_cbc) = { .name = "NIST SP 800-38A", .alg = VNET_CRYPTO_ALG_AES_128_CBC, @@ -63,7 +62,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes128_cbc) = { .ciphertext = TEST_DATA (ciphertext128), }; -/* *INDENT-ON* */ static u8 key192[24] = { 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, @@ -82,7 +80,6 @@ static u8 ciphertext192[64] = { 0xD9, 0x20, 0xA9, 0xE6, 0x4F, 0x56, 0x15, 0xCD, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes192_cbc) = { .name = "NIST SP 800-38A", .alg = VNET_CRYPTO_ALG_AES_192_CBC, @@ -92,7 +89,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes192_cbc) = { .ciphertext = TEST_DATA (ciphertext192), }; -/* *INDENT-ON* */ static u8 key256[32] = { 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, @@ -112,7 +108,6 @@ static u8 ciphertext256[64] = { 0xDA, 0x6C, 0x19, 0x07, 0x8C, 0x6A, 0x9D, 0x1B, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes256_cbc) = { .name = "NIST SP 800-38A", .alg = VNET_CRYPTO_ALG_AES_256_CBC, @@ -151,7 +146,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes256_incr2) = { .key.length = 32, .plaintext_incremental = 1056, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/crypto/aes_ctr.c b/src/plugins/unittest/crypto/aes_ctr.c index 80e66111c12..581e283b0c3 100644 --- a/src/plugins/unittest/crypto/aes_ctr.c +++ b/src/plugins/unittest/crypto/aes_ctr.c @@ -41,7 +41,6 @@ static u8 tc1_ciphertext[] = { 0x1b, 0xef, 0x68, 0x64, 0x99, 0x0d, 0xb6, 0xce, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes128_ctr_tc1) = { .name = "CTR-AES128 TC1", .alg = VNET_CRYPTO_ALG_AES_128_CTR, @@ -50,7 +49,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes128_ctr_tc1) = { .plaintext = TEST_DATA (tc1_plaintext), .ciphertext = TEST_DATA (tc1_ciphertext), }; -/* *INDENT-ON* */ static u8 tc1_192_key[] = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, @@ -68,7 +66,6 @@ static u8 tc1_192_ciphertext[] = { 0x4f, 0x2b, 0x04, 0x59, 0xfe, 0x7e, 0x6e, 0x0b, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes192_ctr_tc1) = { .name = "CTR-AES192 TC1", .alg = VNET_CRYPTO_ALG_AES_192_CTR, @@ -77,7 +74,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes192_ctr_tc1) = { .plaintext = TEST_DATA (tc1_plaintext), .ciphertext = TEST_DATA (tc1_192_ciphertext), }; -/* *INDENT-ON* */ static u8 tc1_256_key[] = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, @@ -96,7 +92,6 @@ static u8 tc1_256_ciphertext[] = { 0xb7, 0xa7, 0xf5, 0x04, 0xbb, 0xf3, 0xd2, 0x28, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes256_ctr_tc1) = { .name = "CTR-AES256 TC1", .alg = VNET_CRYPTO_ALG_AES_256_CTR, @@ -105,7 +100,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (nist_aes256_ctr_tc1) = { .plaintext = TEST_DATA (tc1_plaintext), .ciphertext = TEST_DATA (tc1_256_ciphertext), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/crypto/aes_gcm.c b/src/plugins/unittest/crypto/aes_gcm.c index 3d1b221bf32..daa9ef11dcc 100644 --- a/src/plugins/unittest/crypto/aes_gcm.c +++ b/src/plugins/unittest/crypto/aes_gcm.c @@ -166,7 +166,6 @@ static u8 tc4_tag256[] = { 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (aes_gcm128_tc1) = { .name = "128-GCM Spec. TC1", .alg = VNET_CRYPTO_ALG_AES_128_GCM, @@ -318,7 +317,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (aes_gcm256_inc5) = { .aad.length = 20, .tag.length = 16, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/crypto/chacha20_poly1305.c b/src/plugins/unittest/crypto/chacha20_poly1305.c index 650898524fd..740d6304b8f 100644 --- a/src/plugins/unittest/crypto/chacha20_poly1305.c +++ b/src/plugins/unittest/crypto/chacha20_poly1305.c @@ -61,7 +61,6 @@ static u8 tc1_ciphertext[] = { 0x61, 0x16 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (chacha20_poly1305_tc1) = { .name = "CHACHA20-POLY1305 TC1", .alg = VNET_CRYPTO_ALG_CHACHA20_POLY1305, @@ -72,7 +71,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (chacha20_poly1305_tc1) = { .plaintext = TEST_DATA (tc1_plaintext), .ciphertext = TEST_DATA (tc1_ciphertext), }; -/* *INDENT-ON* */ static u8 tc2_key[] = { 0x2d, 0xb0, 0x5d, 0x40, 0xc8, 0xed, 0x44, 0x88, @@ -100,7 +98,6 @@ static u8 tc2_plaintext[] = { }; static u8 tc2_ciphertext[] = { }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (chacha20_poly1305_tc2) = { .name = "CHACHA20-POLY1305 TC2", .alg = VNET_CRYPTO_ALG_CHACHA20_POLY1305, @@ -111,7 +108,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (chacha20_poly1305_tc2) = { .plaintext = TEST_DATA (tc2_plaintext), .ciphertext = TEST_DATA (tc2_ciphertext), }; -/* *INDENT-ON* */ static u8 tc3_key[] = { 0x4c, 0xf5, 0x96, 0x83, 0x38, 0xe6, 0xae, 0x7f, @@ -137,7 +133,6 @@ static u8 tc3_plaintext[] = { }; static u8 tc3_ciphertext[] = { }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (chacha20_poly1305_tc3) = { .name = "CHACHA20-POLY1305 TC3", .alg = VNET_CRYPTO_ALG_CHACHA20_POLY1305, @@ -148,5 +143,4 @@ UNITTEST_REGISTER_CRYPTO_TEST (chacha20_poly1305_tc3) = { .plaintext = TEST_DATA (tc3_plaintext), .ciphertext = TEST_DATA (tc3_ciphertext), }; -/* *INDENT-ON* */ diff --git a/src/plugins/unittest/crypto/rfc2202_hmac_md5.c b/src/plugins/unittest/crypto/rfc2202_hmac_md5.c index 7a39aed3030..c9604b84c1d 100644 --- a/src/plugins/unittest/crypto/rfc2202_hmac_md5.c +++ b/src/plugins/unittest/crypto/rfc2202_hmac_md5.c @@ -31,7 +31,6 @@ static u8 md5_tc1_digest[] = { 0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc1) = { .name = "RFC2202 HMAC-MD5 TC1", .alg = VNET_CRYPTO_ALG_HMAC_MD5, @@ -39,7 +38,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc1) = { .plaintext = TEST_DATA (md5_tc1_data), .digest = TEST_DATA (md5_tc1_digest), }; -/* *INDENT-ON* */ static char md5_tc2_key[4] = "Jefe"; @@ -50,7 +48,6 @@ static u8 md5_tc2_digest[] = { 0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc2) = { .name = "RFC2202 HMAC-MD5 TC2", .alg = VNET_CRYPTO_ALG_HMAC_MD5, @@ -58,7 +55,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc2) = { .plaintext = TEST_DATA (md5_tc2_data), .digest = TEST_DATA (md5_tc2_digest), }; -/* *INDENT-ON* */ static char md5_tc3_key[16] = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, @@ -80,7 +76,6 @@ static u8 md5_tc3_digest[] = { 0xdb, 0xb8, 0xc7, 0x33, 0xf0, 0xe8, 0xb3, 0xf6, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc3) = { .name = "RFC2202 HMAC-MD5 TC3", .alg = VNET_CRYPTO_ALG_HMAC_MD5, @@ -88,7 +83,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc3) = { .plaintext = TEST_DATA (md5_tc3_data), .digest = TEST_DATA (md5_tc3_digest), }; -/* *INDENT-ON* */ static u8 md5_tc4_key[25] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, @@ -112,7 +106,6 @@ static u8 md5_tc4_digest[] = { 0x3a, 0x75, 0x16, 0x47, 0x46, 0xff, 0xaa, 0x79, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc4) = { .name = "RFC2202 HMAC-MD5 TC4", .alg = VNET_CRYPTO_ALG_HMAC_MD5, @@ -120,7 +113,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc4) = { .plaintext = TEST_DATA (md5_tc4_data), .digest = TEST_DATA (md5_tc4_digest), }; -/* *INDENT-ON* */ static u8 md5_tc5_key[16] = { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, @@ -134,7 +126,6 @@ static u8 md5_tc5_digest[] = { 0xf9, 0xba, 0xb9, 0x95, 0x69, 0x0e, 0xfd, 0x4c, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc5) = { .name = "RFC2202 HMAC-MD5 TC5", .alg = VNET_CRYPTO_ALG_HMAC_MD5, @@ -142,7 +133,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc5) = { .plaintext = TEST_DATA (md5_tc5_data), .digest = TEST_DATA (md5_tc5_digest), }; -/* *INDENT-ON* */ static u8 md5_tc6_key[80] = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, @@ -165,7 +155,6 @@ static u8 md5_tc6_digest[] = { 0x0b, 0x62, 0xe6, 0xce, 0x61, 0xb9, 0xd0, 0xcd, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc6) = { .name = "RFC2202 HMAC-MD5 TC6", .alg = VNET_CRYPTO_ALG_HMAC_MD5, @@ -173,7 +162,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc6) = { .plaintext = TEST_DATA (md5_tc6_data), .digest = TEST_DATA (md5_tc6_digest), }; -/* *INDENT-ON* */ static char md5_tc7_data[73] = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"; @@ -183,7 +171,6 @@ static u8 md5_tc7_digest[] = { 0x1f, 0xb1, 0xf5, 0x62, 0xdb, 0x3a, 0xa5, 0x3e, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc7) = { .name = "RFC2202 HMAC-MD5 TC7", .alg = VNET_CRYPTO_ALG_HMAC_MD5, @@ -203,7 +190,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_md5_tc7_chained) = { TEST_DATA_CHUNK (md5_tc7_data, 40, 33) }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/crypto/rfc2202_hmac_sha1.c b/src/plugins/unittest/crypto/rfc2202_hmac_sha1.c index 2513c5ebad2..aa440625cc6 100644 --- a/src/plugins/unittest/crypto/rfc2202_hmac_sha1.c +++ b/src/plugins/unittest/crypto/rfc2202_hmac_sha1.c @@ -33,7 +33,6 @@ static u8 sha1_tc1_digest[] = { 0xf1, 0x46, 0xbe, 0x00 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc1) = { .name = "RFC2202 HMAC-SHA-1 TC1", .alg = VNET_CRYPTO_ALG_HMAC_SHA1, @@ -41,7 +40,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc1) = { .plaintext = TEST_DATA (sha1_tc1_data), .digest = TEST_DATA (sha1_tc1_digest), }; -/* *INDENT-ON* */ static char sha1_tc2_key[4] = "Jefe"; @@ -53,7 +51,6 @@ static u8 sha1_tc2_digest[] = { 0x25, 0x9a, 0x7c, 0x79 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc2) = { .name = "RFC2202 HMAC-SHA-1 TC2", .alg = VNET_CRYPTO_ALG_HMAC_SHA1, @@ -61,7 +58,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc2) = { .plaintext = TEST_DATA (sha1_tc2_data), .digest = TEST_DATA (sha1_tc2_digest), }; -/* *INDENT-ON* */ static u8 sha1_tc3_key[20] = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, @@ -85,7 +81,6 @@ static u8 sha1_tc3_digest[] = { 0x63, 0xf1, 0x75, 0xd3, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc3) = { .name = "RFC2202 HMAC-SHA-1 TC3", .alg = VNET_CRYPTO_ALG_HMAC_SHA1, @@ -93,7 +88,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc3) = { .plaintext = TEST_DATA (sha1_tc3_data), .digest = TEST_DATA (sha1_tc3_digest), }; -/* *INDENT-ON* */ static u8 sha1_tc4_key[25] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, @@ -118,7 +112,6 @@ static u8 sha1_tc4_digest[] = { 0x2d, 0x72, 0x35, 0xda, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc4) = { .name = "RFC2202 HMAC-SHA-1 TC4", .alg = VNET_CRYPTO_ALG_HMAC_SHA1, @@ -126,7 +119,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc4) = { .plaintext = TEST_DATA (sha1_tc4_data), .digest = TEST_DATA (sha1_tc4_digest), }; -/* *INDENT-ON* */ static u8 sha1_tc5_key[20] = { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, @@ -142,7 +134,6 @@ static u8 sha1_tc5_digest[] = { 0x4a, 0x9a, 0x5a, 0x04 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc5) = { .name = "RFC2202 HMAC-SHA-1 TC5", .alg = VNET_CRYPTO_ALG_HMAC_SHA1, @@ -150,14 +141,12 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc5) = { .plaintext = TEST_DATA (sha1_tc5_data), .digest = TEST_DATA (sha1_tc5_digest), }; -/* *INDENT-ON* */ static u8 sha1_tc5_digest_96[12] = { 0x4c, 0x1a, 0x03, 0x42, 0x4b, 0x55, 0xe0, 0x7f, 0xe7, 0xf2, 0x7b, 0xe1 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc5_trunc) = { .name = "RFC2202 HMAC-SHA-1-96 TC5-trunc", .alg = VNET_CRYPTO_ALG_HMAC_SHA1, @@ -165,7 +154,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc5_trunc) = { .plaintext = TEST_DATA (sha1_tc5_data), .digest = TEST_DATA (sha1_tc5_digest_96), }; -/* *INDENT-ON* */ static u8 sha1_tc6_key[80] = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, @@ -189,7 +177,6 @@ static u8 sha1_tc6_digest[] = { 0xed, 0x40, 0x21, 0x12 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc6) = { .name = "RFC2202 HMAC-SHA-1 TC6", .alg = VNET_CRYPTO_ALG_HMAC_SHA1, @@ -197,7 +184,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc6) = { .plaintext = TEST_DATA (sha1_tc6_data), .digest = TEST_DATA (sha1_tc6_digest), }; -/* *INDENT-ON* */ static char sha1_tc7_data[73] = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"; @@ -208,7 +194,6 @@ static u8 sha1_tc7_digest[20] = { 0xbb, 0xff, 0x1a, 0x91 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc7) = { .name = "RFC2202 HMAC-SHA-1 TC7", .alg = VNET_CRYPTO_ALG_HMAC_SHA1, @@ -237,7 +222,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc7_inc) = { .key.length = 80, .digest.length = 12, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/crypto/rfc4231.c b/src/plugins/unittest/crypto/rfc4231.c index 127e1bfe521..edd502e0609 100644 --- a/src/plugins/unittest/crypto/rfc4231.c +++ b/src/plugins/unittest/crypto/rfc4231.c @@ -61,7 +61,6 @@ static u8 tc1_digest_sha512[] = { 0x2e, 0x69, 0x6c, 0x20, 0x3a, 0x12, 0x68, 0x54 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc1_sha224) = { .name = "RFC4231 TC1", .alg = VNET_CRYPTO_ALG_HMAC_SHA224, @@ -93,7 +92,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc1_sha512) = { .plaintext = TEST_DATA (tc1_data), .digest = TEST_DATA (tc1_digest_sha512), }; -/* *INDENT-ON* */ static char tc2_key[4] = "Jefe"; @@ -133,7 +131,6 @@ static u8 tc2_digest_sha512[] = { 0x63, 0x6e, 0x07, 0x0a, 0x38, 0xbc, 0xe7, 0x37, }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc2_sha224) = { .name = "RFC4231 TC2", .alg = VNET_CRYPTO_ALG_HMAC_SHA224, @@ -165,7 +162,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc2_sha512) = { .plaintext = TEST_DATA (tc2_data), .digest = TEST_DATA (tc2_digest_sha512), }; -/* *INDENT-ON* */ static u8 tc3_key[20] = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, @@ -217,7 +213,6 @@ static u8 tc3_digest_sha512[] = { 0x74, 0x27, 0x88, 0x59, 0xe1, 0x32, 0x92, 0xfb }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc3_sha224) = { .name = "RFC4231 TC3", .alg = VNET_CRYPTO_ALG_HMAC_SHA224, @@ -249,7 +244,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc3_sha512) = { .plaintext = TEST_DATA (tc3_data), .digest = TEST_DATA (tc3_digest_sha512), }; -/* *INDENT-ON* */ static u8 tc4_key[25] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, @@ -302,7 +296,6 @@ static u8 tc4_digest_sha512[] = { 0xe2, 0xad, 0xeb, 0xeb, 0x10, 0xa2, 0x98, 0xdd }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc4_sha224) = { .name = "RFC4231 TC4", .alg = VNET_CRYPTO_ALG_HMAC_SHA224, @@ -334,7 +327,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc4_sha512) = { .plaintext = TEST_DATA (tc4_data), .digest = TEST_DATA (tc4_digest_sha512), }; -/* *INDENT-ON* */ static u8 tc5_key[20] = { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, @@ -368,7 +360,6 @@ static u8 tc5_digest_sha512[16] = { 0x1d, 0x41, 0x79, 0xbc, 0x89, 0x1d, 0x87, 0xa6 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc5_sha224) = { .name = "RFC4231 TC5", .alg = VNET_CRYPTO_ALG_HMAC_SHA224, @@ -400,7 +391,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc5_sha512) = { .plaintext = TEST_DATA (tc5_data), .digest = TEST_DATA (tc5_digest_sha512), }; -/* *INDENT-ON* */ static u8 tc6_key[131] = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, @@ -459,7 +449,6 @@ static u8 tc6_digest_sha512[] = { 0x8b, 0x91, 0x5a, 0x98, 0x5d, 0x78, 0x65, 0x98 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc6_sha224) = { .name = "RFC4231 TC6", .alg = VNET_CRYPTO_ALG_HMAC_SHA224, @@ -491,7 +480,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc6_sha512) = { .plaintext = TEST_DATA (tc6_data), .digest = TEST_DATA (tc6_digest_sha512), }; -/* *INDENT-ON* */ static u8 tc7_key[131] = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, @@ -552,7 +540,6 @@ static u8 tc7_digest_sha512[] = { 0x65, 0xc9, 0x74, 0x40, 0xfa, 0x8c, 0x6a, 0x58 }; -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc7_sha224) = { .name = "RFC4231 TC7", .alg = VNET_CRYPTO_ALG_HMAC_SHA224, @@ -598,7 +585,6 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc4231_tc7_sha512_chain) = { TEST_DATA_CHUNK (tc7_data, 150, 2), }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/crypto_test.c b/src/plugins/unittest/crypto_test.c index 473ed126450..4bc06f71c79 100644 --- a/src/plugins/unittest/crypto_test.c +++ b/src/plugins/unittest/crypto_test.c @@ -454,7 +454,6 @@ test_crypto_static (vlib_main_t * vm, crypto_test_main_t * tm, current_op = ops; current_chained_op = chained_ops; - /* *INDENT-OFF* */ vec_foreach_index (i, rv) { r = rv[i]; @@ -644,7 +643,6 @@ test_crypto_static (vlib_main_t * vm, crypto_test_main_t * tm, op->user_data = i; } } - /* *INDENT-ON* */ vnet_crypto_process_ops (vm, ops, vec_len (ops)); vnet_crypto_process_chained_ops (vm, chained_ops, chunks, @@ -670,10 +668,8 @@ test_crypto_get_key_sz (vnet_crypto_alg_t alg) #define _(n, s, l) \ case VNET_CRYPTO_ALG_##n: \ return l; - /* *INDENT-OFF* */ foreach_crypto_cipher_alg foreach_crypto_aead_alg - /* *INDENT-ON* */ #undef _ case VNET_CRYPTO_ALG_HMAC_MD5: case VNET_CRYPTO_ALG_HMAC_SHA1: @@ -1060,14 +1056,12 @@ test_crypto_command_fn (vlib_main_t * vm, return test_crypto (vm, tm); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_crypto_command, static) = { .path = "test crypto", .short_help = "test crypto", .function = test_crypto_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * crypto_test_init (vlib_main_t * vm) diff --git a/src/plugins/unittest/interface_test.c b/src/plugins/unittest/interface_test.c index 4cf5ae43b3c..b5d5b6f776e 100644 --- a/src/plugins/unittest/interface_test.c +++ b/src/plugins/unittest/interface_test.c @@ -57,14 +57,12 @@ test_interface_command_fn (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_interface_command, static) = { .path = "test interface link-state", .short_help = "test interface link-state <interface> [up] [down]", .function = test_interface_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/ipsec_test.c b/src/plugins/unittest/ipsec_test.c index bb7f2a8d9e2..98253eeb12a 100644 --- a/src/plugins/unittest/ipsec_test.c +++ b/src/plugins/unittest/ipsec_test.c @@ -373,13 +373,11 @@ VLIB_CLI_COMMAND (test_ipsec_spd_perf_command, static) = { .function = test_ipsec_spd_outbound_perf_command_fn, }; -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_ipsec_command, static) = { .path = "test ipsec", .short_help = "test ipsec sa <ID> seq-num <VALUE>", .function = test_ipsec_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/llist_test.c b/src/plugins/unittest/llist_test.c index a67075de44e..5a712cde33e 100644 --- a/src/plugins/unittest/llist_test.c +++ b/src/plugins/unittest/llist_test.c @@ -132,13 +132,11 @@ llist_test_basic (vlib_main_t * vm, unformat_input_t * input) list_test_is_sane (pelts, ll_test, he); i--; - /* *INDENT-OFF* */ clib_llist_foreach (pelts, ll_test, he, e, ({ if (i != e->data) LLIST_TEST (0, "incorrect element i = %u data = %u", i, e->data); i--; })); - /* *INDENT-ON* */ LLIST_TEST (i == -1, "head insertion works i = %d", i); @@ -180,13 +178,11 @@ llist_test_basic (vlib_main_t * vm, unformat_input_t * input) "list should not be empty"); i--; - /* *INDENT-OFF* */ clib_llist_foreach_reverse (pelts, ll_test2, he2, e, ({ if (i != e->data) LLIST_TEST (0, "incorrect element i = %u data = %u", i, e->data); i--; })); - /* *INDENT-ON* */ LLIST_TEST (i == -1, "tail insertion works"); /* @@ -217,13 +213,11 @@ llist_test_basic (vlib_main_t * vm, unformat_input_t * input) i = 0; - /* *INDENT-OFF* */ clib_llist_foreach (pelts, ll_test, he, e, ({ if (i != e->data) LLIST_TEST (0, "incorrect element i = %u data = %u", i, e->data); i++; })); - /* *INDENT-ON* */ LLIST_TEST (i == 100, "move from ll_test2 to ll_test worked i %u", i); @@ -335,14 +329,12 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (llist_test_command, static) = { .path = "test llist", .short_help = "internal llist unit tests", .function = llist_test, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/mactime_test.c b/src/plugins/unittest/mactime_test.c index 46d6263b938..5bc195c9694 100644 --- a/src/plugins/unittest/mactime_test.c +++ b/src/plugins/unittest/mactime_test.c @@ -165,14 +165,12 @@ test_time_range_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_time_range_command, static) = { .path = "test time-range", .short_help = "test time-range", .function = test_time_range_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/mpcap_node.c b/src/plugins/unittest/mpcap_node.c index 083c22e32df..12c62cf13cd 100644 --- a/src/plugins/unittest/mpcap_node.c +++ b/src/plugins/unittest/mpcap_node.c @@ -215,7 +215,6 @@ VLIB_NODE_FN (mpcap_node) (vlib_main_t * vm, vlib_node_runtime_t * node, 0 /* is_trace */ ); } -/* *INDENT-OFF* */ #ifndef CLIB_MARCH_VARIANT VLIB_REGISTER_NODE (mpcap_node) = { @@ -249,7 +248,6 @@ mpcap_node_init (vlib_main_t *vm) VLIB_INIT_FUNCTION (mpcap_node_init); #endif /* CLIB_MARCH_VARIANT */ -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/punt_test.c b/src/plugins/unittest/punt_test.c index 0c4622283e0..7d00e5b8920 100644 --- a/src/plugins/unittest/punt_test.c +++ b/src/plugins/unittest/punt_test.c @@ -129,7 +129,6 @@ punt_test_pg1_ip6 (vlib_main_t * vm, return (punt_test_fwd (vm, node, frame, FIB_PROTOCOL_IP6, SW_IF_INDEX_PG1)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (punt_test_pg0_ip4_node) = { .function = punt_test_pg0_ip4, .name = "punt-test-pg0-ip4", @@ -154,7 +153,6 @@ VLIB_REGISTER_NODE (punt_test_pg1_ip6_node) = { .vector_size = sizeof (u32), .format_trace = format_punt_trace, }; -/* *INDENT-ON* */ typedef struct punt_feat_trace_t_ { @@ -242,7 +240,6 @@ punt_test_feat_ip6 (vlib_main_t * vm, return (punt_test_feat_inline (vm, node, frame, 0)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (punt_test_feat_ip6_node) = { .function = punt_test_feat_ip6, .name = "punt-test-feat-ip6", @@ -273,7 +270,6 @@ VNET_FEATURE_INIT (punt_test_feat_ip4_feature, static) = .arc_name = "ip4-unicast", .node_name = "punt-test-feat-ip4", }; -/* *INDENT-ON* */ static clib_error_t * punt_test (vlib_main_t * vm, @@ -382,14 +378,12 @@ punt_test (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_fib_command, static) = { .path = "test punt", .short_help = "punt unit tests - DO NOT RUN ON A LIVE SYSTEM", .function = punt_test, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/rbtree_test.c b/src/plugins/unittest/rbtree_test.c index bfab98c3cd7..4a1fcc4dd70 100644 --- a/src/plugins/unittest/rbtree_test.c +++ b/src/plugins/unittest/rbtree_test.c @@ -238,14 +238,12 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (rbtree_test_command, static) = { .path = "test rbtree", .short_help = "internal rbtree unit tests", .function = rbtree_test, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/segment_manager_test.c b/src/plugins/unittest/segment_manager_test.c index 35986c780aa..a106470ee48 100644 --- a/src/plugins/unittest/segment_manager_test.c +++ b/src/plugins/unittest/segment_manager_test.c @@ -79,7 +79,6 @@ placeholder_server_rx_callback (session_t * s) return -1; } -/* *INDENT-OFF* */ static session_cb_vft_t placeholder_session_cbs = { .session_reset_callback = placeholder_session_reset_callback, .session_connected_callback = placeholder_session_connected_callback, @@ -89,7 +88,6 @@ static session_cb_vft_t placeholder_session_cbs = { .add_segment_callback = placeholder_add_segment_callback, .del_segment_callback = placeholder_del_segment_callback, }; -/* *INDENT-ON* */ static char *states_str[] = { #define _(sym,str) str, @@ -776,7 +774,6 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tcp_test_command, static) = { .path = "test segment-manager", diff --git a/src/plugins/unittest/session_test.c b/src/plugins/unittest/session_test.c index 96c2465f7fc..b7627acc129 100644 --- a/src/plugins/unittest/session_test.c +++ b/src/plugins/unittest/session_test.c @@ -107,7 +107,6 @@ placeholder_server_rx_callback (session_t * s) return -1; } -/* *INDENT-OFF* */ static session_cb_vft_t placeholder_session_cbs = { .session_reset_callback = placeholder_session_reset_callback, .session_connected_callback = placeholder_session_connected_callback, @@ -117,7 +116,6 @@ static session_cb_vft_t placeholder_session_cbs = { .add_segment_callback = placeholder_add_segment_callback, .del_segment_callback = placeholder_del_segment_callback, }; -/* *INDENT-ON* */ static int session_create_lookpback (u32 table_id, u32 * sw_if_index, @@ -2130,14 +2128,12 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tcp_test_command, static) = { .path = "test session", .short_help = "internal session unit tests", .function = session_test, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/sparse_vec_test.c b/src/plugins/unittest/sparse_vec_test.c index bb875452cdf..b2239c64a18 100644 --- a/src/plugins/unittest/sparse_vec_test.c +++ b/src/plugins/unittest/sparse_vec_test.c @@ -55,14 +55,12 @@ test_sparse_vec_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_sparse_vec_command, static) = { .path = "test sparse_vec", .short_help = "test sparse_vec", .function = test_sparse_vec_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/string_test.c b/src/plugins/unittest/string_test.c index f0e40c5e142..3b39bf56478 100644 --- a/src/plugins/unittest/string_test.c +++ b/src/plugins/unittest/string_test.c @@ -1403,7 +1403,6 @@ string_test_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (string_test_command, static) = { .path = "test string", .short_help = @@ -1414,7 +1413,6 @@ VLIB_CLI_COMMAND (string_test_command, static) = { "strtok_s | clib_strtok | strnlen_s | clib_strnlen | strstr_s ]", .function = string_test_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/svm_fifo_test.c b/src/plugins/unittest/svm_fifo_test.c index 8e186a86c9d..9feb37cbc25 100644 --- a/src/plugins/unittest/svm_fifo_test.c +++ b/src/plugins/unittest/svm_fifo_test.c @@ -43,7 +43,6 @@ typedef struct u32 len; } test_pattern_t; -/* *INDENT-OFF* */ test_pattern_t test_pattern[] = { {380, 8}, {768, 8}, {1156, 8}, {1544, 8}, {1932, 8}, {2320, 8}, {2708, 8}, {2992, 8}, {372, 8}, {760, 8}, {1148, 8}, {1536, 8}, {1924, 8}, {2312, 8}, @@ -102,7 +101,6 @@ test_pattern_t test_pattern[] = { /* missing from original data set */ {388, 4}, {776, 4}, {1164, 4}, {1552, 4}, {1940, 4}, {2328, 4}, }; -/* *INDENT-ON* */ int pattern_cmp (const void *arg1, const void *arg2) @@ -1993,9 +1991,7 @@ sfifo_test_fifo_indirect (vlib_main_t * vm, unformat_input_t * input) return 0; } -/* *INDENT-OFF* */ svm_fifo_trace_elem_t fifo_trace[] = {}; -/* *INDENT-ON* */ static int sfifo_test_fifo_replay (vlib_main_t * vm, unformat_input_t * input) @@ -2863,14 +2859,12 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (svm_fifo_test_command, static) = { .path = "test svm fifo", .short_help = "internal svm fifo unit tests", .function = svm_fifo_test, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/tcp_test.c b/src/plugins/unittest/tcp_test.c index 25b6744244e..34033a0b622 100644 --- a/src/plugins/unittest/tcp_test.c +++ b/src/plugins/unittest/tcp_test.c @@ -35,9 +35,7 @@ } \ } -/* *INDENT-OFF* */ scoreboard_trace_elt_t sb_trace[] = {}; -/* *INDENT-ON* */ static int tcp_test_scoreboard_replay (vlib_main_t * vm, unformat_input_t * input) @@ -1596,14 +1594,12 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tcp_test_command, static) = { .path = "test tcp", .short_help = "internal tcp unit tests", .function = tcp_test, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/test_buffer.c b/src/plugins/unittest/test_buffer.c index 584ce589012..24c86cd8697 100644 --- a/src/plugins/unittest/test_buffer.c +++ b/src/plugins/unittest/test_buffer.c @@ -262,14 +262,12 @@ test_linearize_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_linearize_command, static) = { .path = "test chained-buffer-linearization", .short_help = "test chained-buffer-linearization", .function = test_linearize_fn, }; -/* *INDENT-ON* */ static clib_error_t * test_linearize_speed_fn (vlib_main_t *vm, unformat_input_t *input, diff --git a/src/plugins/unittest/unittest.c b/src/plugins/unittest/unittest.c index 60ebac130da..555516fc9de 100644 --- a/src/plugins/unittest/unittest.c +++ b/src/plugins/unittest/unittest.c @@ -19,14 +19,12 @@ #include <vnet/plugin/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "C unit tests", .default_disabled = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/util_test.c b/src/plugins/unittest/util_test.c index 8dce270f814..53384e55494 100644 --- a/src/plugins/unittest/util_test.c +++ b/src/plugins/unittest/util_test.c @@ -22,13 +22,11 @@ test_crash_command_fn (vlib_main_t * vm, { u64 *p = (u64 *) 0xdefec8ed; - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "deliberate crash: touching %x", .format_args = "i4", }; - /* *INDENT-ON* */ elog (&vlib_global_main.elog_main, &e, 0xdefec8ed); *p = 0xdeadbeef; @@ -37,14 +35,12 @@ test_crash_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_crash_command, static) = { .path = "test crash", .short_help = "crash the bus!", .function = test_crash_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * test_hash_command_fn (vlib_main_t * vm, @@ -98,14 +94,12 @@ test_hash_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_hash_command, static) = { .path = "test hash_memory", .short_help = "page boundary crossing test", .function = test_hash_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/unittest/vlib_test.c b/src/plugins/unittest/vlib_test.c index 3154b7d21cf..c9c46901a4d 100644 --- a/src/plugins/unittest/vlib_test.c +++ b/src/plugins/unittest/vlib_test.c @@ -129,14 +129,12 @@ test_vlib_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_vlib_command, static) = { .path = "test vlib", .short_help = "vlib code coverage unit test", .function = test_vlib_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * test_format_vlib_command_fn (vlib_main_t * vm, @@ -180,14 +178,12 @@ test_format_vlib_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_format_vlib_command, static) = { .path = "test format-vlib", .short_help = "vlib format code coverate unit test", .function = test_format_vlib_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * test_vlib2_command_fn (vlib_main_t * vm, @@ -215,14 +211,12 @@ test_vlib2_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_vlib2_command, static) = { .path = "test vlib2", .short_help = "vlib code coverage unit test #2", .function = test_vlib2_command_fn, }; -/* *INDENT-ON* */ diff --git a/src/plugins/urpf/ip4_urpf.c b/src/plugins/urpf/ip4_urpf.c index 1d329029478..7cbf81c50c3 100644 --- a/src/plugins/urpf/ip4_urpf.c +++ b/src/plugins/urpf/ip4_urpf.c @@ -74,7 +74,6 @@ VLIB_NODE_FN (ip4_tx_urpf_strict) (vlib_main_t * vm, return (urpf_inline (vm, node, frame, AF_IP4, VLIB_TX, URPF_MODE_STRICT)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_rx_urpf_loose) = { .name = "ip4-rx-urpf-loose", .vector_size = sizeof (u32), @@ -160,7 +159,6 @@ VNET_FEATURE_INIT (ip4_tx_urpf_strict_feat, static) = .arc_name = "ip4-output", .node_name = "ip4-tx-urpf-strict", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/urpf/ip6_urpf.c b/src/plugins/urpf/ip6_urpf.c index 48d991573b5..d278289b5e2 100644 --- a/src/plugins/urpf/ip6_urpf.c +++ b/src/plugins/urpf/ip6_urpf.c @@ -74,7 +74,6 @@ VLIB_NODE_FN (ip6_tx_urpf_strict) (vlib_main_t * vm, return (urpf_inline (vm, node, frame, AF_IP6, VLIB_TX, URPF_MODE_STRICT)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_rx_urpf_loose) = { .name = "ip6-rx-urpf-loose", .vector_size = sizeof (u32), @@ -160,7 +159,6 @@ VNET_FEATURE_INIT (ip6_tx_urpf_strict_feat, static) = .arc_name = "ip6-output", .node_name = "ip6-tx-urpf-strict", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/urpf/urpf.c b/src/plugins/urpf/urpf.c index 3c3b33c769c..e5209caafb4 100644 --- a/src/plugins/urpf/urpf.c +++ b/src/plugins/urpf/urpf.c @@ -17,7 +17,6 @@ #include <vnet/fib/fib_table.h> -/* *INDENT-OFF* */ static const char *urpf_feat_arcs[N_AF][VLIB_N_DIR] = { [AF_IP4] = { @@ -53,7 +52,6 @@ static const char *urpf_feats[N_AF][VLIB_N_DIR][URPF_N_MODES] = }, }, }; -/* *INDENT-ON* */ /** * Per-af, per-direction, per-interface uRPF configs @@ -311,14 +309,12 @@ done: * @cliexcmd{set urpf ip4 off GigabitEthernet2/0/0} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip_source_check_command, static) = { .path = "set urpf", .function = urpf_cli_update, .short_help = "set urpf [ip4|ip6] [rx|tx] [off|strict|loose] " "<INTERFACE> [table <table>]", }; -/* *INDENT-ON* */ static clib_error_t * urpf_cli_accept (vlib_main_t * vm, @@ -389,13 +385,11 @@ done: * loose RPF tests: * @cliexcmd{set urpf-accept table 7 10.0.0.0/8 add} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (urpf_accept_command, static) = { .path = "set urpf-accept", .function = urpf_cli_accept, .short_help = "urpf-accept [table <table-id>] [add|del] <PREFIX>", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/urpf/urpf_api.c b/src/plugins/urpf/urpf_api.c index f5d31e1fce6..3d0f4b4e8d4 100644 --- a/src/plugins/urpf/urpf_api.c +++ b/src/plugins/urpf/urpf_api.c @@ -194,12 +194,10 @@ urpf_api_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (urpf_api_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Unicast Reverse Path Forwarding (uRPF)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vhost/vhost_user.c b/src/plugins/vhost/vhost_user.c index fac20800848..fdee984f97b 100644 --- a/src/plugins/vhost/vhost_user.c +++ b/src/plugins/vhost/vhost_user.c @@ -52,7 +52,6 @@ vlib_node_registration_t vhost_user_send_interrupt_node; -/* *INDENT-OFF* */ vhost_user_main_t vhost_user_main = { .mtu_bytes = 1518, }; @@ -60,7 +59,6 @@ vhost_user_main_t vhost_user_main = { VNET_HW_INTERFACE_CLASS (vhost_interface_class, static) = { .name = "vhost-user", }; -/* *INDENT-ON* */ static long get_huge_page_size (int fd) @@ -1193,12 +1191,10 @@ vhost_user_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (vhost_user_init) = { .runs_after = VLIB_INITS("ip4_init"), }; -/* *INDENT-ON* */ static uword vhost_user_send_interrupt_process (vlib_main_t * vm, @@ -1244,7 +1240,6 @@ vhost_user_send_interrupt_process (vlib_main_t * vm, /* fall through */ case ~0: - /* *INDENT-OFF* */ pool_foreach (vui, vum->vhost_user_interfaces) { next_timeout = timeout; FOR_ALL_VHOST_RX_TXQ (qid, vui) @@ -1265,7 +1260,6 @@ vhost_user_send_interrupt_process (vlib_main_t * vm, timeout = next_timeout; } } - /* *INDENT-ON* */ break; default: @@ -1281,13 +1275,11 @@ vhost_user_send_interrupt_process (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vhost_user_send_interrupt_node) = { .function = vhost_user_send_interrupt_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "vhost-user-send-interrupt-process", }; -/* *INDENT-ON* */ static uword vhost_user_process (vlib_main_t * vm, @@ -1314,7 +1306,6 @@ vhost_user_process (vlib_main_t * vm, timeout = 3.0; - /* *INDENT-OFF* */ pool_foreach (vui, vum->vhost_user_interfaces) { if (vui->unix_server_index == ~0) { //Nothing to do for server sockets @@ -1386,18 +1377,15 @@ vhost_user_process (vlib_main_t * vm, } } } - /* *INDENT-ON* */ } return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vhost_user_process_node,static) = { .function = vhost_user_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "vhost-user-process", }; -/* *INDENT-ON* */ /** * Disables and reset interface structure. @@ -1507,11 +1495,9 @@ vhost_user_exit (vlib_main_t * vm) vhost_user_intf_t *vui; vlib_worker_thread_barrier_sync (vlib_get_main ()); - /* *INDENT-OFF* */ pool_foreach (vui, vum->vhost_user_interfaces) { vhost_user_delete_if (vnm, vm, vui->sw_if_index); } - /* *INDENT-ON* */ vlib_worker_thread_barrier_release (vlib_get_main ()); return 0; } @@ -2393,7 +2379,6 @@ done: * Once the vHost interface is created, enable the interface using: * @cliexcmd{set interface state VirtualEthernet0/0/0 up} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vhost_user_connect_command, static) = { .path = "create vhost-user", .short_help = "create vhost-user socket <socket-filename> [server] " @@ -2402,7 +2387,6 @@ VLIB_CLI_COMMAND (vhost_user_connect_command, static) = { .function = vhost_user_connect_command_fn, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /*? * Delete a vHost User interface using the interface name or the @@ -2416,7 +2400,6 @@ VLIB_CLI_COMMAND (vhost_user_connect_command, static) = { * Example of how to delete a vhost interface by software interface index: * @cliexcmd{delete vhost-user sw_if_index 1} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vhost_user_delete_command, static) = { .path = "delete vhost-user", .short_help = "delete vhost-user {<interface> | sw_if_index <sw_idx>}", @@ -2557,14 +2540,12 @@ VLIB_CLI_COMMAND (vhost_user_delete_command, static) = { * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_vhost_user_command, static) = { .path = "show vhost-user", .short_help = "show vhost-user [<interface> [<interface> [..]]] " "[[descriptors] [verbose]]", .function = show_vhost_user_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * diff --git a/src/plugins/vhost/vhost_user.h b/src/plugins/vhost/vhost_user.h index 3479d65cbc6..a3582affb4b 100644 --- a/src/plugins/vhost/vhost_user.h +++ b/src/plugins/vhost/vhost_user.h @@ -122,7 +122,6 @@ int vhost_user_modify_if (vnet_main_t * vnm, vlib_main_t * vm, int vhost_user_delete_if (vnet_main_t * vnm, vlib_main_t * vm, u32 sw_if_index); -/* *INDENT-OFF* */ typedef struct vhost_user_memory_region { u64 guest_phys_addr; @@ -175,7 +174,6 @@ typedef struct vhost_user_msg { vhost_user_log_t log; }; } __attribute ((packed)) vhost_user_msg_t; -/* *INDENT-ON* */ typedef struct { diff --git a/src/plugins/vhost/vhost_user_api.c b/src/plugins/vhost/vhost_user_api.c index 3b0840a1b1b..33447c556a8 100644 --- a/src/plugins/vhost/vhost_user_api.c +++ b/src/plugins/vhost/vhost_user_api.c @@ -90,12 +90,10 @@ vl_api_create_vhost_user_if_t_handler (vl_api_create_vhost_user_if_t * mp) } } - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_CREATE_VHOST_USER_IF_REPLY, ({ rmp->sw_if_index = ntohl (args.sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -190,12 +188,10 @@ vl_api_create_vhost_user_if_v2_t_handler (vl_api_create_vhost_user_if_v2_t * } } - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_CREATE_VHOST_USER_IF_V2_REPLY, ({ rmp->sw_if_index = ntohl (args.sw_if_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/plugins/vhost/vhost_user_inline.h b/src/plugins/vhost/vhost_user_inline.h index 8bdff3733a7..e27f819e96d 100644 --- a/src/plugins/vhost/vhost_user_inline.h +++ b/src/plugins/vhost/vhost_user_inline.h @@ -135,13 +135,11 @@ vhost_map_guest_mem_done: } } #endif - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (el) = { .format = "failed to map guest mem addr %lx", .format_args = "i8", }; - /* *INDENT-ON* */ struct { uword addr; diff --git a/src/plugins/vhost/vhost_user_input.c b/src/plugins/vhost/vhost_user_input.c index c083f43ba7c..ca5072485ff 100644 --- a/src/plugins/vhost/vhost_user_input.c +++ b/src/plugins/vhost/vhost_user_input.c @@ -1447,7 +1447,6 @@ VLIB_NODE_FN (vhost_user_input_node) (vlib_main_t * vm, return n_rx_packets; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vhost_user_input_node) = { .type = VLIB_NODE_TYPE_INPUT, .name = "vhost-user-input", @@ -1463,7 +1462,6 @@ VLIB_REGISTER_NODE (vhost_user_input_node) = { .n_errors = VHOST_USER_INPUT_FUNC_N_ERROR, .error_strings = vhost_user_input_func_error_strings, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vhost/vhost_user_output.c b/src/plugins/vhost/vhost_user_output.c index 9b52fc6265c..58fd4309f8c 100644 --- a/src/plugins/vhost/vhost_user_output.c +++ b/src/plugins/vhost/vhost_user_output.c @@ -1122,7 +1122,6 @@ vhost_user_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, return /* no error */ 0; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (vhost_user_device_class) = { .name = "vhost-user", .tx_function_n_errors = VHOST_USER_TX_FUNC_N_ERROR, @@ -1134,7 +1133,6 @@ VNET_DEVICE_CLASS (vhost_user_device_class) = { .format_tx_trace = format_vhost_trace, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vmxnet3/cli.c b/src/plugins/vmxnet3/cli.c index f751358262b..d682e3ec2c9 100644 --- a/src/plugins/vmxnet3/cli.c +++ b/src/plugins/vmxnet3/cli.c @@ -76,7 +76,6 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vmxnet3_create_command, static) = { .path = "create interface vmxnet3", .short_help = @@ -86,7 +85,6 @@ VLIB_CLI_COMMAND (vmxnet3_create_command, static) = { " [gso]", .function = vmxnet3_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * vmxnet3_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -131,14 +129,12 @@ vmxnet3_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vmxnet3_delete_command, static) = { .path = "delete interface vmxnet3", .short_help = "delete interface vmxnet3 " "{<interface> | sw_if_index <sw_idx>}", .function = vmxnet3_delete_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * vmxnet3_test_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -192,14 +188,12 @@ vmxnet3_test_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vmxnet3_test_command, static) = { .path = "test vmxnet3", .short_help = "test vmxnet3 <interface> | sw_if_index <sw_idx> [irq] " "[elog-on] [elog-off]", .function = vmxnet3_test_command_fn, }; -/* *INDENT-ON* */ static void show_vmxnet3 (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, @@ -582,14 +576,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_vmxnet3_command, static) = { .path = "show vmxnet3", .short_help = "show vmxnet3 [[<interface>] ([desc] | ([rx-comp] | " "[rx-desc-0] | [rx-desc-1] | [tx-comp] | [tx-desc]) [<slot>])]", .function = show_vmxnet3_fn, }; -/* *INDENT-ON* */ clib_error_t * vmxnet3_cli_init (vlib_main_t * vm) diff --git a/src/plugins/vmxnet3/input.c b/src/plugins/vmxnet3/input.c index ebf52d63ff1..25632546b6d 100644 --- a/src/plugins/vmxnet3/input.c +++ b/src/plugins/vmxnet3/input.c @@ -480,7 +480,6 @@ VLIB_NODE_FN (vmxnet3_input_node) (vlib_main_t * vm, } #ifndef CLIB_MARCH_VARIANT -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vmxnet3_input_node) = { .name = "vmxnet3-input", .sibling_of = "device-input", @@ -493,7 +492,6 @@ VLIB_REGISTER_NODE (vmxnet3_input_node) = { }; #endif -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vmxnet3/plugin.c b/src/plugins/vmxnet3/plugin.c index 76f1cfc5e3e..20caf97f612 100644 --- a/src/plugins/vmxnet3/plugin.c +++ b/src/plugins/vmxnet3/plugin.c @@ -19,12 +19,10 @@ #include <vnet/plugin/plugin.h> #include <vpp/app/version.h> -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "VMWare Vmxnet3 Device Driver", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vmxnet3/vmxnet3.c b/src/plugins/vmxnet3/vmxnet3.c index be862d7127a..e64e0d135d6 100644 --- a/src/plugins/vmxnet3/vmxnet3.c +++ b/src/plugins/vmxnet3/vmxnet3.c @@ -145,7 +145,6 @@ static char *vmxnet3_tx_func_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (vmxnet3_device_class,) = { .name = "VMXNET3 interface", @@ -158,7 +157,6 @@ VNET_DEVICE_CLASS (vmxnet3_device_class,) = .tx_function_n_errors = VMXNET3_TX_N_ERROR, .tx_function_error_strings = vmxnet3_tx_func_error_strings, }; -/* *INDENT-ON* */ static u32 vmxnet3_flag_change (vnet_main_t * vnm, vnet_hw_interface_t * hw, u32 flags) @@ -675,7 +673,6 @@ vmxnet3_create_if (vlib_main_t * vm, vmxnet3_create_if_args_t * args) return; } - /* *INDENT-OFF* */ pool_foreach (vd, vmxm->devices) { if (vd->pci_addr.as_u32 == args->addr.as_u32) { @@ -688,7 +685,6 @@ vmxnet3_create_if (vlib_main_t * vm, vmxnet3_create_if_args_t * args) return; } } - /* *INDENT-ON* */ if (args->bind) { @@ -907,7 +903,6 @@ vmxnet3_delete_if (vlib_main_t * vm, vmxnet3_device_t * vd) vlib_pci_device_close (vm, vd->pci_dev_handle); - /* *INDENT-OFF* */ vec_foreach_index (i, vd->rxqs) { vmxnet3_rxq_t *rxq = vec_elt_at_index (vd->rxqs, i); @@ -934,11 +929,9 @@ vmxnet3_delete_if (vlib_main_t * vm, vmxnet3_device_t * vd) } vlib_physmem_free (vm, rxq->rx_comp); } - /* *INDENT-ON* */ vec_free (vd->rxqs); vec_free (vd->rx_stats); - /* *INDENT-OFF* */ vec_foreach_index (i, vd->txqs) { vmxnet3_txq_t *txq = vec_elt_at_index (vd->txqs, i); @@ -959,7 +952,6 @@ vmxnet3_delete_if (vlib_main_t * vm, vmxnet3_device_t * vd) vlib_physmem_free (vm, txq->tx_desc); vlib_physmem_free (vm, txq->tx_comp); } - /* *INDENT-ON* */ vec_free (vd->txqs); vec_free (vd->tx_stats); diff --git a/src/plugins/vmxnet3/vmxnet3_api.c b/src/plugins/vmxnet3/vmxnet3_api.c index 36fa7bd9958..c51c07b705d 100644 --- a/src/plugins/vmxnet3/vmxnet3_api.c +++ b/src/plugins/vmxnet3/vmxnet3_api.c @@ -55,10 +55,8 @@ vl_api_vmxnet3_create_t_handler (vl_api_vmxnet3_create_t * mp) vmxnet3_create_if (vm, &args); rv = args.rv; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_VMXNET3_CREATE_REPLY, ({ rmp->sw_if_index = ntohl (args.sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -172,7 +170,6 @@ vl_api_vmxnet3_dump_t_handler (vl_api_vmxnet3_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (vd, vmxm->devices) { swif = vnet_get_sw_interface (vnm, vd->sw_if_index); @@ -181,7 +178,6 @@ vl_api_vmxnet3_dump_t_handler (vl_api_vmxnet3_dump_t * mp) send_vmxnet3_details (reg, vd, swif, if_name, mp->context); vec_set_len (if_name, 0); } - /* *INDENT-ON* */ vec_free (if_name); } @@ -210,7 +206,6 @@ static void vl_api_sw_vmxnet3_interface_dump_t_handler (vnet_sw_interface_is_api_valid (vnm, filter_sw_if_index) == 0)) goto bad_sw_if_index; - /* *INDENT-OFF* */ pool_foreach (vd, vmxm->devices) { if ((filter_sw_if_index == ~0) || @@ -223,7 +218,6 @@ static void vl_api_sw_vmxnet3_interface_dump_t_handler vec_set_len (if_name, 0); } } - /* *INDENT-ON* */ BAD_SW_IF_INDEX_LABEL; vec_free (if_name); diff --git a/src/plugins/vrrp/node.c b/src/plugins/vrrp/node.c index 3cf4ec49635..d5594ae0e43 100644 --- a/src/plugins/vrrp/node.c +++ b/src/plugins/vrrp/node.c @@ -486,7 +486,6 @@ VLIB_NODE_FN (vrrp4_arp_input_node) (vlib_main_t * vm, return vrrp_arp_nd_input_inline (vm, node, frame, 0 /* is_ipv6 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vrrp4_arp_input_node) = { .name = "vrrp4-arp-input", @@ -519,7 +518,6 @@ VLIB_NODE_FN (vrrp6_nd_input_node) (vlib_main_t * vm, return vrrp_arp_nd_input_inline (vm, node, frame, 1 /* is_ipv6 */); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vrrp6_nd_input_node) = { .name = "vrrp6-nd-input", @@ -699,7 +697,6 @@ VLIB_NODE_FN (vrrp4_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return vrrp_input_inline (vm, node, frame, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vrrp4_input_node) = { .name = "vrrp4-input", @@ -1104,7 +1101,6 @@ vrrp_input_init (vlib_main_t *vm) VLIB_INIT_FUNCTION (vrrp_input_init); -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vrrp/vrrp.c b/src/plugins/vrrp/vrrp.c index f3acb4756fc..fb0659605c7 100644 --- a/src/plugins/vrrp/vrrp.c +++ b/src/plugins/vrrp/vrrp.c @@ -1519,13 +1519,11 @@ vrrp_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (vrrp_init); -/* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "VRRP v3 (RFC 5798)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vrrp/vrrp.h b/src/plugins/vrrp/vrrp.h index cf529a153a4..acab7440ead 100644 --- a/src/plugins/vrrp/vrrp.h +++ b/src/plugins/vrrp/vrrp.h @@ -33,7 +33,6 @@ typedef struct vrrp_vr_key u8 is_ipv6; } vrrp_vr_key_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct vrrp4_arp_key { union { @@ -44,15 +43,12 @@ typedef CLIB_PACKED u64 as_u64; }; }) vrrp4_arp_key_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct vrrp6_nd_key { u32 sw_if_index; ip6_address_t addr; }) vrrp6_nd_key_t; -/* *INDENT-ON* */ typedef struct vrrp_vr_tracking_if { diff --git a/src/plugins/vrrp/vrrp_api.c b/src/plugins/vrrp/vrrp_api.c index 5eb0ffc6f20..e31e0a74c14 100644 --- a/src/plugins/vrrp/vrrp_api.c +++ b/src/plugins/vrrp/vrrp_api.c @@ -318,7 +318,6 @@ vl_api_vrrp_vr_dump_t_handler (vl_api_vrrp_vr_dump_t * mp) sw_if_index = htonl (mp->sw_if_index); - /* *INDENT-OFF* */ pool_foreach (vr, vmp->vrs) { if (sw_if_index && (sw_if_index != ~0) && @@ -327,7 +326,6 @@ vl_api_vrrp_vr_dump_t_handler (vl_api_vrrp_vr_dump_t * mp) send_vrrp_vr_details (vr, reg, mp->context); } - /* *INDENT-ON* */ } static void @@ -466,7 +464,6 @@ vl_api_vrrp_vr_peer_dump_t_handler (vl_api_vrrp_vr_peer_dump_t * mp) return; } - /* *INDENT-OFF* */ pool_foreach (vr, vmp->vrs) { if (!vec_len (vr->config.peer_addrs)) @@ -475,7 +472,6 @@ vl_api_vrrp_vr_peer_dump_t_handler (vl_api_vrrp_vr_peer_dump_t * mp) send_vrrp_vr_details (vr, reg, mp->context); } - /* *INDENT-ON* */ } static void @@ -570,7 +566,6 @@ vl_api_vrrp_vr_track_if_dump_t_handler (vl_api_vrrp_vr_track_if_dump_t * mp) return; } - /* *INDENT-OFF* */ pool_foreach (vr, vmp->vrs) { if (!vec_len (vr->tracking.interfaces)) @@ -579,7 +574,6 @@ vl_api_vrrp_vr_track_if_dump_t_handler (vl_api_vrrp_vr_track_if_dump_t * mp) send_vrrp_vr_track_if_details (vr, reg, mp->context); } - /* *INDENT-ON* */ } static void @@ -613,14 +607,12 @@ vrrp_vr_event (vrrp_vr_t * vr, vrrp_vr_state_t new_state) vpe_client_registration_t *reg; vl_api_registration_t *vl_reg; - /* *INDENT-OFF* */ pool_foreach (reg, vam->vrrp_vr_events_registrations) { vl_reg = vl_api_client_index_to_registration (reg->client_index); if (vl_reg) send_vrrp_vr_event (reg, vl_reg, vr, new_state); } - /* *INDENT-ON* */ } pub_sub_handler (vrrp_vr_events, VRRP_VR_EVENTS); @@ -638,7 +630,6 @@ vrrp_plugin_api_hookup (vlib_main_t * vm) return 0; } -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vrrp/vrrp_cli.c b/src/plugins/vrrp/vrrp_cli.c index 4496bbb7333..fb52da474fa 100644 --- a/src/plugins/vrrp/vrrp_cli.c +++ b/src/plugins/vrrp/vrrp_cli.c @@ -151,7 +151,6 @@ vrrp_vr_add_command_fn (vlib_main_t * vm, unformat_input_t * input, return vrrp_vr_add_del_command_fn (vm, input, cmd, 1 /* is_add */ ); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vrrp_vr_add_command, static) = { .path = "vrrp vr add", @@ -159,7 +158,6 @@ VLIB_CLI_COMMAND (vrrp_vr_add_command, static) = "vrrp vr add <interface> [vr_id <n>] [ipv6] [priority <value>] [interval <value>] [no_preempt] [accept_mode] [unicast] [<ip_addr> ...]", .function = vrrp_vr_add_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * vrrp_vr_del_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -168,14 +166,12 @@ vrrp_vr_del_command_fn (vlib_main_t * vm, unformat_input_t * input, return vrrp_vr_add_del_command_fn (vm, input, cmd, 0 /* is_add */ ); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vrrp_vr_del_command, static) = { .path = "vrrp vr del", .short_help = "vrrp vr del <interface> [vr_id <n>] [ipv6]", .function = vrrp_vr_del_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * vrrp_show_vr_command_fn (vlib_main_t * vm, @@ -208,7 +204,6 @@ vrrp_show_vr_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vrrp_show_vr_command, static) = { .path = "show vrrp vr", @@ -216,7 +211,6 @@ VLIB_CLI_COMMAND (vrrp_show_vr_command, static) = "show vrrp vr [(<intf_name>|sw_if_index <n>)]", .function = vrrp_show_vr_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * vrrp_proto_start_stop_command_fn (vlib_main_t * vm, @@ -377,7 +371,6 @@ done: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vrrp_proto_start_stop_command, static) = { .path = "vrrp proto", @@ -385,9 +378,7 @@ VLIB_CLI_COMMAND (vrrp_proto_start_stop_command, static) = "vrrp proto (start|stop) (<intf_name>|sw_if_index <n>) vr_id <n> [ipv6]", .function = vrrp_proto_start_stop_command_fn, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vrrp_peers_command, static) = { .path = "vrrp peers", @@ -395,7 +386,6 @@ VLIB_CLI_COMMAND (vrrp_peers_command, static) = "vrrp peers (<intf_name>|sw_if_index <n>) vr_id <n> [ipv6] <peer1_addr> [<peer2_addr> ...]", .function = vrrp_peers_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * vrrp_vr_track_if_command_fn (vlib_main_t * vm, @@ -493,7 +483,6 @@ done: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vrrp_vr_track_if_command, static) = { .path = "vrrp vr track-if", @@ -501,7 +490,6 @@ VLIB_CLI_COMMAND (vrrp_vr_track_if_command, static) = "vrrp vr track-if (add|del) (<intf_name>|sw_if_index <n>) vr_id <n> [ipv6] track-index <n> priority <n> [ track-index <n> priority <n> ...]", .function = vrrp_vr_track_if_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vrrp/vrrp_periodic.c b/src/plugins/vrrp/vrrp_periodic.c index 9c1b76ae59d..5f9d7ae938e 100644 --- a/src/plugins/vrrp/vrrp_periodic.c +++ b/src/plugins/vrrp/vrrp_periodic.c @@ -210,14 +210,12 @@ vrrp_periodic_process (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vrrp_periodic_node) = { .function = vrrp_periodic_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "vrrp-periodic-process", .process_log2_n_stack_bytes = 17, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vxlan/decap.c b/src/plugins/vxlan/decap.c index f5d1efa2b86..5f28c5e97bb 100644 --- a/src/plugins/vxlan/decap.c +++ b/src/plugins/vxlan/decap.c @@ -412,7 +412,6 @@ static char *vxlan_error_strings[] = { #undef vxlan_error }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan4_input_node) = { .name = "vxlan4-input", @@ -442,7 +441,6 @@ VLIB_REGISTER_NODE (vxlan6_input_node) = }, .format_trace = format_vxlan_rx_trace, }; -/* *INDENT-ON* */ typedef enum { @@ -875,7 +873,6 @@ VLIB_NODE_FN (ip4_vxlan_bypass_node) (vlib_main_t * vm, return ip_vxlan_bypass_inline (vm, node, frame, /* is_ip4 */ 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_vxlan_bypass_node) = { .name = "ip4-vxlan-bypass", @@ -889,7 +886,6 @@ VLIB_REGISTER_NODE (ip4_vxlan_bypass_node) = .format_trace = format_ip4_forward_next_trace, }; -/* *INDENT-ON* */ /* Dummy init function to get us linked in. */ static clib_error_t * @@ -907,7 +903,6 @@ VLIB_NODE_FN (ip6_vxlan_bypass_node) (vlib_main_t * vm, return ip_vxlan_bypass_inline (vm, node, frame, /* is_ip4 */ 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_vxlan_bypass_node) = { .name = "ip6-vxlan-bypass", @@ -921,7 +916,6 @@ VLIB_REGISTER_NODE (ip6_vxlan_bypass_node) = .format_trace = format_ip6_forward_next_trace, }; -/* *INDENT-ON* */ /* Dummy init function to get us linked in. */ static clib_error_t * @@ -1299,7 +1293,6 @@ VLIB_NODE_FN (vxlan4_flow_input_node) (vlib_main_t * vm, return f->n_vectors; } -/* *INDENT-OFF* */ #ifndef CLIB_MULTIARCH_VARIANT VLIB_REGISTER_NODE (vxlan4_flow_input_node) = { .name = "vxlan-flow-input", @@ -1319,7 +1312,6 @@ VLIB_REGISTER_NODE (vxlan4_flow_input_node) = { }, }; #endif -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vxlan/encap.c b/src/plugins/vxlan/encap.c index e4103ec0083..98464d809ba 100644 --- a/src/plugins/vxlan/encap.c +++ b/src/plugins/vxlan/encap.c @@ -503,7 +503,6 @@ VLIB_NODE_FN (vxlan6_encap_node) (vlib_main_t * vm, return vxlan_encap_inline (vm, node, from_frame, /* is_ip4 */ 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan4_encap_node) = { .name = "vxlan4-encap", .vector_size = sizeof (u32), @@ -529,7 +528,6 @@ VLIB_REGISTER_NODE (vxlan6_encap_node) = { [VXLAN_ENCAP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/vxlan/vxlan.c b/src/plugins/vxlan/vxlan.c index f1ab7a7cb8b..0885550d257 100644 --- a/src/plugins/vxlan/vxlan.c +++ b/src/plugins/vxlan/vxlan.c @@ -128,14 +128,12 @@ vxlan_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) return /* no error */ 0; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (vxlan_device_class, static) = { .name = "VXLAN", .format_device_name = format_vxlan_name, .format_tx_trace = format_vxlan_encap_trace, .admin_up_down_function = vxlan_interface_admin_up_down, }; -/* *INDENT-ON* */ static u8 * format_vxlan_header_with_length (u8 * s, va_list * args) @@ -145,13 +143,11 @@ format_vxlan_header_with_length (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (vxlan_hw_class) = { .name = "VXLAN", .format_header = format_vxlan_header_with_length, .build_rewrite = default_build_rewrite, }; -/* *INDENT-ON* */ static void vxlan_tunnel_restack_dpo (vxlan_tunnel_t * t) @@ -318,7 +314,6 @@ vxlan_decap_next_is_valid (vxlan_main_t * vxm, u32 is_ip6, return decap_next_index < r->n_next_nodes; } -/* *INDENT-OFF* */ typedef CLIB_PACKED(union { struct @@ -328,7 +323,6 @@ typedef CLIB_PACKED(union }; u64 as_u64; }) mcast_shared_t; -/* *INDENT-ON* */ static inline mcast_shared_t mcast_shared_get (ip46_address_t * ip) @@ -915,7 +909,6 @@ vxlan_add_del_tunnel_command_fn (vlib_main_t * vm, * Example of how to delete a VXLAN Tunnel: * @cliexcmd{create vxlan tunnel src 10.0.3.1 dst 10.0.3.3 vni 13 del} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_vxlan_tunnel_command, static) = { .path = "create vxlan tunnel", .short_help = @@ -926,7 +919,6 @@ VLIB_CLI_COMMAND (create_vxlan_tunnel_command, static) = { " [src_port <local-vtep-udp-port>] [dst_port <remote-vtep-udp-port>]", .function = vxlan_add_del_tunnel_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_vxlan_tunnel_command_fn (vlib_main_t * vm, @@ -949,12 +941,10 @@ show_vxlan_tunnel_command_fn (vlib_main_t * vm, if (pool_elts (vxm->tunnels) == 0) vlib_cli_output (vm, "No vxlan tunnels configured..."); -/* *INDENT-OFF* */ pool_foreach (t, vxm->tunnels) { vlib_cli_output (vm, "%U", format_vxlan_tunnel, t); } -/* *INDENT-ON* */ if (raw) { @@ -979,13 +969,11 @@ show_vxlan_tunnel_command_fn (vlib_main_t * vm, encap_fib_index 0 sw_if_index 5 decap_next l2 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_vxlan_tunnel_command, static) = { .path = "show vxlan tunnel", .short_help = "show vxlan tunnel [raw]", .function = show_vxlan_tunnel_command_fn, }; -/* *INDENT-ON* */ void @@ -1119,13 +1107,11 @@ set_ip4_vxlan_bypass (vlib_main_t * vm, * @cliexcmd{set interface ip vxlan-bypass GigabitEthernet2/0/0 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip_vxlan_bypass_command, static) = { .path = "set interface ip vxlan-bypass", .function = set_ip4_vxlan_bypass, .short_help = "set interface ip vxlan-bypass <interface> [del]", }; -/* *INDENT-ON* */ static clib_error_t * set_ip6_vxlan_bypass (vlib_main_t * vm, @@ -1176,13 +1162,11 @@ set_ip6_vxlan_bypass (vlib_main_t * vm, * @cliexcmd{set interface ip6 vxlan-bypass GigabitEthernet2/0/0 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip6_vxlan_bypass_command, static) = { .path = "set interface ip6 vxlan-bypass", .function = set_ip6_vxlan_bypass, .short_help = "set interface ip6 vxlan-bypass <interface> [del]", }; -/* *INDENT-ON* */ int vnet_vxlan_add_del_rx_flow (u32 hw_if_index, u32 t_index, int is_add) @@ -1297,14 +1281,12 @@ vxlan_offload_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vxlan_offload_command, static) = { .path = "set flow-offload vxlan", .short_help = "set flow-offload vxlan hw <interface-name> rx <tunnel-name> [del]", .function = vxlan_offload_command_fn, }; -/* *INDENT-ON* */ #define VXLAN_HASH_NUM_BUCKETS (2 * 1024) #define VXLAN_HASH_MEMORY_SIZE (1 << 20) diff --git a/src/plugins/vxlan/vxlan.h b/src/plugins/vxlan/vxlan.h index 72d82e79cf5..ccddedeb279 100644 --- a/src/plugins/vxlan/vxlan.h +++ b/src/plugins/vxlan/vxlan.h @@ -33,7 +33,6 @@ #include <vnet/dpo/dpo.h> #include <vnet/adj/adj_types.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip4_header_t ip4; /* 20 bytes */ udp_header_t udp; /* 8 bytes */ @@ -45,7 +44,6 @@ typedef CLIB_PACKED (struct { udp_header_t udp; /* 8 bytes */ vxlan_header_t vxlan; /* 8 bytes */ }) ip6_vxlan_header_t; -/* *INDENT-ON* */ /* * Key fields: remote ip, vni on incoming VXLAN packet diff --git a/src/plugins/wireguard/wireguard.c b/src/plugins/wireguard/wireguard.c index a87f73dc6f2..b1c8bc79870 100644 --- a/src/plugins/wireguard/wireguard.c +++ b/src/plugins/wireguard/wireguard.c @@ -92,7 +92,6 @@ wg_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (wg_init); -/* *INDENT-OFF* */ VNET_FEATURE_INIT (wg4_output_tun, static) = { .arc_name = "ip4-output", @@ -111,7 +110,6 @@ VLIB_PLUGIN_REGISTER () = .version = VPP_BUILD_VER, .description = "Wireguard Protocol", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/wireguard/wireguard_cli.c b/src/plugins/wireguard/wireguard_cli.c index 5fa620507d6..e412fa36c44 100644 --- a/src/plugins/wireguard/wireguard_cli.c +++ b/src/plugins/wireguard/wireguard_cli.c @@ -94,14 +94,12 @@ wg_if_create_cli (vlib_main_t * vm, /*? * Create a Wireguard interface. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (wg_if_create_command, static) = { .path = "wireguard create", .short_help = "wireguard create listen-port <port> " "private-key <key> src <IP> [generate-key]", .function = wg_if_create_cli, }; -/* *INDENT-ON* */ static clib_error_t * wg_if_delete_cli (vlib_main_t * vm, @@ -143,13 +141,11 @@ wg_if_delete_cli (vlib_main_t * vm, /*? * Delete a Wireguard interface. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (wg_if_delete_command, static) = { .path = "wireguard delete", .short_help = "wireguard delete <interface>", .function = wg_if_delete_cli, }; -/* *INDENT-ON* */ static clib_error_t * @@ -251,7 +247,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (wg_peer_add_command, static) = { .path = "wireguard peer add", .short_help = @@ -260,7 +255,6 @@ VLIB_CLI_COMMAND (wg_peer_add_command, static) = { "dst-port [port_dst] persistent-keepalive [keepalive_interval]", .function = wg_peer_add_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * wg_peer_remove_command_fn (vlib_main_t * vm, @@ -299,14 +293,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (wg_peer_remove_command, static) = { .path = "wireguard peer remove", .short_help = "wireguard peer remove <index>", .function = wg_peer_remove_command_fn, }; -/* *INDENT-ON* */ static walk_rc_t wg_peer_show_one (index_t peeri, void *arg) @@ -325,14 +317,12 @@ wg_show_peer_command_fn (vlib_main_t * vm, return NULL; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (wg_show_peers_command, static) = { .path = "show wireguard peer", .short_help = "show wireguard peer", .function = wg_show_peer_command_fn, }; -/* *INDENT-ON* */ static walk_rc_t wg_if_show_one (index_t itfi, void *arg) @@ -355,7 +345,6 @@ wg_show_if_command_fn (vlib_main_t * vm, return NULL; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (wg_show_itfs_command, static) = { .path = "show wireguard interface", @@ -417,7 +406,6 @@ VLIB_CLI_COMMAND (wg_show_modemode_command, static) = { .function = wg_show_mode_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/wireguard/wireguard_handoff.c b/src/plugins/wireguard/wireguard_handoff.c index 5f3dc14b412..195baf209a0 100644 --- a/src/plugins/wireguard/wireguard_handoff.c +++ b/src/plugins/wireguard/wireguard_handoff.c @@ -183,7 +183,6 @@ VLIB_NODE_FN (wg6_output_tun_handoff) WG_HANDOFF_OUT_TUN); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (wg4_handshake_handoff) = { .name = "wg4-handshake-handoff", @@ -267,7 +266,6 @@ VLIB_REGISTER_NODE (wg6_output_tun_handoff) = [0] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/wireguard/wireguard_if.c b/src/plugins/wireguard/wireguard_if.c index ee744e7c3e4..afeeda1dd2b 100644 --- a/src/plugins/wireguard/wireguard_if.c +++ b/src/plugins/wireguard/wireguard_if.c @@ -169,7 +169,6 @@ wg_if_update_adj (vnet_main_t * vnm, u32 sw_if_index, adj_index_t ai) } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (wg_if_device_class) = { .name = "Wireguard Tunnel", .format_device_name = format_wg_if_name, @@ -181,7 +180,6 @@ VNET_HW_INTERFACE_CLASS(wg_hw_interface_class) = { .update_adjacency = wg_if_update_adj, .flags = VNET_HW_INTERFACE_CLASS_FLAG_NBMA, }; -/* *INDENT-ON* */ /* * Maintain a bitmap of allocated wg_if instance numbers. @@ -272,13 +270,11 @@ wg_if_create (u32 user_instance, if (instance == ~0) return VNET_API_ERROR_INVALID_REGISTRATION; - /* *INDENT-OFF* */ struct noise_upcall upcall = { .u_remote_get = wg_remote_get, .u_index_set = wg_index_set, .u_index_drop = wg_index_drop, }; - /* *INDENT-ON* */ pool_get (noise_local_pool, local); @@ -419,13 +415,11 @@ wg_if_walk (wg_if_walk_cb_t fn, void *data) { index_t wgii; - /* *INDENT-OFF* */ pool_foreach_index (wgii, wg_if_pool) { if (WALK_STOP == fn(wgii, data)) break; } - /* *INDENT-ON* */ } index_t @@ -433,12 +427,10 @@ wg_if_peer_walk (wg_if_t * wgi, wg_if_peer_walk_cb_t fn, void *data) { index_t peeri, val; - /* *INDENT-OFF* */ hash_foreach (peeri, val, wgi->peers, { if (WALK_STOP == fn (peeri, data)) return peeri; }); - /* *INDENT-ON* */ return INDEX_INVALID; } diff --git a/src/plugins/wireguard/wireguard_input.c b/src/plugins/wireguard/wireguard_input.c index cf8a59715dc..1eb7fbfed0b 100644 --- a/src/plugins/wireguard/wireguard_input.c +++ b/src/plugins/wireguard/wireguard_input.c @@ -1207,7 +1207,6 @@ VLIB_NODE_FN (wg6_input_post_node) return wg_input_post (vm, node, from_frame, /* is_ip4 */ 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (wg4_input_node) = { .name = "wg4-input", @@ -1270,7 +1269,6 @@ VLIB_REGISTER_NODE (wg6_input_post_node) = { .error_strings = wg_input_error_strings, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/wireguard/wireguard_output_tun.c b/src/plugins/wireguard/wireguard_output_tun.c index a5630811b9d..c9411f6ff20 100644 --- a/src/plugins/wireguard/wireguard_output_tun.c +++ b/src/plugins/wireguard/wireguard_output_tun.c @@ -913,7 +913,6 @@ VLIB_NODE_FN (wg6_output_tun_node) wg_encrypt_async_next.wg6_post_next); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (wg4_output_tun_node) = { .name = "wg4-output-tun", @@ -945,7 +944,6 @@ VLIB_REGISTER_NODE (wg6_output_tun_node) = [WG_OUTPUT_NEXT_ERROR] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/plugins/wireguard/wireguard_peer.c b/src/plugins/wireguard/wireguard_peer.c index 32a92da102b..e71db86de0b 100644 --- a/src/plugins/wireguard/wireguard_peer.c +++ b/src/plugins/wireguard/wireguard_peer.c @@ -125,13 +125,11 @@ wg_peer_adj_stack (wg_peer_t *peer, adj_index_t ai) } else { - /* *INDENT-OFF* */ fib_prefix_t dst = { .fp_len = is_ip4 ? 32 : 128, .fp_proto = fib_proto, .fp_addr = peer->dst.addr, }; - /* *INDENT-ON* */ u32 fib_index; fib_index = fib_table_find (fib_proto, peer->table_id); @@ -457,7 +455,6 @@ wg_peer_add (u32 tun_sw_if_index, const u8 public_key[NOISE_PUBLIC_KEY_LEN], if (!wg_if) return (VNET_API_ERROR_INVALID_SW_IF_INDEX); - /* *INDENT-OFF* */ pool_foreach (peer, wg_peer_pool) { if (!memcmp (peer->remote.r_public, public_key, NOISE_PUBLIC_KEY_LEN)) @@ -465,7 +462,6 @@ wg_peer_add (u32 tun_sw_if_index, const u8 public_key[NOISE_PUBLIC_KEY_LEN], return (VNET_API_ERROR_ENTRY_ALREADY_EXISTS); } } - /* *INDENT-ON* */ if (pool_elts (wg_peer_pool) > MAX_PEERS) return (VNET_API_ERROR_LIMIT_EXCEEDED); @@ -526,13 +522,11 @@ wg_peer_walk (wg_peer_walk_cb_t fn, void *data) { index_t peeri; - /* *INDENT-OFF* */ pool_foreach_index (peeri, wg_peer_pool) { if (WALK_STOP == fn(peeri, data)) return peeri; } - /* *INDENT-ON* */ return INDEX_INVALID; } diff --git a/src/plugins/wireguard/wireguard_timer.c b/src/plugins/wireguard/wireguard_timer.c index 4319d534ffc..237e67c1f06 100644 --- a/src/plugins/wireguard/wireguard_timer.c +++ b/src/plugins/wireguard/wireguard_timer.c @@ -434,14 +434,12 @@ wg_timers_stop (wg_peer_t * peer) } } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (wg_timer_mngr_node, static) = { .function = wg_timer_mngr_fn, .type = VLIB_NODE_TYPE_PROCESS, .name = "wg-timer-manager", }; -/* *INDENT-ON* */ void wg_feature_init (wg_main_t * wmp) diff --git a/src/svm/svm.c b/src/svm/svm.c index 5580808909a..d32c0a5d4db 100644 --- a/src/svm/svm.c +++ b/src/svm/svm.c @@ -1300,12 +1300,10 @@ svm_client_scan (const char *root_path) * Snapshoot names, can't hold root rp mutex across * find_or_create. */ - /* *INDENT-OFF* */ pool_foreach (subp, mp->subregions) { name = vec_dup (subp->subregion_name); vec_add1(svm_names, name); } - /* *INDENT-ON* */ pthread_mutex_unlock (&root_rp->mutex); diff --git a/src/svm/svmdb.c b/src/svm/svmdb.c index 531ea1fbb0d..3c69dbf45ba 100644 --- a/src/svm/svmdb.c +++ b/src/svm/svmdb.c @@ -414,7 +414,6 @@ svmdb_local_dump_strings (svmdb_client_t * client) h = client->shm->namespaces[SVMDB_NAMESPACE_STRING]; - /* *INDENT-OFF* */ hash_foreach_mem(key, value, h, ({ svmdb_value_t *v = pool_elt_at_index (shm->values, value); @@ -422,7 +421,6 @@ svmdb_local_dump_strings (svmdb_client_t * client) fformat(stdout, "%s: %s\n", key, vec_len(v->value) ? v->value : (u8 *)"(nil)"); })); - /* *INDENT-ON* */ region_unlock (client->db_rp); } @@ -463,7 +461,6 @@ svmdb_local_serialize_strings (svmdb_client_t * client, char *filename) serialize_likely_small_unsigned_integer (sm, hash_elts (h)); - /* *INDENT-OFF* */ hash_foreach_mem(key, value, h, ({ svmdb_value_t *v = pool_elt_at_index (shm->values, value); @@ -475,7 +472,6 @@ svmdb_local_serialize_strings (svmdb_client_t * client, char *filename) serialize_cstring (sm, (char *)v->value); } })); - /* *INDENT-ON* */ region_unlock (client->db_rp); serialize_close (sm); @@ -610,7 +606,6 @@ svmdb_local_dump_vecs (svmdb_client_t * client) h = client->shm->namespaces[SVMDB_NAMESPACE_VEC]; - /* *INDENT-OFF* */ hash_foreach_mem(key, value, h, ({ svmdb_value_t *v = pool_elt_at_index (shm->values, value); @@ -618,7 +613,6 @@ svmdb_local_dump_vecs (svmdb_client_t * client) format_hex_bytes, v->value, vec_len(v->value)*v->elsize, ((f64 *)(v->value))[0]); })); - /* *INDENT-ON* */ region_unlock (client->db_rp); } diff --git a/src/svm/svmtool.c b/src/svm/svmtool.c index 60859674298..521ddab7eb3 100644 --- a/src/svm/svmtool.c +++ b/src/svm/svmtool.c @@ -72,12 +72,10 @@ format_all_svm_regions (u8 * s, va_list * args) * Snapshoot names, can't hold root rp mutex across * find_or_create. */ - /* *INDENT-OFF* */ pool_foreach (subp, mp->subregions) { name = vec_dup (subp->subregion_name); vec_add1(svm_names, name); } - /* *INDENT-ON* */ pthread_mutex_unlock (&root_rp->mutex); @@ -328,12 +326,10 @@ subregion_repair (char *chroot_path) * Snapshoot names, can't hold root rp mutex across * find_or_create. */ - /* *INDENT-OFF* */ pool_foreach (subp, mp->subregions) { name = vec_dup (subp->subregion_name); vec_add1(svm_names, name); } - /* *INDENT-ON* */ pthread_mutex_unlock (&root_rp->mutex); diff --git a/src/vat/main.c b/src/vat/main.c index e7c08184de3..f4bb0cddee4 100644 --- a/src/vat/main.c +++ b/src/vat/main.c @@ -43,7 +43,6 @@ connect_to_vpe (char *name) return 0; } -/* *INDENT-OFF* */ vlib_global_main_t vlib_global_main; diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c index 64155ea3a46..566b5a858a3 100644 --- a/src/vcl/ldp.c +++ b/src/vcl/ldp.c @@ -662,7 +662,6 @@ ldp_select_init_maps (fd_set * __restrict original, clib_memcpy_fast (*resultb, original, n_bytes); memset (original, 0, n_bytes); - /* *INDENT-OFF* */ clib_bitmap_foreach (fd, *resultb) { if (fd > nfds) break; @@ -672,7 +671,6 @@ ldp_select_init_maps (fd_set * __restrict original, else *vclb = clib_bitmap_set (*vclb, vlsh_to_session_index (vlsh), 1); } - /* *INDENT-ON* */ si_bits_set = clib_bitmap_last_set (*vclb) + 1; *si_bits = (si_bits_set > *si_bits) ? si_bits_set : *si_bits; @@ -692,7 +690,6 @@ ldp_select_vcl_map_to_libc (clib_bitmap_t * vclb, fd_set * __restrict libcb) if (!libcb) return 0; - /* *INDENT-OFF* */ clib_bitmap_foreach (si, vclb) { vlsh = vls_session_index_to_vlsh (si); ASSERT (vlsh != VLS_INVALID_HANDLE); @@ -704,7 +701,6 @@ ldp_select_vcl_map_to_libc (clib_bitmap_t * vclb, fd_set * __restrict libcb) } FD_SET (fd, libcb); } - /* *INDENT-ON* */ return 0; } @@ -717,10 +713,8 @@ ldp_select_libc_map_merge (clib_bitmap_t * result, fd_set * __restrict libcb) if (!libcb) return; - /* *INDENT-OFF* */ clib_bitmap_foreach (fd, result) FD_SET ((int)fd, libcb); - /* *INDENT-ON* */ } int diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c index 412db8def3b..69dd15b0ef4 100644 --- a/src/vcl/vcl_locked.c +++ b/src/vcl/vcl_locked.c @@ -863,7 +863,6 @@ vls_share_sessions (vls_worker_t * vls_parent_wrk, vls_worker_t * vls_wrk) { vcl_locked_session_t *vls, *parent_vls; - /* *INDENT-OFF* */ pool_foreach (vls, vls_wrk->vls_pool) { /* Initialize sharing on parent session */ if (vls->shared_data_index == ~0) @@ -874,7 +873,6 @@ vls_share_sessions (vls_worker_t * vls_parent_wrk, vls_worker_t * vls_wrk) } vls_share_session (vls_wrk, vls); } - /* *INDENT-ON* */ } static void @@ -1399,13 +1397,11 @@ vls_mt_session_cleanup (vcl_locked_session_t * vls) current_vcl_wrk = vcl_get_worker_index (); - /* *INDENT-OFF* */ hash_foreach (wrk_index, session_index, vls->vcl_wrk_index_to_session_index, ({ if (current_vcl_wrk != wrk_index) vls_send_session_cleanup_rpc (wrk, wrk_index, session_index); })); - /* *INDENT-ON* */ hash_free (vls->vcl_wrk_index_to_session_index); } @@ -1580,7 +1576,6 @@ vls_select_mp_checks (vcl_si_set * read_map) vlsl->select_mp_check = 1; wrk = vcl_worker_get_current (); - /* *INDENT-OFF* */ clib_bitmap_foreach (si, read_map) { s = vcl_session_get (wrk, si); if (s->session_state == VCL_STATE_LISTEN) @@ -1589,7 +1584,6 @@ vls_select_mp_checks (vcl_si_set * read_map) vls_mp_checks (vls, 1 /* is_add */); } } - /* *INDENT-ON* */ } int @@ -1622,13 +1616,11 @@ vls_unshare_vcl_worker_sessions (vcl_worker_t * wrk) current_wrk = vcl_get_worker_index (); is_current = current_wrk == wrk->wrk_index; - /* *INDENT-OFF* */ pool_foreach (s, wrk->sessions) { vls = vls_get (vls_si_wi_to_vlsh (s->session_index, wrk->wrk_index)); if (vls && (is_current || vls_is_shared_by_wrk (vls, current_wrk))) vls_unshare_session (vls, wrk); } - /* *INDENT-ON* */ } static void diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 5174fe844e3..a0a0336c787 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -1440,12 +1440,10 @@ vppcom_app_destroy (void) current_wrk = vcl_worker_get_current (); - /* *INDENT-OFF* */ pool_foreach (wrk, vcm->workers) { if (current_wrk != wrk) vcl_worker_cleanup (wrk, 0 /* notify vpp */ ); } - /* *INDENT-ON* */ vcl_api_detach (current_wrk); vcl_worker_cleanup (current_wrk, 0 /* notify vpp */ ); diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c index e1dcf7ed827..b43c1dace97 100644 --- a/src/vlib/buffer.c +++ b/src/vlib/buffer.c @@ -600,10 +600,8 @@ format_vlib_buffer_pool (u8 * s, va_list * va) "Pool Name", "Index", "NUMA", "Size", "Data Size", "Total", "Avail", "Cached", "Used"); - /* *INDENT-OFF* */ vec_foreach (bpt, bp->threads) cached += bpt->n_cached; - /* *INDENT-ON* */ s = format (s, "%-20v%=6d%=6d%=6u%=11u%=6u%=8u%=8u%=8u", bp->name, bp->index, bp->numa_node, @@ -638,13 +636,11 @@ show_buffers (vlib_main_t *vm, unformat_input_t *input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_buffers_command, static) = { .path = "show buffers", .short_help = "Show packet buffer allocation", .function = show_buffers, }; -/* *INDENT-ON* */ clib_error_t * vlib_buffer_num_workers_change (vlib_main_t *vm) @@ -767,10 +763,8 @@ buffer_get_cached (vlib_buffer_pool_t * bp) clib_spinlock_lock (&bp->lock); - /* *INDENT-OFF* */ vec_foreach (bpt, bp->threads) cached += bpt->n_cached; - /* *INDENT-ON* */ clib_spinlock_unlock (&bp->lock); @@ -859,7 +853,6 @@ vlib_buffer_main_init (struct vlib_main_t * vm) clib_panic ("system have more than %u NUMA nodes", VLIB_BUFFER_MAX_NUMA_NODES); - /* *INDENT-OFF* */ clib_bitmap_foreach (numa_node, bmp) { u8 *index = bm->default_buffer_pool_index_for_numa + numa_node; @@ -874,7 +867,6 @@ vlib_buffer_main_init (struct vlib_main_t * vm) if (first_valid_buffer_pool_index == 0xff) first_valid_buffer_pool_index = index[0]; } - /* *INDENT-ON* */ if (first_valid_buffer_pool_index == (u8) ~ 0) { @@ -882,14 +874,12 @@ vlib_buffer_main_init (struct vlib_main_t * vm) goto done; } - /* *INDENT-OFF* */ clib_bitmap_foreach (numa_node, bmp) { if (bm->default_buffer_pool_index_for_numa[numa_node] == (u8) ~0) bm->default_buffer_pool_index_for_numa[numa_node] = first_valid_buffer_pool_index; } - /* *INDENT-ON* */ vec_foreach (bp, bm->buffer_pools) { diff --git a/src/vlib/cli.c b/src/vlib/cli.c index 5dd25980c8c..98d57c6ccb0 100644 --- a/src/vlib/cli.c +++ b/src/vlib/cli.c @@ -55,36 +55,28 @@ int vl_api_get_elog_trace_api_messages (void); static void *current_traced_heap; /* Root of all show commands. */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_show_command, static) = { .path = "show", .short_help = "Show commands", }; -/* *INDENT-ON* */ /* Root of all clear commands. */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_clear_command, static) = { .path = "clear", .short_help = "Clear commands", }; -/* *INDENT-ON* */ /* Root of all set commands. */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_set_command, static) = { .path = "set", .short_help = "Set commands", }; -/* *INDENT-ON* */ /* Root of all test commands. */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_test_command, static) = { .path = "test", .short_help = "Test commands", }; -/* *INDENT-ON* */ /* Returns bitmap of commands which match key. */ static uword * @@ -363,7 +355,6 @@ vlib_cli_get_possible_completions (u8 * str) /* if we have a space at the end of input, and a unique match, * autocomplete the next level of subcommands */ help_next_level = (vec_len (str) == 0) || isspace (str[vec_len (str) - 1]); - /* *INDENT-OFF* */ clib_bitmap_foreach (index, match_bitmap) { if (help_next_level && is_unique) { c = get_sub_command (vcm, c, index); @@ -375,7 +366,6 @@ vlib_cli_get_possible_completions (u8 * str) sc = &c->sub_commands[index]; vec_add1(result, (u8*) sc->name); } - /* *INDENT-ON* */ done: clib_bitmap_free (match_bitmap); @@ -625,13 +615,11 @@ vlib_cli_dispatch_sub_commands (vlib_main_t * vm, { if (PREDICT_FALSE (vm->elog_trace_cli_commands)) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "cli-cmd: %s", .format_args = "T4", }; - /* *INDENT-ON* */ struct { u32 c; @@ -657,13 +645,11 @@ vlib_cli_dispatch_sub_commands (vlib_main_t * vm, if (PREDICT_FALSE (vm->elog_trace_cli_commands)) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "cli-cmd: %s %s", .format_args = "T4T4", }; - /* *INDENT-ON* */ struct { u32 c, err; @@ -977,14 +963,12 @@ show_memory_usage (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_memory_usage_command, static) = { .path = "show memory", .short_help = "show memory [api-segment][stats-segment][verbose]\n" " [numa-heaps][map][main-heap]", .function = show_memory_usage, }; -/* *INDENT-ON* */ static clib_error_t * show_cpu (vlib_main_t * vm, unformat_input_t * input, @@ -1011,13 +995,11 @@ show_cpu (vlib_main_t * vm, unformat_input_t * input, * Base Frequency: 3.20 GHz * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_cpu_command, static) = { .path = "show cpu", .short_help = "Show cpu information", .function = show_cpu, }; -/* *INDENT-ON* */ static clib_error_t * enable_disable_memory_trace (vlib_main_t * vm, @@ -1125,14 +1107,12 @@ enable_disable_memory_trace (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (enable_disable_memory_trace_command, static) = { .path = "memory-trace", .short_help = "memory-trace on|off [api-segment][stats-segment][main-heap]\n" " [numa-heap <numa-id>]\n", .function = enable_disable_memory_trace, }; -/* *INDENT-ON* */ static clib_error_t * restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input, @@ -1146,13 +1126,11 @@ restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input, extern char **environ; /* Close all known open files */ - /* *INDENT-OFF* */ pool_foreach (f, fm->file_pool) { if (f->file_descriptor > 2) close(f->file_descriptor); } - /* *INDENT-ON* */ /* Exec ourself */ execve (vgm->name, (char **) vgm->argv, environ); @@ -1160,13 +1138,11 @@ restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (restart_cmd,static) = { .path = "restart", .short_help = "restart process", .function = restart_cmd_fn, }; -/* *INDENT-ON* */ #ifdef TEST_CODE /* @@ -1192,13 +1168,11 @@ sleep_ten_seconds (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ping_command, static) = { .path = "test sleep", .function = sleep_ten_seconds, .short_help = "Sleep for 10 seconds", }; -/* *INDENT-ON* */ #endif /* ifdef TEST_CODE */ static uword @@ -1649,7 +1623,6 @@ print_status: * @cliend * @cliexcmd{event-logger trace [api][cli][barrier][disable]} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (event_logger_trace_command, static) = { .path = "event-logger trace", @@ -1657,7 +1630,6 @@ VLIB_CLI_COMMAND (event_logger_trace_command, static) = "[circuit-node <name> e.g. ethernet-input][disable]", .function = event_logger_trace_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * suspend_command_fn (vlib_main_t * vm, @@ -1667,7 +1639,6 @@ suspend_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (suspend_command, static) = { .path = "suspend", @@ -1675,7 +1646,6 @@ VLIB_CLI_COMMAND (suspend_command, static) = .function = suspend_command_fn, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static int @@ -1866,7 +1836,6 @@ show_cli_command_fn (vlib_main_t * vm, * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_cli_command, static) = { .path = "show cli", @@ -1874,7 +1843,6 @@ VLIB_CLI_COMMAND (show_cli_command, static) = .function = show_cli_command_fn, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * vlib_cli_init (vlib_main_t * vm) diff --git a/src/vlib/drop.c b/src/vlib/drop.c index 2a10225eb7a..66eb98fb899 100644 --- a/src/vlib/drop.c +++ b/src/vlib/drop.c @@ -258,7 +258,6 @@ VLIB_NODE_FN (error_punt_node) (vlib_main_t * vm, return process_drop_punt (vm, node, frame, ERROR_DISPOSITION_PUNT); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (error_drop_node) = { .name = "drop", .flags = VLIB_NODE_FLAG_IS_DROP, @@ -266,9 +265,7 @@ VLIB_REGISTER_NODE (error_drop_node) = { .format_trace = format_error_trace, .validate_frame = validate_error_frame, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (error_punt_node) = { .name = "punt", .flags = (VLIB_NODE_FLAG_FRAME_NO_FREE_AFTER_DISPATCH @@ -277,7 +274,6 @@ VLIB_REGISTER_NODE (error_punt_node) = { .format_trace = format_error_trace, .validate_frame = validate_error_frame, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vlib/error.c b/src/vlib/error.c index de2020f08cb..3008af307bf 100644 --- a/src/vlib/error.c +++ b/src/vlib/error.c @@ -362,21 +362,17 @@ show_errors (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_show_errors) = { .path = "show errors", .short_help = "Show error counts", .function = show_errors, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_node_counters, static) = { .path = "show node counters", .short_help = "Show node counters", .function = show_errors, }; -/* *INDENT-ON* */ static clib_error_t * clear_error_counters (vlib_main_t * vm, @@ -395,21 +391,17 @@ clear_error_counters (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_clear_error_counters, static) = { .path = "clear errors", .short_help = "Clear error counters", .function = clear_error_counters, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_clear_node_counters, static) = { .path = "clear node counters", .short_help = "Clear node counters", .function = clear_error_counters, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vlib/handoff_trace.c b/src/vlib/handoff_trace.c index 964c095b9f6..1370ba2c95a 100644 --- a/src/vlib/handoff_trace.c +++ b/src/vlib/handoff_trace.c @@ -75,7 +75,6 @@ typedef enum HANDOFF_TRACE_N_NEXT, } tplaceholder_next_t; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (handoff_trace_node, static) = { .name = "handoff_trace", @@ -94,7 +93,6 @@ VLIB_REGISTER_NODE (handoff_trace_node, static) = .n_errors = ARRAY_LEN(handoff_trace_error_strings), .error_strings = handoff_trace_error_strings, }; -/* *INDENT-ON* */ int vlib_add_handoff_trace (vlib_main_t * vm, vlib_buffer_t * b) @@ -117,7 +115,6 @@ vlib_add_handoff_trace (vlib_main_t * vm, vlib_buffer_t * b) } -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vlib/init.c b/src/vlib/init.c index 4a56ab20b4a..55f260b74ed 100644 --- a/src/vlib/init.c +++ b/src/vlib/init.c @@ -270,12 +270,10 @@ again: } /* Finally, clean up all the fine data we allocated */ - /* *INDENT-OFF* */ hash_foreach_pair (hp, index_by_name, ({ vec_add1 (keys_to_delete, (u8 *)hp->key); })); - /* *INDENT-ON* */ hash_free (index_by_name); for (i = 0; i < vec_len (keys_to_delete); i++) vec_free (keys_to_delete[i]); @@ -657,12 +655,10 @@ show_init_function_command_fn (vlib_main_t * vm, } } } - /* *INDENT-OFF* */ hash_foreach_pair (hp, index_by_name, ({ vec_add1 (keys_to_delete, (u8 *)hp->key); })); - /* *INDENT-ON* */ hash_free (index_by_name); for (i = 0; i < vec_len (keys_to_delete); i++) vec_free (keys_to_delete[i]); @@ -679,13 +675,11 @@ show_init_function_command_fn (vlib_main_t * vm, * @cliexstart{show init-function [init | enter | exit] [verbose [nn]]} * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_init_function, static) = { .path = "show init-function", .short_help = "show init-function [init | enter | exit][verbose [nn]]", .function = show_init_function_command_fn, }; -/* *INDENT-ON* */ /* diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c index 3af97414ed8..08923bebcdf 100644 --- a/src/vlib/linux/pci.c +++ b/src/vlib/linux/pci.c @@ -898,10 +898,8 @@ vlib_pci_register_msix_handler (vlib_main_t * vm, vlib_pci_dev_handle_t h, return clib_error_return (0, "vfio driver is needed for MSI-X interrupt " "support"); - /* *INDENT-OFF* */ vec_validate_init_empty (p->msix_irqs, start + count - 1, (linux_pci_irq_t) { .fd = -1}); - /* *INDENT-ON* */ for (i = start; i < start + count; i++) { @@ -1079,7 +1077,6 @@ add_device_vfio (vlib_main_t * vm, linux_pci_device_t * p, if (p->supports_va_dma) { vlib_buffer_pool_t *bp; - /* *INDENT-OFF* */ vec_foreach (bp, vm->buffer_main->buffer_pools) { u32 i; @@ -1088,7 +1085,6 @@ add_device_vfio (vlib_main_t * vm, linux_pci_device_t * p, for (i = 0; i < pm->n_pages; i++) vfio_map_physmem_page (vm, pm->base + (i << pm->log2_page_size)); } - /* *INDENT-ON* */ } if (r && r->init_function) @@ -1241,10 +1237,8 @@ vlib_pci_map_region_int (vlib_main_t * vm, vlib_pci_dev_handle_t h, return error; } - /* *INDENT-OFF* */ vec_validate_init_empty (p->regions, bar, (linux_pci_region_t) { .fd = -1}); - /* *INDENT-ON* */ if (p->type == LINUX_PCI_DEVICE_TYPE_UIO) p->regions[bar].fd = fd; p->regions[bar].addr = *result; @@ -1425,7 +1419,6 @@ vlib_pci_device_close (vlib_main_t * vm, vlib_pci_dev_handle_t h) err = vfio_set_irqs (vm, p, VFIO_PCI_MSIX_IRQ_INDEX, 0, 0, VFIO_IRQ_SET_ACTION_TRIGGER, 0); clib_error_free (err); - /* *INDENT-OFF* */ vec_foreach (irq, p->msix_irqs) { if (irq->fd == -1) @@ -1433,12 +1426,10 @@ vlib_pci_device_close (vlib_main_t * vm, vlib_pci_dev_handle_t h) clib_file_del_by_index (&file_main, irq->clib_file_index); close (irq->fd); } - /* *INDENT-ON* */ vec_free (p->msix_irqs); } } - /* *INDENT-OFF* */ vec_foreach (res, p->regions) { if (res->size == 0) @@ -1447,7 +1438,6 @@ vlib_pci_device_close (vlib_main_t * vm, vlib_pci_dev_handle_t h) if (res->fd != -1) close (res->fd); } - /* *INDENT-ON* */ vec_free (p->regions); close (p->fd); @@ -1571,7 +1561,6 @@ linux_pci_init (vlib_main_t * vm) ASSERT (sizeof (vlib_pci_addr_t) == sizeof (u32)); addrs = vlib_pci_get_all_dev_addrs (); - /* *INDENT-OFF* */ vec_foreach (addr, addrs) { vlib_pci_device_info_t *d; @@ -1581,17 +1570,14 @@ linux_pci_init (vlib_main_t * vm) vlib_pci_free_device_info (d); } } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (linux_pci_init) = { .runs_after = VLIB_INITS("unix_input_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vlib/linux/vmbus.c b/src/vlib/linux/vmbus.c index 541c88b6537..9dc9d554ebd 100644 --- a/src/vlib/linux/vmbus.c +++ b/src/vlib/linux/vmbus.c @@ -455,12 +455,10 @@ linux_vmbus_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (linux_vmbus_init) = { .runs_before = VLIB_INITS("unix_input_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vlib/log.c b/src/vlib/log.c index 387c202fc9c..60fb9fb5178 100644 --- a/src/vlib/log.c +++ b/src/vlib/log.c @@ -29,11 +29,9 @@ vlib_log_main_t log_main = { .default_rate_limit = 50, }; -/* *INDENT-OFF* */ VLIB_REGISTER_LOG_CLASS (log_log, static) = { .class_name = "log", }; -/* *INDENT-ON* */ static const int colors[] = { [VLIB_LOG_LEVEL_EMERG] = 1, /* red */ @@ -90,7 +88,6 @@ format_indent (u8 * s, va_list * args) u32 indent = va_arg (*args, u32); u8 *c; - /* *INDENT-OFF* */ vec_foreach (c, v) { vec_add (s, c, 1); @@ -98,7 +95,6 @@ format_indent (u8 * s, va_list * args) for (u32 i = 0; i < indent; i++) vec_add1 (s, (u8) ' '); } - /* *INDENT-ON* */ return s; } @@ -408,13 +404,11 @@ show_log (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_log, static) = { .path = "show logging", .short_help = "show logging", .function = show_log, }; -/* *INDENT-ON* */ static clib_error_t * show_log_config (vlib_main_t * vm, @@ -456,13 +450,11 @@ show_log_config (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_log_config, static) = { .path = "show logging configuration", .short_help = "show logging configuration", .function = show_log_config, }; -/* *INDENT-ON* */ static clib_error_t * clear_log (vlib_main_t * vm, @@ -487,13 +479,11 @@ clear_log (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_clear_log, static) = { .path = "clear logging", .short_help = "clear logging", .function = clear_log, }; -/* *INDENT-ON* */ static uword unformat_vlib_log_level (unformat_input_t * input, va_list * args) @@ -621,14 +611,12 @@ set_log_class (vlib_main_t * vm, return rv; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_set_log, static) = { .path = "set logging class", .short_help = "set logging class <class> [rate-limit <int>] " "[level <level>] [syslog-level <level>]", .function = set_log_class, }; -/* *INDENT-ON* */ static clib_error_t * set_log_unth_time (vlib_main_t * vm, @@ -655,13 +643,11 @@ set_log_unth_time (vlib_main_t * vm, return rv; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_set_log_params, static) = { .path = "set logging unthrottle-time", .short_help = "set logging unthrottle-time <int>", .function = set_log_unth_time, }; -/* *INDENT-ON* */ static clib_error_t * set_log_size (vlib_main_t * vm, @@ -691,13 +677,11 @@ set_log_size (vlib_main_t * vm, return rv; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_set_log_size, static) = { .path = "set logging size", .short_help = "set logging size <int>", .function = set_log_size, }; -/* *INDENT-ON* */ static uword unformat_vlib_log_subclass (unformat_input_t * input, va_list * args) @@ -770,13 +754,11 @@ test_log_class_subclass (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_test_log, static) = { .path = "test log", .short_help = "test log <level> <class> <subclass> <message>", .function = test_log_class_subclass, }; -/* *INDENT-ON* */ static clib_error_t * log_config_class (vlib_main_t * vm, char *name, unformat_input_t * input) diff --git a/src/vlib/main.c b/src/vlib/main.c index 5f070f6b218..04b58762646 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -240,13 +240,11 @@ show_frame_stats (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_frame_stats_cli, static) = { .path = "show vlib frame-allocation", .short_help = "Show node dispatch frame statistics", .function = show_frame_stats, }; -/* *INDENT-ON* */ /* Change ownership of enqueue rights to given next node. */ static void @@ -634,13 +632,11 @@ vlib_cli_elog_clear (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (elog_clear_cli, static) = { .path = "event-logger clear", .short_help = "Clear the event log", .function = vlib_cli_elog_clear, }; -/* *INDENT-ON* */ #ifdef CLIB_UNIX static clib_error_t * @@ -689,13 +685,11 @@ vlib_post_mortem_dump (void) (vgm->post_mortem_callbacks[i]) (); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (elog_save_cli, static) = { .path = "event-logger save", .short_help = "event-logger save <filename> (saves log in /tmp/<filename>)", .function = elog_save_buffer, }; -/* *INDENT-ON* */ static clib_error_t * elog_stop (vlib_main_t * vm, @@ -709,13 +703,11 @@ elog_stop (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (elog_stop_cli, static) = { .path = "event-logger stop", .short_help = "Stop the event-logger", .function = elog_stop, }; -/* *INDENT-ON* */ static clib_error_t * elog_restart (vlib_main_t * vm, @@ -729,13 +721,11 @@ elog_restart (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (elog_restart_cli, static) = { .path = "event-logger restart", .short_help = "Restart the event-logger", .function = elog_restart, }; -/* *INDENT-ON* */ static clib_error_t * elog_resize_command_fn (vlib_main_t * vm, @@ -759,13 +749,11 @@ elog_resize_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (elog_resize_cli, static) = { .path = "event-logger resize", .short_help = "event-logger resize <nnn>", .function = elog_resize_command_fn, }; -/* *INDENT-ON* */ #endif /* CLIB_UNIX */ @@ -818,13 +806,11 @@ elog_show_buffer (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (elog_show_cli, static) = { .path = "show event-logger", .short_help = "Show event logger info", .function = elog_show_buffer, }; -/* *INDENT-ON* */ void vlib_gdb_show_event_log (void) @@ -981,7 +967,6 @@ dispatch_node (vlib_main_t * vm, polling mode and vice versa. */ if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_ADAPTIVE_MODE)) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .function = (char *) __FUNCTION__, @@ -992,7 +977,6 @@ dispatch_node (vlib_main_t * vm, "interrupt", "polling", }, }; - /* *INDENT-ON* */ struct { u32 node_name, vector_length, is_polling; @@ -1597,7 +1581,6 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) if (is_main) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (es) = { .format = "process tw start", @@ -1608,7 +1591,6 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) .format = "process tw end: %d", .format_args = "i4", }; - /* *INDENT-ON* */ struct { diff --git a/src/vlib/node.c b/src/vlib/node.c index c98f390e334..8f6c852188b 100644 --- a/src/vlib/node.c +++ b/src/vlib/node.c @@ -130,12 +130,10 @@ vlib_node_runtime_update (vlib_main_t * vm, u32 node_index, u32 next_index) && pf->next_frame_index >= i) pf->next_frame_index += n_insert; } - /* *INDENT-OFF* */ pool_foreach (pf, nm->suspended_process_frames) { if (pf->next_frame_index != ~0 && pf->next_frame_index >= i) pf->next_frame_index += n_insert; } - /* *INDENT-ON* */ r->n_next_nodes = vec_len (node->next_nodes); } @@ -223,7 +221,6 @@ vlib_node_add_next_with_slot (vlib_main_t * vm, { uword sib_node_index, sib_slot; vlib_node_t *sib_node; - /* *INDENT-OFF* */ clib_bitmap_foreach (sib_node_index, node->sibling_bitmap) { sib_node = vec_elt (nm->nodes, sib_node_index); if (sib_node != node) @@ -232,7 +229,6 @@ vlib_node_add_next_with_slot (vlib_main_t * vm, ASSERT (sib_slot == slot); } } - /* *INDENT-ON* */ } vlib_worker_thread_barrier_release (vm); diff --git a/src/vlib/node_cli.c b/src/vlib/node_cli.c index 075430e4761..d0bdf5b9097 100644 --- a/src/vlib/node_cli.c +++ b/src/vlib/node_cli.c @@ -85,13 +85,11 @@ show_node_graph (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_node_graph_command, static) = { .path = "show vlib graph", .short_help = "Show packet processing node graph", .function = show_node_graph, }; -/* *INDENT-ON* */ static clib_error_t * show_node_graphviz (vlib_main_t * vm, @@ -324,14 +322,12 @@ show_node_graphviz (vlib_main_t * vm, * @cliend * @cliexcmd{show vlib graphviz [filter][calls][vectors][file <filename>]} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_node_graphviz_command, static) = { .path = "show vlib graphviz", .short_help = "Dump packet processing node graph as a graphviz dotfile", .function = show_node_graphviz, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static u8 * format_vlib_node_state (u8 * s, va_list * va) @@ -630,14 +626,12 @@ show_node_runtime (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_node_runtime_command, static) = { .path = "show runtime", .short_help = "Show packet processing runtime", .function = show_node_runtime, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * clear_node_runtime (vlib_main_t * vm, @@ -685,13 +679,11 @@ clear_node_runtime (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_node_runtime_command, static) = { .path = "clear runtime", .short_help = "Clear packet processing runtime statistics", .function = clear_node_runtime, }; -/* *INDENT-ON* */ static clib_error_t * show_node (vlib_main_t * vm, unformat_input_t * input, @@ -811,7 +803,6 @@ show_node (vlib_main_t * vm, unformat_input_t * input, if (n->type == VLIB_NODE_TYPE_INTERNAL) { int j = 0; - /* *INDENT-OFF* */ clib_bitmap_foreach (i, n->prev_node_bitmap) { vlib_node_t *pn = vlib_get_node (vm, i); if (j++ % 3 == 0) @@ -820,7 +811,6 @@ show_node (vlib_main_t * vm, unformat_input_t * input, s = format (s, "%-35v", s2); vec_reset_length (s2); } - /* *INDENT-ON* */ if (vec_len (s) == 0) s = format (s, "\n none"); @@ -855,7 +845,6 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_node_command, static) = { .path = "show node", .short_help = "show node [index] <node-name | node-index>", @@ -908,13 +897,11 @@ done: return err; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_node_fn_command, static) = { .path = "set node function", .short_help = "set node function <node-name> <variant-name>", .function = set_node_fn, }; -/* *INDENT-ON* */ /* Dummy function to get us linked in. */ void diff --git a/src/vlib/node_format.c b/src/vlib/node_format.c index 54cea9ff804..9e0d1a7de6f 100644 --- a/src/vlib/node_format.c +++ b/src/vlib/node_format.c @@ -73,13 +73,11 @@ format_vlib_node_graph (u8 * s, va_list * va) } j = 0; - /* *INDENT-OFF* */ clib_bitmap_foreach (i, n->prev_node_bitmap) { vec_validate_init_empty (tmps, j, empty); tmps[j].prev_node = i; j++; } - /* *INDENT-ON* */ for (i = 0; i < vec_len (tmps); i++) { diff --git a/src/vlib/pci/pci.h b/src/vlib/pci/pci.h index 06a2a176419..becfa80f37a 100644 --- a/src/vlib/pci/pci.h +++ b/src/vlib/pci/pci.h @@ -43,7 +43,6 @@ #include <vlib/vlib.h> #include <vlib/pci/pci_config.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED (union { struct @@ -55,7 +54,6 @@ typedef CLIB_PACKED (union }; u32 as_u32; }) vlib_pci_addr_t; -/* *INDENT-ON* */ typedef struct vlib_pci_device_info { diff --git a/src/vlib/physmem.c b/src/vlib/physmem.c index 15e912fd9e7..c6727bb92cb 100644 --- a/src/vlib/physmem.c +++ b/src/vlib/physmem.c @@ -163,13 +163,11 @@ show_physmem (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_physmem_command, static) = { .path = "show physmem", .short_help = "show physmem [verbose | detail | map]", .function = show_physmem, }; -/* *INDENT-ON* */ static clib_error_t * vlib_physmem_config (vlib_main_t * vm, unformat_input_t * input) diff --git a/src/vlib/punt.c b/src/vlib/punt.c index 4a5e42db203..b59e5d251be 100644 --- a/src/vlib/punt.c +++ b/src/vlib/punt.c @@ -254,12 +254,10 @@ punt_reg_mk_dp (vlib_punt_reason_t reason) old = punt_dp_db[reason]; - /* *INDENT-OFF* */ hash_foreach (key, pri, punt_reg_db, ({ vec_add1(pris, pri); })); - /* *INDENT-ON* */ /* * A check for an empty vector is done in the DP, so the a zero @@ -594,26 +592,22 @@ punt_client_show (vlib_main_t * vm, { u8 *name; - /* *INDENT-OFF* */ hash_foreach(name, pci, punt_client_db, ({ vlib_cli_output (vm, "%U", format_punt_client, pci, PUNT_FORMAT_FLAG_NONE); })); - /* *INDENT-ON* */ } return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (punt_client_show_command, static) = { .path = "show punt client", .short_help = "show client[s] registered with the punt infra", .function = punt_client_show, }; -/* *INDENT-ON* */ static clib_error_t * punt_reason_show (vlib_main_t * vm, @@ -629,14 +623,12 @@ punt_reason_show (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (punt_reason_show_command, static) = { .path = "show punt reasons", .short_help = "show all punt reasons", .function = punt_reason_show, }; -/* *INDENT-ON* */ static clib_error_t * punt_db_show (vlib_main_t * vm, @@ -645,12 +637,10 @@ punt_db_show (vlib_main_t * vm, u32 pri, ii, jj; u64 key; - /* *INDENT-OFF* */ hash_foreach (key, pri, punt_reg_db, ({ vlib_cli_output (vm, " %U", format_punt_reg, pri); })); - /* *INDENT-ON* */ vlib_cli_output (vm, "\nDerived data-plane data-base:"); vlib_cli_output (vm, @@ -672,14 +662,12 @@ punt_db_show (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (punt_db_show_command, static) = { .path = "show punt db", .short_help = "show the punt DB", .function = punt_db_show, }; -/* *INDENT-ON* */ static clib_error_t * punt_stats_show (vlib_main_t * vm, @@ -699,14 +687,12 @@ punt_stats_show (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (punt_stats_show_command, static) = { .path = "show punt stats", .short_help = "show the punt stats", .function = punt_stats_show, }; -/* *INDENT-ON* */ static clib_error_t * punt_init (vlib_main_t * vm) diff --git a/src/vlib/punt_node.c b/src/vlib/punt_node.c index de721046057..4b81a61715a 100644 --- a/src/vlib/punt_node.c +++ b/src/vlib/punt_node.c @@ -280,7 +280,6 @@ VLIB_NODE_FN (punt_dispatch_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (punt_dispatch_node) = { .name = "punt-dispatch", .vector_size = sizeof (u32), @@ -293,7 +292,6 @@ VLIB_REGISTER_NODE (punt_dispatch_node) = { }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT clib_error_t * diff --git a/src/vlib/threads.c b/src/vlib/threads.c index b96cbf9470c..f0cb69b3400 100644 --- a/src/vlib/threads.c +++ b/src/vlib/threads.c @@ -280,7 +280,6 @@ vlib_thread_init (vlib_main_t * vm) if (tr->coremask) { uword c; - /* *INDENT-OFF* */ clib_bitmap_foreach (c, tr->coremask) { if (clib_bitmap_get(avail_cpu, c) == 0) return clib_error_return (0, "cpu %u is not available to be used" @@ -288,7 +287,6 @@ vlib_thread_init (vlib_main_t * vm) avail_cpu = clib_bitmap_set(avail_cpu, c, 0); } - /* *INDENT-ON* */ } else { @@ -1623,13 +1621,11 @@ vlib_worker_thread_fn (void *arg) vlib_worker_loop (vm); } -/* *INDENT-OFF* */ VLIB_REGISTER_THREAD (worker_thread_reg, static) = { .name = "workers", .short_name = "wk", .function = vlib_worker_thread_fn, }; -/* *INDENT-ON* */ extern clib_march_fn_registration *vlib_frame_queue_dequeue_with_aux_fn_march_fn_registrations; @@ -1751,14 +1747,12 @@ show_clock_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (f_command, static) = { .path = "show clock", .short_help = "show clock", .function = show_clock_command_fn, }; -/* *INDENT-ON* */ vlib_thread_main_t * vlib_get_thread_main_not_inline (void) diff --git a/src/vlib/threads.h b/src/vlib/threads.h index 9617cdd32e3..ac0c1d5d266 100644 --- a/src/vlib/threads.h +++ b/src/vlib/threads.h @@ -363,12 +363,10 @@ vlib_worker_thread_barrier_check (void) if (PREDICT_FALSE (vlib_worker_threads->barrier_elog_enabled)) { vlib_worker_thread_t *w = vlib_worker_threads + thread_index; - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "barrier-wait-thread-%d", .format_args = "i4", }; - /* *INDENT-ON* */ struct { @@ -412,12 +410,10 @@ vlib_worker_thread_barrier_check (void) { t = vlib_time_now (vm) - t; vlib_worker_thread_t *w = vlib_worker_threads + thread_index; - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "barrier-refork-thread-%d", .format_args = "i4", }; - /* *INDENT-ON* */ struct { @@ -439,12 +435,10 @@ vlib_worker_thread_barrier_check (void) { t = vlib_time_now (vm) - t; vlib_worker_thread_t *w = vlib_worker_threads + thread_index; - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "barrier-released-thread-%d: %dus", .format_args = "i4i4", }; - /* *INDENT-ON* */ struct { diff --git a/src/vlib/threads_cli.c b/src/vlib/threads_cli.c index 9b304664283..2872a025d66 100644 --- a/src/vlib/threads_cli.c +++ b/src/vlib/threads_cli.c @@ -85,13 +85,11 @@ show_threads_fn (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_threads_command, static) = { .path = "show threads", .short_help = "Show threads", .function = show_threads_fn, }; -/* *INDENT-ON* */ /* * Trigger threads to grab frame queue trace data @@ -181,14 +179,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_trace_frame_queue,static) = { .path = "trace frame-queue", .short_help = "trace frame-queue (on|off)", .function = trace_frame_queue, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* @@ -363,21 +359,17 @@ show_frame_queue_histogram (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_show_frame_queue_trace,static) = { .path = "show frame-queue", .short_help = "show frame-queue trace", .function = show_frame_queue_trace, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_show_frame_queue_histogram,static) = { .path = "show frame-queue histogram", .short_help = "show frame-queue histogram", .function = show_frame_queue_histogram, }; -/* *INDENT-ON* */ /* @@ -446,13 +438,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_test_frame_queue_nelts,static) = { .path = "test frame-queue nelts", .short_help = "test frame-queue nelts (4,8,16,32)", .function = test_frame_queue_nelts, }; -/* *INDENT-ON* */ /* @@ -525,13 +515,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_test_frame_queue_threshold,static) = { .path = "test frame-queue threshold", .short_help = "test frame-queue threshold N (0=no limit)", .function = test_frame_queue_threshold, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vlib/trace.c b/src/vlib/trace.c index 15355572cb9..fa085387e4b 100644 --- a/src/vlib/trace.c +++ b/src/vlib/trace.c @@ -173,12 +173,10 @@ format_vlib_trace (u8 * s, va_list * va) } /* Root of all trace cli commands. */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (trace_cli_command,static) = { .path = "trace", .short_help = "Packet tracer commands", }; -/* *INDENT-ON* */ int trace_time_cmp (void *a1, void *a2) @@ -256,7 +254,6 @@ trace_apply_filter (vlib_main_t * vm) * of any N traces. */ n_accepted = 0; - /* *INDENT-OFF* */ pool_foreach (h, tm->trace_buffer_pool) { accept = filter_accept(tm, h[0]); @@ -266,7 +263,6 @@ trace_apply_filter (vlib_main_t * vm) else n_accepted++; } - /* *INDENT-ON* */ /* remove all traces that we don't want to keep */ for (index = 0; index < vec_len (traces_to_remove); index++) @@ -357,13 +353,11 @@ cli_show_trace_buffer (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_trace_cli,static) = { .path = "show trace", .short_help = "Show trace buffer [max COUNT]", .function = cli_show_trace_buffer, }; -/* *INDENT-ON* */ int vlib_enable_disable_pkt_trace_filter (int enable) __attribute__ ((weak)); @@ -471,13 +465,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (add_trace_cli,static) = { .path = "trace add", .short_help = "trace add <input-graph-node> <add'l-pkts-for-node-> [filter] [verbose]", .function = cli_add_trace_buffer, }; -/* *INDENT-ON* */ /* * Configure a filter for packet traces. @@ -575,13 +567,11 @@ cli_filter_trace (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (filter_trace_cli,static) = { .path = "trace filter", .short_help = "trace filter none | [include|exclude] NODE COUNT", .function = cli_filter_trace, }; -/* *INDENT-ON* */ static clib_error_t * cli_clear_trace_buffer (vlib_main_t * vm, @@ -591,13 +581,11 @@ cli_clear_trace_buffer (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_trace_cli,static) = { .path = "clear trace", .short_help = "Clear trace buffer and free memory", .function = cli_clear_trace_buffer, }; -/* *INDENT-ON* */ /* Placeholder function to get us linked in. */ void diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c index cb13e0f09fa..90cf61d811d 100644 --- a/src/vlib/unix/cli.c +++ b/src/vlib/unix/cli.c @@ -3317,21 +3317,17 @@ unix_cli_quit (vlib_main_t * vm, * If VPP is running in @em interactive mode and this is the console session * (that is, the session on @c stdin) then this will also terminate VPP. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (unix_cli_quit_command, static) = { .path = "quit", .short_help = "Exit CLI", .function = unix_cli_quit, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (unix_cli_q_command, static) = { .path = "q", .short_help = "Exit CLI", .function = unix_cli_quit, }; -/* *INDENT-ON* */ /** CLI command to execute a VPP command script. */ static clib_error_t * @@ -3466,14 +3462,12 @@ done: * Example of how to execute a set of CLI commands from a file: * @cliexcmd{exec /usr/share/vpp/scripts/gigup.txt} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_exec, static) = { .path = "exec", .short_help = "exec <filename>", .function = unix_cli_exec, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /** CLI command to show various unix error statistics. */ static clib_error_t * @@ -3542,13 +3536,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_show_errors, static) = { .path = "show unix errors", .short_help = "Show Unix system call error history", .function = unix_show_errors, }; -/* *INDENT-ON* */ /** CLI command to show various unix error statistics. */ static clib_error_t * @@ -3564,7 +3556,6 @@ unix_show_files (vlib_main_t * vm, vlib_cli_output (vm, "%3s %6s %12s %12s %12s %-32s %s", "FD", "Thread", "Read", "Write", "Error", "File Name", "Description"); - /* *INDENT-OFF* */ pool_foreach (f, fm->file_pool) { int rv; @@ -3579,19 +3570,16 @@ unix_show_files (vlib_main_t * vm, path, f->description); vec_reset_length (s); } - /* *INDENT-ON* */ vec_free (s); return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_show_files, static) = { .path = "show unix files", .short_help = "Show Unix files in use", .function = unix_show_files, }; -/* *INDENT-ON* */ /** CLI command to show session command history. */ static clib_error_t * @@ -3622,13 +3610,11 @@ unix_cli_show_history (vlib_main_t * vm, /*? * Displays the command history for the current session, if any. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_cli_show_history, static) = { .path = "history", .short_help = "Show current session command history", .function = unix_cli_show_history, }; -/* *INDENT-ON* */ /** CLI command to show terminal status. */ static clib_error_t * @@ -3695,13 +3681,11 @@ unix_cli_show_terminal (vlib_main_t * vm, * CRLF mode: LF * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_cli_show_terminal, static) = { .path = "show terminal", .short_help = "Show current session terminal settings", .function = unix_cli_show_terminal, }; -/* *INDENT-ON* */ /** CLI command to display a list of CLI sessions. */ static clib_error_t * @@ -3778,13 +3762,11 @@ unix_cli_show_cli_sessions (vlib_main_t * vm, * - @em P EPIPE detected on connection; it will close soon. * - @em A ANSI-capable terminal. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_cli_show_cli_sessions, static) = { .path = "show cli-sessions", .short_help = "Show current CLI sessions", .function = unix_cli_show_cli_sessions, }; -/* *INDENT-ON* */ /** CLI command to set terminal pager settings. */ static clib_error_t * @@ -3835,13 +3817,11 @@ done: * Additionally allows the pager buffer size to be set; though note that * this value is set globally and not per session. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_cli_set_terminal_pager, static) = { .path = "set terminal pager", .short_help = "set terminal pager [on|off] [limit <lines>]", .function = unix_cli_set_terminal_pager, }; -/* *INDENT-ON* */ /** CLI command to set terminal history settings. */ static clib_error_t * @@ -3906,13 +3886,11 @@ done: * This command also allows the maximum size of the history buffer for * this session to be altered. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_cli_set_terminal_history, static) = { .path = "set terminal history", .short_help = "set terminal history [on|off] [limit <lines>]", .function = unix_cli_set_terminal_history, }; -/* *INDENT-ON* */ /** CLI command to set terminal ANSI settings. */ static clib_error_t * @@ -3945,13 +3923,11 @@ unix_cli_set_terminal_ansi (vlib_main_t * vm, * ANSI control sequences are used in a small number of places to provide, * for example, color text output and to control the cursor in the pager. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_cli_set_terminal_ansi, static) = { .path = "set terminal ansi", .short_help = "set terminal ansi [on|off]", .function = unix_cli_set_terminal_ansi, }; -/* *INDENT-ON* */ #define MAX_CLI_WAIT 86400 @@ -3985,13 +3961,11 @@ unix_wait_cmd (vlib_main_t * vm, unformat_free (line_input); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_wait_cmd, static) = { .path = "wait", .short_help = "wait <sec>", .function = unix_wait_cmd, }; -/* *INDENT-ON* */ static clib_error_t * echo_cmd (vlib_main_t * vm, @@ -4012,13 +3986,11 @@ echo_cmd (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_unix_echo_cmd, static) = { .path = "echo", .short_help = "echo <rest-of-line>", .function = echo_cmd, }; -/* *INDENT-ON* */ static clib_error_t * define_cmd_fn (vlib_main_t * vm, @@ -4050,14 +4022,12 @@ define_cmd_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (define_cmd, static) = { .path = "define", .short_help = "define <variable-name> <value>", .function = define_cmd_fn, }; -/* *INDENT-ON* */ static clib_error_t * undefine_cmd_fn (vlib_main_t * vm, @@ -4076,13 +4046,11 @@ undefine_cmd_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (undefine_cmd, static) = { .path = "undefine", .short_help = "undefine <variable-name>", .function = undefine_cmd_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_macro_cmd_fn (vlib_main_t * vm, @@ -4100,13 +4068,11 @@ show_macro_cmd_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_macro, static) = { .path = "show macro", .short_help = "show macro [noevaluate]", .function = show_macro_cmd_fn, }; -/* *INDENT-ON* */ static clib_error_t * unix_cli_init (vlib_main_t * vm) diff --git a/src/vlib/unix/input.c b/src/vlib/unix/input.c index 6d244b049c9..e96cd902466 100644 --- a/src/vlib/unix/input.c +++ b/src/vlib/unix/input.c @@ -370,13 +370,11 @@ linux_epoll_input (vlib_main_t * vm, return linux_epoll_input_inline (vm, node, frame, thread_index); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (linux_epoll_input_node,static) = { .function = linux_epoll_input, .type = VLIB_NODE_TYPE_PRE_INPUT, .name = "unix-epoll-input", }; -/* *INDENT-ON* */ clib_error_t * linux_epoll_input_init (vlib_main_t * vm) @@ -419,12 +417,10 @@ unix_input_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (unix_input_init) = { .runs_before = VLIB_INITS ("linux_epoll_input_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c index f09a537a48d..38eef4125a9 100644 --- a/src/vlib/unix/main.c +++ b/src/vlib/unix/main.c @@ -71,12 +71,10 @@ unix_main_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (unix_main_init) = { .runs_before = VLIB_INITS ("unix_input_init"), }; -/* *INDENT-ON* */ static int unsetup_signal_handlers (int sig) @@ -284,14 +282,12 @@ startup_config_process (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (startup_config_node,static) = { .function = startup_config_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "startup-config-process", .process_log2_n_stack_bytes = 18, }; -/* *INDENT-ON* */ static clib_error_t * unix_config (vlib_main_t * vm, unformat_input_t * input) diff --git a/src/vlib/unix/plugin.c b/src/vlib/unix/plugin.c index 1260089f4ff..fd3a050b944 100644 --- a/src/vlib/unix/plugin.c +++ b/src/vlib/unix/plugin.c @@ -640,7 +640,6 @@ vlib_plugins_show_cmd_fn (vlib_main_t * vm, s = format (s, " Plugin path is: %s\n\n", pm->plugin_path); s = format (s, " %-41s%-33s%s\n", "Plugin", "Version", "Description"); - /* *INDENT-OFF* */ hash_foreach_mem (key, value, pm->plugin_by_name_hash, { if (key != 0) @@ -652,21 +651,18 @@ vlib_plugins_show_cmd_fn (vlib_main_t * vm, index++; } }); - /* *INDENT-ON* */ vlib_cli_output (vm, "%v", s); vec_free (s); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (plugins_show_cmd, static) = { .path = "show plugins", .short_help = "show loaded plugins", .function = vlib_plugins_show_cmd_fn, }; -/* *INDENT-ON* */ static clib_error_t * config_one_plugin (vlib_main_t * vm, char *name, unformat_input_t * input) diff --git a/src/vlibapi/api.h b/src/vlibapi/api.h index 705678b7965..74957a6f0f6 100644 --- a/src/vlibapi/api.h +++ b/src/vlibapi/api.h @@ -28,13 +28,11 @@ #include <vlib/unix/unix.h> #include <vlibapi/api_common.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED ( struct { u32 nitems; u32 msgtbl_size; u8 wrapped; }) vl_api_trace_file_header_t; -/* *INDENT-ON* */ int vl_msg_api_trace_save (api_main_t *am, vl_api_trace_which_t which, FILE *fp, u8 is_json); diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c index d2f17593284..7de1906f17a 100644 --- a/src/vlibapi/api_shared.c +++ b/src/vlibapi/api_shared.c @@ -32,13 +32,11 @@ #include <vppinfra/elog.h> #include <vppinfra/callback.h> -/* *INDENT-OFF* */ static api_main_t api_global_main = { .region_name = "/unset", .api_uid = -1, .api_gid = -1, }; -/* *INDENT-ON* */ /* Please use vlibapi_get_main() to access my_api_main */ __thread api_main_t *my_api_main = &api_global_main; @@ -209,13 +207,11 @@ vl_api_serialize_message_table (api_main_t * am, u8 * vector) /* serialize the count */ serialize_integer (sm, nmsg, sizeof (u32)); - /* *INDENT-OFF* */ hash_foreach_pair (hp, am->msg_index_by_name_and_crc, ({ serialize_likely_small_unsigned_integer (sm, hp->value[0]); serialize_cstring (sm, (char *) hp->key); })); - /* *INDENT-ON* */ return serialize_close_vector (sm); } @@ -505,13 +501,11 @@ msg_handler_internal (api_main_t *am, void *the_msg, uword msg_len, if (PREDICT_FALSE (am->elog_trace_api_messages)) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "api-msg: %s", .format_args = "T4", }; - /* *INDENT-ON* */ struct { u32 c; @@ -593,7 +587,6 @@ msg_handler_internal (api_main_t *am, void *the_msg, uword msg_len, if (PREDICT_FALSE (am->elog_trace_api_messages)) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "api-msg-done(%s): %s", @@ -605,7 +598,6 @@ msg_handler_internal (api_main_t *am, void *the_msg, uword msg_len, "mp-safe", } }; - /* *INDENT-ON* */ struct { diff --git a/src/vlibapi/memory_shared.c b/src/vlibapi/memory_shared.c index 77a610b9434..efa45e1f5b5 100644 --- a/src/vlibapi/memory_shared.c +++ b/src/vlibapi/memory_shared.c @@ -767,13 +767,11 @@ vl_msg_api_send_shmem (svm_queue_t * q, u8 * elem) { if (PREDICT_FALSE (am->elog_trace_api_messages)) { - /* *INDENT-OFF* */ ELOG_TYPE_DECLARE (e) = { .format = "api-client-queue-stuffed: %x%x", .format_args = "i4i4", }; - /* *INDENT-ON* */ struct { u32 hi, low; diff --git a/src/vlibapi/node_serialize.c b/src/vlibapi/node_serialize.c index 061f763358d..09b59247eab 100644 --- a/src/vlibapi/node_serialize.c +++ b/src/vlibapi/node_serialize.c @@ -326,13 +326,11 @@ test_node_serialize_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_node_serialize_node, static) = { .path = "test node serialize", .short_help = "test node serialize [max-threads NN] nexts stats", .function = test_node_serialize_command_fn, }; -/* *INDENT-ON* */ #endif /* diff --git a/src/vlibmemory/memory_api.c b/src/vlibmemory/memory_api.c index 01fe49bfe31..39c6b0fd15b 100644 --- a/src/vlibmemory/memory_api.c +++ b/src/vlibmemory/memory_api.c @@ -661,14 +661,12 @@ vl_mem_api_dead_client_scan (api_main_t * am, vl_shmem_hdr_t * shm, f64 now) vec_reset_length (dead_indices); vec_reset_length (confused_indices); - /* *INDENT-OFF* */ pool_foreach (regpp, am->vl_clients) { if (!(*regpp)->keepalive) continue; vl_mem_send_client_keepalive_w_reg (am, now, regpp, &dead_indices, &confused_indices); } - /* *INDENT-ON* */ /* This should "never happen," but if it does, fix it... */ if (PREDICT_FALSE (vec_len (confused_indices) > 0)) @@ -1106,7 +1104,6 @@ vl_api_ring_command (vlib_main_t * vm, vl_api_registration_t *regp = 0; /* For horizontal scaling, add a hash table... */ - /* *INDENT-OFF* */ pool_foreach (regpp, am->vl_clients) { regp = *regpp; @@ -1118,7 +1115,6 @@ vl_api_ring_command (vlib_main_t * vm, } vlib_cli_output (vm, "regp %llx not found?", regp); continue; - /* *INDENT-ON* */ found: vlib_cli_output (vm, "%U", format_api_message_rings, am, 0 /* print header */ , 0 /* notused */ ); @@ -1132,14 +1128,12 @@ vl_api_ring_command (vlib_main_t * vm, /*? * Display binary api message allocation ring statistics ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_api_ring_command, static) = { .path = "show api ring-stats", .short_help = "Message ring statistics", .function = vl_api_ring_command, }; -/* *INDENT-ON* */ clib_error_t * vlibmemory_init (vlib_main_t * vm) diff --git a/src/vlibmemory/memory_client.c b/src/vlibmemory/memory_client.c index c66c71c43b1..8bce069f97b 100644 --- a/src/vlibmemory/memory_client.c +++ b/src/vlibmemory/memory_client.c @@ -101,12 +101,10 @@ vl_api_name_and_crc_free (void) if (!am->msg_index_by_name_and_crc) return; - /* *INDENT-OFF* */ hash_foreach_pair (hp, am->msg_index_by_name_and_crc, ({ vec_add1 (keys, (u8 *) hp->key); })); - /* *INDENT-ON* */ for (i = 0; i < vec_len (keys); i++) vec_free (keys[i]); vec_free (keys); diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c index c139b652609..26be8d09522 100644 --- a/src/vlibmemory/socket_api.c +++ b/src/vlibmemory/socket_api.c @@ -87,7 +87,6 @@ vl_sock_api_dump_clients (vlib_main_t * vm, api_main_t * am) vlib_cli_output (vm, "Socket clients"); vlib_cli_output (vm, "%20s %8s", "Name", "Fildesc"); - /* *INDENT-OFF* */ pool_foreach (reg, sm->registration_pool) { if (reg->registration_type == REGISTRATION_TYPE_SOCKET_SERVER) { @@ -95,7 +94,6 @@ vl_sock_api_dump_clients (vlib_main_t * vm, api_main_t * am) vlib_cli_output (vm, "%20s %8d", reg->name, f->file_descriptor); } } -/* *INDENT-ON* */ } vl_api_registration_t * @@ -527,7 +525,6 @@ vl_api_sockclnt_create_t_handler (vl_api_sockclnt_create_t * mp) rp->response = htonl (rv); rp->count = htons (nmsg); - /* *INDENT-OFF* */ hash_foreach_pair (hp, am->msg_index_by_name_and_crc, ({ rp->message_table[i].index = htons(hp->value[0]); @@ -537,7 +534,6 @@ vl_api_sockclnt_create_t_handler (vl_api_sockclnt_create_t * mp) 64-1 /* chars to copy, without zero byte. */); i++; })); - /* *INDENT-ON* */ vl_api_send_msg (regp, (u8 *) rp); } @@ -855,13 +851,11 @@ socket_exit (vlib_main_t * vm) if (sm->registration_pool) { u32 index; - /* *INDENT-OFF* */ pool_foreach (rp, sm->registration_pool) { vl_api_registration_del_file (rp); index = rp->vl_api_registration_pool_index; vl_socket_free_registration_index (index); } -/* *INDENT-ON* */ } return 0; diff --git a/src/vlibmemory/vlib_api_cli.c b/src/vlibmemory/vlib_api_cli.c index f9cda9b34e9..4492f5af980 100644 --- a/src/vlibmemory/vlib_api_cli.c +++ b/src/vlibmemory/vlib_api_cli.c @@ -61,14 +61,12 @@ vl_api_show_histogram_command (vlib_main_t * vm, /*? * Display the binary api sleep-time histogram ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_api_histogram_command, static) = { .path = "show api histogram", .short_help = "show api histogram", .function = vl_api_show_histogram_command, }; -/* *INDENT-ON* */ static clib_error_t * vl_api_clear_histogram_command (vlib_main_t * vm, @@ -85,14 +83,12 @@ vl_api_clear_histogram_command (vlib_main_t * vm, /*? * Clear the binary api sleep-time histogram ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_clear_api_histogram_command, static) = { .path = "clear api histogram", .short_help = "clear api histogram", .function = vl_api_clear_histogram_command, }; -/* *INDENT-ON* */ static clib_error_t * vl_api_client_command (vlib_main_t * vm, @@ -110,7 +106,6 @@ vl_api_client_command (vlib_main_t * vm, vlib_cli_output (vm, "%20s %8s %14s %18s %s", "Name", "PID", "Queue Length", "Queue VA", "Health"); - /* *INDENT-OFF* */ pool_foreach (regpp, am->vl_clients) { regp = *regpp; @@ -135,7 +130,6 @@ vl_api_client_command (vlib_main_t * vm, vec_add1 (confused_indices, regpp - am->vl_clients); } } - /* *INDENT-ON* */ /* This should "never happen," but if it does, fix it... */ if (PREDICT_FALSE (vec_len (confused_indices) > 0)) @@ -191,37 +185,31 @@ vl_api_status_command (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_api_command, static) = { .path = "show api", .short_help = "Show API information", }; -/* *INDENT-ON* */ /*? * Display current api client connections ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_api_clients_command, static) = { .path = "show api clients", .short_help = "Client information", .function = vl_api_client_command, }; -/* *INDENT-ON* */ /*? * Display the current api message tracing status ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_api_status_command, static) = { .path = "show api trace-status", .short_help = "Display API trace status", .function = vl_api_status_command, }; -/* *INDENT-ON* */ static clib_error_t * vl_api_message_table_command (vlib_main_t * vm, @@ -264,14 +252,12 @@ vl_api_message_table_command (vlib_main_t * vm, /*? * Display the current api message decode tables ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_api_message_table_command, static) = { .path = "show api message-table", .short_help = "Message Table", .function = vl_api_message_table_command, }; -/* *INDENT-ON* */ static int range_compare (vl_api_msg_range_t * a0, vl_api_msg_range_t * a1) @@ -331,14 +317,12 @@ vl_api_show_plugin_command (vlib_main_t * vm, /*? * Display the plugin binary API message range table ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cli_show_api_plugin_command, static) = { .path = "show api plugin", .short_help = "show api plugin", .function = vl_api_show_plugin_command, }; -/* *INDENT-ON* */ typedef enum { @@ -1149,7 +1133,6 @@ out: * Display, replay, or save a binary API trace ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (api_trace_command, static) = { .path = "api trace", .short_help = "api trace [tx][on|off][first <n>][last <n>][status][free]" @@ -1159,7 +1142,6 @@ VLIB_CLI_COMMAND (api_trace_command, static) = { .function = api_trace_command_fn, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * api_trace_config_fn (vlib_main_t * vm, unformat_input_t * input) @@ -1489,7 +1471,6 @@ cleanup: * decode table with the current image, to establish API differences. * ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (dump_api_table_file, static) = { .path = "show api dump", @@ -1497,7 +1478,6 @@ VLIB_CLI_COMMAND (dump_api_table_file, static) = .function = dump_api_table_file_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON * diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c index 2cb9ec43c00..201561fe485 100644 --- a/src/vnet/adj/adj.c +++ b/src/vnet/adj/adj.c @@ -704,7 +704,6 @@ adj_show (vlib_main_t * vm, } else { - /* *INDENT-OFF* */ pool_foreach_index (ai, adj_pool) { if (~0 != sw_if_index && @@ -719,7 +718,6 @@ adj_show (vlib_main_t * vm, FORMAT_IP_ADJACENCY_NONE); } } - /* *INDENT-ON* */ } } return 0; diff --git a/src/vnet/adj/adj_bfd.c b/src/vnet/adj/adj_bfd.c index c1f02dd9073..e54ba6d74ae 100644 --- a/src/vnet/adj/adj_bfd.c +++ b/src/vnet/adj/adj_bfd.c @@ -280,9 +280,7 @@ adj_bfd_main_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (adj_bfd_main_init)= { .runs_after = VLIB_INITS("bfd_main_init"), }; -/* *INDENT-ON* */ diff --git a/src/vnet/adj/adj_nsh.c b/src/vnet/adj/adj_nsh.c index 00d945729d8..1b4fa6c15b9 100644 --- a/src/vnet/adj/adj_nsh.c +++ b/src/vnet/adj/adj_nsh.c @@ -190,7 +190,6 @@ VLIB_REGISTER_NODE (adj_nsh_midchain_node) = { }; /* Built-in ip4 tx feature path definition */ -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (nsh_output, static) = { .arc_name = "nsh-output", @@ -204,4 +203,3 @@ VNET_FEATURE_INIT (nsh_tx_drop, static) = .node_name = "error-drop", .runs_before = 0, /* not before any other features */ }; -/* *INDENT-ON* */ diff --git a/src/vnet/arp/arp.c b/src/vnet/arp/arp.c index d39d48e2c77..cacdd71e381 100644 --- a/src/vnet/arp/arp.c +++ b/src/vnet/arp/arp.c @@ -191,7 +191,6 @@ always_inline u32 arp_learn (u32 sw_if_index, const ethernet_arp_ip4_over_ethernet_address_t * addr) { - /* *INDENT-OFF* */ ip_neighbor_learn_t l = { .ip = { .ip.ip4 = addr->ip4, @@ -200,7 +199,6 @@ arp_learn (u32 sw_if_index, .mac = addr->mac, .sw_if_index = sw_if_index, }; - /* *INDENT-ON* */ ip_neighbor_learn_dp (&l); @@ -354,7 +352,6 @@ arp_dst_fib_check (const fib_node_index_t fei, fib_entry_flag_t * flags) const fib_entry_t *entry = fib_entry_get (fei); const fib_entry_src_t *entry_src; fib_source_t src; - /* *INDENT-OFF* */ FOR_EACH_SRC_ADDED(entry, entry_src, src, ({ *flags = fib_entry_get_flags_for_source (fei, src); @@ -363,7 +360,6 @@ arp_dst_fib_check (const fib_node_index_t fei, fib_entry_flag_t * flags) else if (FIB_ENTRY_FLAG_CONNECTED & *flags) return ARP_DST_FIB_CONN; })) - /* *INDENT-ON* */ return ARP_DST_FIB_NONE; } @@ -459,7 +455,6 @@ arp_reply (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) * flags we need, or the flags we must not have, * is not the best source, so check then all. */ - /* *INDENT-OFF* */ FOR_EACH_SRC_ADDED(src_fib_entry, src, source, ({ src_flags = fib_entry_get_flags_for_source (src_fei, source); @@ -497,7 +492,6 @@ arp_reply (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) * nor is it a already learned host resp. */ })); - /* *INDENT-ON* */ /* * shorter mask lookup for the next iteration. @@ -677,7 +671,6 @@ arp_reply (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (arp_input_node, static) = { @@ -764,7 +757,6 @@ VNET_FEATURE_INIT (arp_drop_feat_node, static) = .runs_before = 0, /* last feature */ }; -/* *INDENT-ON* */ typedef struct { @@ -936,13 +928,11 @@ ethernet_arp_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ethernet_arp_init) = { .runs_after = VLIB_INITS("ethernet_init", "ip_neighbor_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/arp/arp_proxy.c b/src/vnet/arp/arp_proxy.c index 184edbf8be8..39f624d5a1d 100644 --- a/src/vnet/arp/arp_proxy.c +++ b/src/vnet/arp/arp_proxy.c @@ -223,7 +223,6 @@ set_arp_proxy (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ /*? * Enable proxy-arp on an interface. The vpp stack will answer ARP * requests for the indicated address range. Multiple proxy-arp @@ -249,15 +248,12 @@ VLIB_CLI_COMMAND (set_int_proxy_enable_command, static) = { "set interface proxy-arp <intfc> [enable|disable]", .function = set_int_proxy_arp_command_fn, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_arp_proxy_command, static) = { .path = "set arp proxy", .short_help = "set arp proxy [del] table-ID <table-ID> start <start-address> end <end-addres>", .function = set_arp_proxy, }; -/* *INDENT-ON* */ typedef struct { @@ -435,13 +431,11 @@ show_ip4_arp (vlib_main_t * vm, * Fib_index 0 6.0.0.1 - 6.0.0.11 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip4_arp_command, static) = { .path = "show arp proxy", .function = show_ip4_arp, .short_help = "show ip arp", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/bfd/bfd_api.c b/src/vnet/bfd/bfd_api.c index 4d76f71fd9f..816e71081ff 100644 --- a/src/vnet/bfd/bfd_api.c +++ b/src/vnet/bfd/bfd_api.c @@ -217,7 +217,6 @@ bfd_event (bfd_main_t * bm, bfd_session_t * bs) vpe_api_main_t *vam = &vpe_api_main; vpe_client_registration_t *reg; vl_api_registration_t *vl_reg; - /* *INDENT-OFF* */ pool_foreach (reg, vam->bfd_events_registrations) { vl_reg = vl_api_client_index_to_registration (reg->client_index); if (vl_reg) @@ -231,7 +230,6 @@ bfd_event (bfd_main_t * bm, bfd_session_t * bs) } } } - /* *INDENT-ON* */ } static void @@ -244,13 +242,11 @@ vl_api_bfd_udp_session_dump_t_handler (vl_api_bfd_udp_session_dump_t * mp) return; bfd_session_t *bs = NULL; - /* *INDENT-OFF* */ pool_foreach (bs, bfd_main.sessions) { if (bs->transport == BFD_TRANSPORT_UDP4 || bs->transport == BFD_TRANSPORT_UDP6) send_bfd_udp_session_details (reg, mp->context, bs); } - /* *INDENT-ON* */ } static void @@ -301,7 +297,6 @@ vl_api_bfd_auth_keys_dump_t_handler (vl_api_bfd_auth_keys_dump_t * mp) bfd_auth_key_t *key = NULL; vl_api_bfd_auth_keys_details_t *rmp = NULL; - /* *INDENT-OFF* */ pool_foreach (key, bfd_main.auth_keys) { rmp = vl_msg_api_alloc (sizeof (*rmp)); clib_memset (rmp, 0, sizeof (*rmp)); @@ -312,7 +307,6 @@ vl_api_bfd_auth_keys_dump_t_handler (vl_api_bfd_auth_keys_dump_t * mp) rmp->use_count = clib_host_to_net_u32 (key->use_count); vl_api_send_msg (reg, (u8 *)rmp); } - /* *INDENT-ON* */ } static void @@ -394,7 +388,6 @@ vl_api_bfd_udp_get_echo_source_t_handler (vl_api_bfd_udp_get_echo_source_t * bfd_udp_get_echo_source (&is_set, &sw_if_index, &have_usable_ip4, &ip4, &have_usable_ip6, &ip6); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_BFD_UDP_GET_ECHO_SOURCE_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); @@ -428,7 +421,6 @@ vl_api_bfd_udp_get_echo_source_t_handler (vl_api_bfd_udp_get_echo_source_t * rmp->have_usable_ip6 = false; } })) - /* *INDENT-ON* */ } #include <vnet/bfd/bfd.api.c> diff --git a/src/vnet/bfd/bfd_cli.c b/src/vnet/bfd/bfd_cli.c index a5f2057e7d7..33942bb89e6 100644 --- a/src/vnet/bfd/bfd_cli.c +++ b/src/vnet/bfd/bfd_cli.c @@ -134,12 +134,10 @@ show_bfd (vlib_main_t * vm, unformat_input_t * input, bfd_auth_key_t *key = NULL; u8 *s = format (NULL, "%=10s %=25s %=10s\n", "Configuration Key ID", "Type", "Use Count"); - /* *INDENT-OFF* */ pool_foreach (key, bm->auth_keys) { s = format (s, "%10u %-25s %10u\n", key->conf_key_id, bfd_auth_type_str (key->auth_type), key->use_count); } - /* *INDENT-ON* */ vlib_cli_output (vm, "%v\n", s); vec_free (s); vlib_cli_output (vm, "Number of configured BFD keys: %lu\n", @@ -149,11 +147,9 @@ show_bfd (vlib_main_t * vm, unformat_input_t * input, { u8 *s = format (NULL, "%=10s %=32s %=20s %=20s\n", "Index", "Property", "Local value", "Remote value"); - /* *INDENT-OFF* */ pool_foreach (bs, bm->sessions) { s = format (s, "%U", format_bfd_session_cli, vm, bs); } - /* *INDENT-ON* */ vlib_cli_output (vm, "%v", s); vec_free (s); vlib_cli_output (vm, "Number of configured BFD sessions: %lu\n", @@ -212,13 +208,11 @@ show_bfd (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_bfd_command, static) = { .path = "show bfd", .short_help = "show bfd [keys|sessions|echo-source]", .function = show_bfd, }; -/* *INDENT-ON* */ static clib_error_t * bfd_cli_key_add (vlib_main_t * vm, unformat_input_t * input, @@ -310,7 +304,6 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_key_add_command, static) = { .path = "bfd key set", .short_help = "bfd key set" @@ -319,7 +312,6 @@ VLIB_CLI_COMMAND (bfd_cli_key_add_command, static) = { " secret <secret>", .function = bfd_cli_key_add, }; -/* *INDENT-ON* */ static clib_error_t * bfd_cli_key_del (vlib_main_t * vm, unformat_input_t * input, @@ -355,13 +347,11 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_key_del_command, static) = { .path = "bfd key del", .short_help = "bfd key del conf-key-id <id>", .function = bfd_cli_key_del, }; -/* *INDENT-ON* */ #define INTERFACE_STR "interface" #define LOCAL_ADDR_STR "local-addr" @@ -484,7 +474,6 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_udp_session_add_command, static) = { .path = "bfd udp session add", .short_help = "bfd udp session add" @@ -500,7 +489,6 @@ VLIB_CLI_COMMAND (bfd_cli_udp_session_add_command, static) = { "]", .function = bfd_cli_udp_session_add, }; -/* *INDENT-ON* */ static clib_error_t * bfd_cli_udp_session_mod (vlib_main_t * vm, unformat_input_t * input, @@ -563,7 +551,6 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_udp_session_mod_command, static) = { .path = "bfd udp session mod", .short_help = "bfd udp session mod interface" @@ -575,7 +562,6 @@ VLIB_CLI_COMMAND (bfd_cli_udp_session_mod_command, static) = { " <detect multiplier> ", .function = bfd_cli_udp_session_mod, }; -/* *INDENT-ON* */ static clib_error_t * bfd_cli_udp_session_del (vlib_main_t * vm, unformat_input_t * input, @@ -627,7 +613,6 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_udp_session_del_command, static) = { .path = "bfd udp session del", .short_help = "bfd udp session del interface" @@ -636,7 +621,6 @@ VLIB_CLI_COMMAND (bfd_cli_udp_session_del_command, static) = { "<peer-address> ", .function = bfd_cli_udp_session_del, }; -/* *INDENT-ON* */ static clib_error_t * bfd_cli_udp_session_set_flags (vlib_main_t * vm, unformat_input_t * input, @@ -709,7 +693,6 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_udp_session_set_flags_command, static) = { .path = "bfd udp session set-flags", .short_help = "bfd udp session set-flags" @@ -719,7 +702,6 @@ VLIB_CLI_COMMAND (bfd_cli_udp_session_set_flags_command, static) = { " admin <up|down>", .function = bfd_cli_udp_session_set_flags, }; -/* *INDENT-ON* */ static clib_error_t * bfd_cli_udp_session_auth_activate (vlib_main_t * vm, @@ -806,7 +788,6 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_udp_session_auth_activate_command, static) = { .path = "bfd udp session auth activate", .short_help = "bfd udp session auth activate" @@ -891,7 +872,6 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_udp_session_auth_deactivate_command, static) = { .path = "bfd udp session auth deactivate", .short_help = "bfd udp session auth deactivate" @@ -901,7 +881,6 @@ VLIB_CLI_COMMAND (bfd_cli_udp_session_auth_deactivate_command, static) = { "[ delayed <yes|no> ]", .function = bfd_cli_udp_session_auth_deactivate, }; -/* *INDENT-ON* */ static clib_error_t * bfd_cli_udp_set_echo_source (vlib_main_t * vm, unformat_input_t * input, @@ -948,13 +927,11 @@ out: return ret; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_udp_set_echo_source_cmd, static) = { .path = "bfd udp echo-source set", .short_help = "bfd udp echo-source set interface <interface>", .function = bfd_cli_udp_set_echo_source, }; -/* *INDENT-ON* */ static clib_error_t * bfd_cli_udp_del_echo_source (vlib_main_t * vm, unformat_input_t * input, @@ -971,13 +948,11 @@ bfd_cli_udp_del_echo_source (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bfd_cli_udp_del_echo_source_cmd, static) = { .path = "bfd udp echo-source del", .short_help = "bfd udp echo-source del", .function = bfd_cli_udp_del_echo_source, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/bfd/bfd_main.h b/src/vnet/bfd/bfd_main.h index 22d93346692..1d4617e1d7c 100644 --- a/src/vnet/bfd/bfd_main.h +++ b/src/vnet/bfd/bfd_main.h @@ -366,7 +366,6 @@ typedef enum BFD_EVENT_CONFIG_CHANGED, } bfd_process_event_e; -/* *INDENT-OFF* */ /** echo packet structure */ typedef CLIB_PACKED (struct { /** local discriminator */ @@ -376,7 +375,6 @@ typedef CLIB_PACKED (struct { /** checksum - based on discriminator, local secret and expire time */ u64 checksum; }) bfd_echo_pkt_t; -/* *INDENT-ON* */ static inline void bfd_lock (bfd_main_t * bm) diff --git a/src/vnet/bfd/bfd_protocol.h b/src/vnet/bfd/bfd_protocol.h index 210c561b430..16ee3231ef0 100644 --- a/src/vnet/bfd/bfd_protocol.h +++ b/src/vnet/bfd/bfd_protocol.h @@ -46,14 +46,11 @@ typedef enum u32 bfd_max_key_len_for_auth_type (bfd_auth_type_e auth_type); const char *bfd_auth_type_str (bfd_auth_type_e auth_type); -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 type; u8 len; }) bfd_auth_common_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /* * 4.4. Keyed SHA1 and Meticulous Keyed SHA1 Authentication Section Format @@ -88,9 +85,7 @@ typedef CLIB_PACKED (struct { */ u8 hash[20]; }) bfd_auth_sha1_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /* * The Mandatory Section of a BFD Control packet has the following @@ -125,21 +120,16 @@ typedef CLIB_PACKED (struct { u32 req_min_rx; u32 req_min_echo_rx; }) bfd_pkt_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { bfd_pkt_t pkt; bfd_auth_common_t common_auth; }) bfd_pkt_with_common_auth_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { bfd_pkt_t pkt; bfd_auth_sha1_t sha1_auth; }) bfd_pkt_with_sha1_auth_t; -/* *INDENT-ON* */ u8 bfd_pkt_get_version (const bfd_pkt_t * pkt); void bfd_pkt_set_version (bfd_pkt_t * pkt, int version); diff --git a/src/vnet/bfd/bfd_udp.c b/src/vnet/bfd/bfd_udp.c index bf403dfe866..ec42cda1bc4 100644 --- a/src/vnet/bfd/bfd_udp.c +++ b/src/vnet/bfd/bfd_udp.c @@ -131,7 +131,6 @@ bfd_udp_is_echo_available (bfd_transport_e transport) { ip4_main_t *im = &ip4_main; ip_interface_address_t *ia = NULL; - /* *INDENT-OFF* */ foreach_ip_interface_address (&im->lookup_main, ia, bfd_udp_main.echo_source_sw_if_index, 0 /* honor unnumbered */, ({ @@ -140,13 +139,11 @@ bfd_udp_is_echo_available (bfd_transport_e transport) return 1; } })); - /* *INDENT-ON* */ } else if (BFD_TRANSPORT_UDP6 == transport) { ip6_main_t *im = &ip6_main; ip_interface_address_t *ia = NULL; - /* *INDENT-OFF* */ foreach_ip_interface_address (&im->lookup_main, ia, bfd_udp_main.echo_source_sw_if_index, 0 /* honor unnumbered */, ({ @@ -155,7 +152,6 @@ bfd_udp_is_echo_available (bfd_transport_e transport) return 1; } })); - /* *INDENT-ON* */ } } BFD_DBG ("No usable IP address for UDP echo - echo not available"); @@ -187,7 +183,6 @@ bfd_udp_get_echo_src_ip4 (ip4_address_t * addr) ip_interface_address_t *ia = NULL; ip4_main_t *im = &ip4_main; - /* *INDENT-OFF* */ foreach_ip_interface_address ( &im->lookup_main, ia, bfd_udp_main.echo_source_sw_if_index, 0 /* honor unnumbered */, ({ @@ -205,7 +200,6 @@ bfd_udp_get_echo_src_ip4 (ip4_address_t * addr) return 1; } })); - /* *INDENT-ON* */ BFD_ERR ("cannot find ip4 address, no usable address found"); return 0; } @@ -221,7 +215,6 @@ bfd_udp_get_echo_src_ip6 (ip6_address_t * addr) ip_interface_address_t *ia = NULL; ip6_main_t *im = &ip6_main; - /* *INDENT-OFF* */ foreach_ip_interface_address ( &im->lookup_main, ia, bfd_udp_main.echo_source_sw_if_index, 0 /* honor unnumbered */, ({ @@ -234,7 +227,6 @@ bfd_udp_get_echo_src_ip6 (ip6_address_t * addr) return 1; } })); - /* *INDENT-ON* */ BFD_ERR ("cannot find ip6 address, no usable address found"); return 0; } @@ -1357,7 +1349,6 @@ bfd_udp4_input (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) /* * bfd input graph node declaration */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (bfd_udp4_input_node, static) = { .function = bfd_udp4_input, .name = "bfd-udp4-input", @@ -1378,7 +1369,6 @@ VLIB_REGISTER_NODE (bfd_udp4_input_node, static) = { [BFD_UDP_INPUT_NEXT_REPLY_MIDCHAIN] = "ip4-midchain", }, }; -/* *INDENT-ON* */ static uword bfd_udp6_input (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) @@ -1386,7 +1376,6 @@ bfd_udp6_input (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return bfd_udp_input (vm, rt, f, 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (bfd_udp6_input_node, static) = { .function = bfd_udp6_input, .name = "bfd-udp6-input", @@ -1407,7 +1396,6 @@ VLIB_REGISTER_NODE (bfd_udp6_input_node, static) = { [BFD_UDP_INPUT_NEXT_REPLY_MIDCHAIN] = "ip6-midchain", }, }; -/* *INDENT-ON* */ /* * Process a frame of bfd echo packets @@ -1512,7 +1500,6 @@ bfd_echo_input_format_trace (u8 * s, va_list * args) /* * bfd input graph node declaration */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (bfd_udp_echo4_input_node, static) = { .function = bfd_udp_echo4_input, .name = "bfd-udp-echo4-input", @@ -1532,7 +1519,6 @@ VLIB_REGISTER_NODE (bfd_udp_echo4_input_node, static) = { [BFD_UDP_ECHO_INPUT_NEXT_REPLY_REWRITE] = "ip4-lookup", }, }; -/* *INDENT-ON* */ static uword bfd_udp_echo6_input (vlib_main_t * vm, vlib_node_runtime_t * rt, @@ -1541,7 +1527,6 @@ bfd_udp_echo6_input (vlib_main_t * vm, vlib_node_runtime_t * rt, return bfd_udp_echo_input (vm, rt, f, 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (bfd_udp_echo6_input_node, static) = { .function = bfd_udp_echo6_input, .name = "bfd-udp-echo6-input", @@ -1562,7 +1547,6 @@ VLIB_REGISTER_NODE (bfd_udp_echo6_input_node, static) = { }, }; -/* *INDENT-ON* */ static clib_error_t * bfd_udp_sw_if_add_del (CLIB_UNUSED (vnet_main_t *vnm), u32 sw_if_index, diff --git a/src/vnet/bonding/bond_api.c b/src/vnet/bonding/bond_api.c index 5087ff5dce3..d9287a8e23d 100644 --- a/src/vnet/bonding/bond_api.c +++ b/src/vnet/bonding/bond_api.c @@ -75,12 +75,10 @@ vl_api_bond_create_t_handler (vl_api_bond_create_t * mp) int rv = ap->rv; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_BOND_CREATE_REPLY, ({ rmp->sw_if_index = ntohl (ap->sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -108,12 +106,10 @@ vl_api_bond_create2_t_handler (vl_api_bond_create2_t * mp) int rv = ap->rv; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_BOND_CREATE2_REPLY, ({ rmp->sw_if_index = ntohl (ap->sw_if_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c index b0ded4734dd..cdc935ff10f 100644 --- a/src/vnet/bonding/cli.c +++ b/src/vnet/bonding/cli.c @@ -183,7 +183,6 @@ bond_dump_ifs (bond_interface_details_t ** out_bondifs) bond_interface_details_t *r_bondifs = NULL; bond_interface_details_t *bondif = NULL; - /* *INDENT-OFF* */ pool_foreach (bif, bm->interfaces) { vec_add2(r_bondifs, bondif, 1); clib_memset (bondif, 0, sizeof (*bondif)); @@ -201,7 +200,6 @@ bond_dump_ifs (bond_interface_details_t ** out_bondifs) bondif->active_members = vec_len (bif->active_members); bondif->members = vec_len (bif->members); } - /* *INDENT-ON* */ *out_bondifs = r_bondifs; @@ -547,7 +545,6 @@ bond_create_command_fn (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bond_create_command, static) = { .path = "create bond", .short_help = "create bond mode {round-robin | active-backup | broadcast | " @@ -555,7 +552,6 @@ VLIB_CLI_COMMAND (bond_create_command, static) = { "[hw-addr <mac-address>] [id <if-id>] [gso]", .function = bond_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * bond_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -596,14 +592,12 @@ bond_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bond_delete__command, static) = { .path = "delete bond", .short_help = "delete bond {<interface> | sw_if_index <sw_idx>}", .function = bond_delete_command_fn, }; -/* *INDENT-ON* */ void bond_add_member (vlib_main_t * vm, bond_add_member_args_t * args) @@ -823,14 +817,12 @@ add_member_interface_command_fn (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (add_member_interface_command, static) = { .path = "bond add", .short_help = "bond add <BondEthernetx> <member-interface> " "[passive] [long-timeout]", .function = add_member_interface_command_fn, }; -/* *INDENT-ON* */ void bond_detach_member (vlib_main_t * vm, bond_detach_member_args_t * args) @@ -887,13 +879,11 @@ detach_interface_command_fn (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (detach_interface_command, static) = { .path = "bond del", .short_help = "bond del <member-interface>", .function = detach_interface_command_fn, }; -/* *INDENT-ON* */ static void show_bond (vlib_main_t * vm) @@ -905,7 +895,6 @@ show_bond (vlib_main_t * vm) "interface name", "sw_if_index", "mode", "load balance", "active members", "members"); - /* *INDENT-OFF* */ pool_foreach (bif, bm->interfaces) { vlib_cli_output (vm, "%-16U %-12d %-13U %-13U %-14u %u", @@ -914,7 +903,6 @@ show_bond (vlib_main_t * vm) format_bond_load_balance, bif->lb, vec_len (bif->active_members), vec_len (bif->members)); } - /* *INDENT-ON* */ } static void @@ -924,7 +912,6 @@ show_bond_details (vlib_main_t * vm) bond_if_t *bif; u32 *sw_if_index; - /* *INDENT-OFF* */ pool_foreach (bif, bm->interfaces) { vlib_cli_output (vm, "%U", format_bond_interface_name, bif->dev_instance); @@ -963,7 +950,6 @@ show_bond_details (vlib_main_t * vm) vlib_cli_output (vm, " sw_if_index: %d", bif->sw_if_index); vlib_cli_output (vm, " hw_if_index: %d", bif->hw_if_index); } - /* *INDENT-ON* */ } static clib_error_t * @@ -991,13 +977,11 @@ show_bond_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_bond_command, static) = { .path = "show bond", .short_help = "show bond [details]", .function = show_bond_fn, }; -/* *INDENT-ON* */ void bond_set_intf_weight (vlib_main_t * vm, bond_set_intf_weight_args_t * args) @@ -1097,14 +1081,12 @@ bond_set_intf_cmd (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(set_interface_bond_cmd, static) = { .path = "set interface bond", .short_help = "set interface bond <interface> | sw_if_index <idx>" " weight <value>", .function = bond_set_intf_cmd, }; -/* *INDENT-ON* */ clib_error_t * bond_cli_init (vlib_main_t * vm) diff --git a/src/vnet/bonding/device.c b/src/vnet/bonding/device.c index a9c5b7ae338..a0b93fccde1 100644 --- a/src/vnet/bonding/device.c +++ b/src/vnet/bonding/device.c @@ -608,16 +608,13 @@ bond_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (bond_process_node) = { .function = bond_process, .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, .type = VLIB_NODE_TYPE_PROCESS, .name = "bond-process", }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (bond_dev_class) = { .name = "bond", .tx_function_n_errors = BOND_TX_N_ERROR, @@ -629,7 +626,6 @@ VNET_DEVICE_CLASS (bond_dev_class) = { .mac_addr_add_del_function = bond_add_del_mac_address, }; -/* *INDENT-ON* */ static clib_error_t * bond_member_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) diff --git a/src/vnet/bonding/node.c b/src/vnet/bonding/node.c index 21a968177fe..66de1e4dd80 100644 --- a/src/vnet/bonding/node.c +++ b/src/vnet/bonding/node.c @@ -397,7 +397,6 @@ bond_input_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (bond_input_node) = { .name = "bond-input", .vector_size = sizeof (u32), @@ -421,7 +420,6 @@ VNET_FEATURE_INIT (bond_input, static) = .node_name = "bond-input", .runs_before = VNET_FEATURES ("ethernet-input"), }; -/* *INDENT-ON* */ static clib_error_t * bond_sw_interface_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags) diff --git a/src/vnet/classify/classify_api.c b/src/vnet/classify/classify_api.c index c59d60fc6be..fc57b006d37 100644 --- a/src/vnet/classify/classify_api.c +++ b/src/vnet/classify/classify_api.c @@ -379,7 +379,6 @@ static void vl_api_classify_add_del_table_t_handler current_data_flag, current_data_offset, mp->is_add, mp->del_chain); out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_CLASSIFY_ADD_DEL_TABLE_REPLY, ({ if (rv == 0 && mp->is_add) @@ -396,7 +395,6 @@ out: rmp->new_table_index = ~0; } })); - /* *INDENT-ON* */ } static void vl_api_classify_add_del_session_t_handler @@ -533,12 +531,10 @@ vl_api_classify_table_ids_t_handler (vl_api_classify_table_ids_t * mp) u32 *table_ids = 0; u32 count; - /* *INDENT-OFF* */ pool_foreach (t, cm->tables) { vec_add1 (table_ids, ntohl(t - cm->tables)); } - /* *INDENT-ON* */ count = vec_len (table_ids); vl_api_classify_table_ids_reply_t *rmp; @@ -595,7 +591,6 @@ static void BAD_SW_IF_INDEX_LABEL; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_CLASSIFY_TABLE_BY_INTERFACE_REPLY, ({ rmp->sw_if_index = ntohl(sw_if_index); @@ -603,7 +598,6 @@ static void rmp->ip4_table_id = ntohl(acl[IN_OUT_ACL_TABLE_IP4]); rmp->ip6_table_id = ntohl(acl[IN_OUT_ACL_TABLE_IP6]); })); - /* *INDENT-ON* */ vec_free (acl); } @@ -694,7 +688,6 @@ vl_api_classify_session_dump_t_handler (vl_api_classify_session_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (t, cm->tables) { if (table_id == t - cm->tables) @@ -728,7 +721,6 @@ vl_api_classify_session_dump_t_handler (vl_api_classify_session_dump_t * mp) break; } } - /* *INDENT-ON* */ } static void diff --git a/src/vnet/classify/flow_classify.c b/src/vnet/classify/flow_classify.c index afdadc66235..7197558a77a 100644 --- a/src/vnet/classify/flow_classify.c +++ b/src/vnet/classify/flow_classify.c @@ -150,7 +150,6 @@ set_flow_classify_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_input_acl_command, static) = { .path = "set flow classify", .short_help = @@ -158,7 +157,6 @@ VLIB_CLI_COMMAND (set_input_acl_command, static) = { " [ip6-table <index>] [del]", .function = set_flow_classify_command_fn, }; -/* *INDENT-ON* */ static uword unformat_table_type (unformat_input_t * input, va_list * va) @@ -215,13 +213,11 @@ show_flow_classify_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_flow_classify_command, static) = { .path = "show classify flow", .short_help = "show classify flow type [ip4|ip6]", .function = show_flow_classify_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/classify/flow_classify_node.c b/src/vnet/classify/flow_classify_node.c index c0a29992fb4..a34bab6190b 100644 --- a/src/vnet/classify/flow_classify_node.c +++ b/src/vnet/classify/flow_classify_node.c @@ -279,7 +279,6 @@ VLIB_NODE_FN (ip4_flow_classify_node) (vlib_main_t * vm, return flow_classify_inline (vm, node, frame, FLOW_CLASSIFY_TABLE_IP4); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_flow_classify_node) = { .name = "ip4-flow-classify", .vector_size = sizeof (u32), @@ -291,7 +290,6 @@ VLIB_REGISTER_NODE (ip4_flow_classify_node) = { [FLOW_CLASSIFY_NEXT_INDEX_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip6_flow_classify_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -300,7 +298,6 @@ VLIB_NODE_FN (ip6_flow_classify_node) (vlib_main_t * vm, return flow_classify_inline (vm, node, frame, FLOW_CLASSIFY_TABLE_IP6); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_flow_classify_node) = { .name = "ip6-flow-classify", .vector_size = sizeof (u32), @@ -313,7 +310,6 @@ VLIB_REGISTER_NODE (ip6_flow_classify_node) = { }, }; -/* *INDENT-ON* */ static clib_error_t * diff --git a/src/vnet/classify/in_out_acl.c b/src/vnet/classify/in_out_acl.c index 752305e1cc2..af765139332 100644 --- a/src/vnet/classify/in_out_acl.c +++ b/src/vnet/classify/in_out_acl.c @@ -255,7 +255,6 @@ set_output_acl_command_fn (vlib_main_t * vm, * Note: Only one table index per API call is allowed. * */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_input_acl_command, static) = { .path = "set interface input acl", .short_help = @@ -271,7 +270,6 @@ VLIB_CLI_COMMAND (set_output_acl_command, static) = { " [ip6-table <index>] [l2-table <index>] [del]", .function = set_output_acl_command_fn, }; -/* *INDENT-ON* */ clib_error_t * in_out_acl_init (vlib_main_t * vm) @@ -284,12 +282,10 @@ in_out_acl_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (in_out_acl_init) = { .runs_after = VLIB_INITS("ip_in_out_acl_init"), }; -/* *INDENT-ON* */ uword unformat_acl_type (unformat_input_t * input, va_list * args) @@ -392,7 +388,6 @@ show_outacl_command_fn (vlib_main_t * vm, IN_OUT_ACL_OUTPUT_TABLE_GROUP); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_inacl_command, static) = { .path = "show inacl", .short_help = "show inacl type [ip4|ip6|l2]", @@ -403,7 +398,6 @@ VLIB_CLI_COMMAND (show_outacl_command, static) = { .short_help = "show outacl type [ip4|ip6|l2]", .function = show_outacl_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/classify/ip_classify.c b/src/vnet/classify/ip_classify.c index 9454ae91937..e8562c6912c 100644 --- a/src/vnet/classify/ip_classify.c +++ b/src/vnet/classify/ip_classify.c @@ -309,7 +309,6 @@ VLIB_NODE_FN (ip4_classify_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_classify_node) = { .name = "ip4-classify", .vector_size = sizeof (u32), @@ -320,7 +319,6 @@ VLIB_REGISTER_NODE (ip4_classify_node) = { .n_next_nodes = 0, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip6_classify_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -330,7 +328,6 @@ VLIB_NODE_FN (ip6_classify_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_classify_node) = { .name = "ip6-classify", .vector_size = sizeof (u32), @@ -341,7 +338,6 @@ VLIB_REGISTER_NODE (ip6_classify_node) = { .n_next_nodes = 0, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT static clib_error_t * diff --git a/src/vnet/classify/policer_classify.c b/src/vnet/classify/policer_classify.c index 4cf12a24e9e..814adefc987 100644 --- a/src/vnet/classify/policer_classify.c +++ b/src/vnet/classify/policer_classify.c @@ -164,7 +164,6 @@ set_policer_classify_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_policer_classify_command, static) = { .path = "set policer classify", .short_help = @@ -172,7 +171,6 @@ VLIB_CLI_COMMAND (set_policer_classify_command, static) = { " [ip6-table <index>] [l2-table <index>] [del]", .function = set_policer_classify_command_fn, }; -/* *INDENT-ON* */ static uword unformat_table_type (unformat_input_t * input, va_list * va) @@ -231,13 +229,11 @@ show_policer_classify_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_policer_classify_command, static) = { .path = "show classify policer", .short_help = "show classify policer type [ip4|ip6|l2]", .function = show_policer_classify_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/classify/vnet_classify.c b/src/vnet/classify/vnet_classify.c index fb9a59c1f01..fc694492f4e 100644 --- a/src/vnet/classify/vnet_classify.c +++ b/src/vnet/classify/vnet_classify.c @@ -640,12 +640,10 @@ unlock: return rv; } -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { ethernet_header_t eh; ip4_header_t ip; }) classify_data_or_mask_t; -/* *INDENT-ON* */ u32 vnet_classify_hash_packet (const vnet_classify_table_t *t, u8 *h) @@ -1638,7 +1636,6 @@ classify_table_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (classify_table, static) = { .path = "classify table", @@ -1650,7 +1647,6 @@ VLIB_CLI_COMMAND (classify_table, static) = "\n [del] [del-chain]", .function = classify_table_command_fn, }; -/* *INDENT-ON* */ static int filter_table_mask_compare (void *a1, void *a2) @@ -2126,7 +2122,6 @@ vlib_enable_disable_pkt_trace_filter (int enable) * The verbose form displays all of the match rules, with hit-counters * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (classify_filter, static) = { .path = "classify filter", @@ -2136,7 +2131,6 @@ VLIB_CLI_COMMAND (classify_filter, static) = " [buckets <nn>] [memory-size <n>]", .function = classify_filter_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_classify_filter_command_fn (vlib_main_t * vm, @@ -2216,14 +2210,12 @@ show_classify_filter_command_fn (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_classify_filter, static) = { .path = "show classify filter", .short_help = "show classify filter [verbose [nn]]", .function = show_classify_filter_command_fn, }; -/* *INDENT-ON* */ u8 * format_vnet_classify_table (u8 *s, va_list *args) @@ -2286,13 +2278,11 @@ show_classify_tables_command_fn (vlib_main_t * vm, break; } - /* *INDENT-OFF* */ pool_foreach (t, cm->tables) { if (match_index == ~0 || (match_index == t - cm->tables)) vec_add1 (indices, t - cm->tables); } - /* *INDENT-ON* */ if (vec_len (indices)) { @@ -2312,13 +2302,11 @@ show_classify_tables_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_classify_table_command, static) = { .path = "show classify tables", .short_help = "show classify tables [index <nn>]", .function = show_classify_tables_command_fn, }; -/* *INDENT-ON* */ uword unformat_l4_match (unformat_input_t * input, va_list * args) @@ -2931,7 +2919,6 @@ classify_session_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (classify_session_command, static) = { .path = "classify session", .short_help = @@ -2941,7 +2928,6 @@ VLIB_CLI_COMMAND (classify_session_command, static) = { "\n [action set-ip4-fib-id|set-ip6-fib-id|set-sr-policy-index <n>] [del]", .function = classify_session_command_fn, }; -/* *INDENT-ON* */ static uword unformat_opaque_sw_if_index (unformat_input_t * input, va_list * args) @@ -3359,7 +3345,6 @@ test_classify_command_fn (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_classify_command, static) = { .path = "test classify", .short_help = @@ -3368,7 +3353,6 @@ VLIB_CLI_COMMAND (test_classify_command, static) = { " [churn-test]", .function = test_classify_command_fn, }; -/* *INDENT-ON* */ #endif /* TEST_CODE */ /* diff --git a/src/vnet/crypto/cli.c b/src/vnet/crypto/cli.c index 5bc070c73c2..2ca66f228c3 100644 --- a/src/vnet/crypto/cli.c +++ b/src/vnet/crypto/cli.c @@ -36,16 +36,13 @@ show_crypto_engines_command_fn (vlib_main_t * vm, } vlib_cli_output (vm, "%-20s%-8s%s", "Name", "Prio", "Description"); - /* *INDENT-OFF* */ vec_foreach (p, cm->engines) { vlib_cli_output (vm, "%-20s%-8u%s", p->name, p->priority, p->desc); } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_crypto_engines_command, static) = { .path = "show crypto engines", @@ -151,14 +148,12 @@ show_crypto_handlers_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_crypto_handlers_command, static) = { .path = "show crypto handlers", .short_help = "show crypto handlers", .function = show_crypto_handlers_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * set_crypto_handler_command_fn (vlib_main_t * vm, @@ -209,13 +204,11 @@ set_crypto_handler_command_fn (vlib_main_t * vm, char *key; u8 *value; - /* *INDENT-OFF* */ hash_foreach_mem (key, value, cm->alg_index_by_name, ({ (void) value; rc += vnet_crypto_set_handler2 (key, engine, oct); })); - /* *INDENT-ON* */ if (rc) vlib_cli_output (vm, "failed to set crypto engine!"); @@ -241,7 +234,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_crypto_handler_command, static) = { .path = "set crypto handler", @@ -249,7 +241,6 @@ VLIB_CLI_COMMAND (set_crypto_handler_command, static) = " [simple|chained]", .function = set_crypto_handler_command_fn, }; -/* *INDENT-ON* */ static u8 * format_vnet_crypto_async_handlers (u8 * s, va_list * args) @@ -300,14 +291,12 @@ show_crypto_async_handlers_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_crypto_async_handlers_command, static) = { .path = "show crypto async handlers", .short_help = "show crypto async handlers", .function = show_crypto_async_handlers_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -337,14 +326,12 @@ show_crypto_async_status_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_crypto_async_status_command, static) = { .path = "show crypto async status", .short_help = "show crypto async status", .function = show_crypto_async_status_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * set_crypto_async_handler_command_fn (vlib_main_t * vm, @@ -388,13 +375,11 @@ set_crypto_async_handler_command_fn (vlib_main_t * vm, char *key; u8 *value; - /* *INDENT-OFF* */ hash_foreach_mem (key, value, cm->async_alg_index_by_name, ({ (void) value; rc += vnet_crypto_set_async_handler2 (key, engine); })); - /* *INDENT-ON* */ if (rc) vlib_cli_output (vm, "failed to set crypto engine!"); @@ -420,14 +405,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_crypto_async_handler_command, static) = { .path = "set crypto async handler", .short_help = "set crypto async handler type [type2 type3 ...] engine", .function = set_crypto_async_handler_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * set_crypto_async_dispatch_command_fn (vlib_main_t *vm, unformat_input_t *input, diff --git a/src/vnet/crypto/crypto.c b/src/vnet/crypto/crypto.c index 25918f022cb..c8e7ca90c9d 100644 --- a/src/vnet/crypto/crypto.c +++ b/src/vnet/crypto/crypto.c @@ -449,11 +449,9 @@ vnet_crypto_key_add (vlib_main_t * vm, vnet_crypto_alg_t alg, u8 * data, key->alg = alg; vec_validate_aligned (key->data, length - 1, CLIB_CACHE_LINE_BYTES); clib_memcpy (key->data, data, length); - /* *INDENT-OFF* */ vec_foreach (engine, cm->engines) if (engine->key_op_handler) engine->key_op_handler (vm, VNET_CRYPTO_KEY_OP_ADD, index); - /* *INDENT-ON* */ return index; } @@ -464,11 +462,9 @@ vnet_crypto_key_del (vlib_main_t * vm, vnet_crypto_key_index_t index) vnet_crypto_engine_t *engine; vnet_crypto_key_t *key = pool_elt_at_index (cm->keys, index); - /* *INDENT-OFF* */ vec_foreach (engine, cm->engines) if (engine->key_op_handler) engine->key_op_handler (vm, VNET_CRYPTO_KEY_OP_DEL, index); - /* *INDENT-ON* */ if (key->type == VNET_CRYPTO_KEY_TYPE_DATA) { @@ -532,11 +528,9 @@ vnet_crypto_key_add_linked (vlib_main_t * vm, key->index_integ = index_integ; key->async_alg = linked_alg; - /* *INDENT-OFF* */ vec_foreach (engine, cm->engines) if (engine->key_op_handler) engine->key_op_handler (vm, VNET_CRYPTO_KEY_OP_ADD, index); - /* *INDENT-ON* */ return index; } @@ -601,13 +595,11 @@ vnet_crypto_register_post_node (vlib_main_t * vm, char *post_node_name) if (!pn) return ~0; - /* *INDENT-OFF* */ vec_foreach (nn, cm->next_nodes) { if (nn->node_idx == pn->index) return nn->next_idx; } - /* *INDENT-ON* */ vec_validate (cm->next_nodes, index); nn = vec_elt_at_index (cm->next_nodes, index); diff --git a/src/vnet/crypto/crypto.h b/src/vnet/crypto/crypto.h index 8200bad7eeb..89cf70d19e3 100644 --- a/src/vnet/crypto/crypto.h +++ b/src/vnet/crypto/crypto.h @@ -151,7 +151,6 @@ typedef enum VNET_CRYPTO_OP_N_STATUS, } vnet_crypto_op_status_t; -/* *INDENT-OFF* */ typedef enum { VNET_CRYPTO_ALG_NONE = 0, @@ -240,7 +239,6 @@ typedef enum #undef _ VNET_CRYPTO_N_OP_IDS, } vnet_crypto_op_id_t; -/* *INDENT-ON* */ typedef enum { diff --git a/src/vnet/crypto/node.c b/src/vnet/crypto/node.c index cabbfb08d57..ee7f344ce68 100644 --- a/src/vnet/crypto/node.c +++ b/src/vnet/crypto/node.c @@ -167,7 +167,6 @@ VLIB_NODE_FN (crypto_dispatch_node) (vlib_main_t * vm, n_cache = crypto_dequeue_frame ( vm, node, ct, cm->dequeue_handlers[index], n_cache, &n_dispatched); } - /* *INDENT-ON* */ if (n_cache) vlib_buffer_enqueue_to_next_vec (vm, node, &ct->buffer_indices, &ct->nexts, n_cache); @@ -186,7 +185,6 @@ VLIB_NODE_FN (crypto_dispatch_node) (vlib_main_t * vm, return n_dispatched; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (crypto_dispatch_node) = { .name = "crypto-dispatch", .type = VLIB_NODE_TYPE_INPUT, @@ -205,7 +203,6 @@ VLIB_REGISTER_NODE (crypto_dispatch_node) = { #undef _ }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/devices/devices.c b/src/vnet/devices/devices.c index bd3def9d324..ee380bebbde 100644 --- a/src/vnet/devices/devices.c +++ b/src/vnet/devices/devices.c @@ -29,7 +29,6 @@ device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (device_input_node) = { .function = device_input_fn, .name = "device-input", @@ -77,7 +76,6 @@ VNET_FEATURE_INIT (ethernet_input, static) = { .node_name = "ethernet-input", .runs_before = 0, /* not before any other features */ }; -/* *INDENT-ON* */ static void input_rate_collector_fn (vlib_stats_collector_data_t *d) diff --git a/src/vnet/devices/pipe/pipe.c b/src/vnet/devices/pipe/pipe.c index cd22c1a1478..9caee2a55cb 100644 --- a/src/vnet/devices/pipe/pipe.c +++ b/src/vnet/devices/pipe/pipe.c @@ -83,13 +83,11 @@ pipe_build_rewrite (vnet_main_t * vnm, return (rewrite); } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (pipe_hw_interface_class) = { .name = "Pipe", .build_rewrite = pipe_build_rewrite, .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P, }; -/* *INDENT-ON* */ pipe_t * pipe_get (u32 sw_if_index) @@ -185,25 +183,21 @@ pipe_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) VNET_HW_INTERFACE_FLAG_LINK_UP : 0); vnet_hw_interface_set_flags (vnm, hw_if_index, hw_flags); - /* *INDENT-OFF* */ hi = vnet_get_hw_interface (vnm, hw_if_index); hash_foreach (id, sw_if_index, hi->sub_interface_sw_if_index_by_id, ({ vnet_sw_interface_set_flags (vnm, sw_if_index, flags); })); - /* *INDENT-ON* */ return (NULL); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (pipe_device_class) = { .name = "Pipe", .format_device_name = format_pipe_name, .tx_function = pipe_tx, .admin_up_down_function = pipe_admin_up_down, }; -/* *INDENT-ON* */ #define foreach_pipe_rx_next \ _ (DROP, "error-drop") @@ -432,7 +426,6 @@ pipe_rx (vlib_main_t * vm, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (pipe_rx_node) = { .function = pipe_rx, .name = "pipe-rx", @@ -442,7 +435,6 @@ VLIB_REGISTER_NODE (pipe_rx_node) = { .sibling_of = "ethernet-input", }; -/* *INDENT-ON* */ /* * Maintain a bitmap of allocated pipe instance numbers. @@ -625,13 +617,11 @@ pipe_hw_walk (vnet_main_t * vnm, u32 hw_if_index, void *args) { u32 pipe_sw_if_index[2], id, sw_if_index; - /* *INDENT-OFF* */ hash_foreach (id, sw_if_index, hi->sub_interface_sw_if_index_by_id, ({ ASSERT(id < 2); pipe_sw_if_index[id] = sw_if_index; })); - /* *INDENT-ON* */ ctx->cb (hi->sw_if_index, pipe_sw_if_index, hi->dev_instance, ctx->ctx); } @@ -690,13 +680,11 @@ create_pipe_interfaces (vlib_main_t * vm, * Example of how to create a pipe interface: * @cliexcmd{pipe create} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (pipe_create_interface_command, static) = { .path = "pipe create", .short_help = "pipe create [instance <instance>]", .function = create_pipe_interfaces, }; -/* *INDENT-ON* */ int vnet_delete_pipe_interface (u32 sw_if_index) @@ -720,13 +708,11 @@ vnet_delete_pipe_interface (u32 sw_if_index) return VNET_API_ERROR_INVALID_SW_IF_INDEX; } - /* *INDENT-OFF* */ hash_foreach (id, sw_if_index, hi->sub_interface_sw_if_index_by_id, ({ vnet_delete_sub_interface(sw_if_index); pipe_main.pipes[sw_if_index] = PIPE_INVALID; })); - /* *INDENT-ON* */ ethernet_delete_interface (vnm, hw_if_index); @@ -770,13 +756,11 @@ delete_pipe_interfaces (vlib_main_t * vm, * Example of how to delete a pipe interface: * @cliexcmd{pipe delete-interface intfc loop0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (pipe_delete_interface_command, static) = { .path = "pipe delete", .short_help = "pipe delete <interface>", .function = delete_pipe_interfaces, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/devices/pipe/pipe_api.c b/src/vnet/devices/pipe/pipe_api.c index 1f0faef7c1e..79a4377de83 100644 --- a/src/vnet/devices/pipe/pipe_api.c +++ b/src/vnet/devices/pipe/pipe_api.c @@ -42,14 +42,12 @@ vl_api_pipe_create_t_handler (vl_api_pipe_create_t * mp) rv = vnet_create_pipe_interface (is_specified, user_instance, &parent_sw_if_index, pipe_sw_if_index); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_PIPE_CREATE_REPLY, ({ rmp->sw_if_index = ntohl (parent_sw_if_index); rmp->pipe_sw_if_index[0] = ntohl (pipe_sw_if_index[0]); rmp->pipe_sw_if_index[1] = ntohl (pipe_sw_if_index[1]); })); - /* *INDENT-ON* */ } static void diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c index 096a2c46970..5c676d32d60 100644 --- a/src/vnet/devices/tap/cli.c +++ b/src/vnet/devices/tap/cli.c @@ -136,7 +136,6 @@ tap_create_command_fn (vlib_main_t * vm, unformat_input_t * input, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tap_create_command, static) = { .path = "create tap", .short_help = @@ -150,7 +149,6 @@ VLIB_CLI_COMMAND (tap_create_command, static) = { "[persist] [attach] [tun] [packed] [in-order]", .function = tap_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * tap_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -191,14 +189,12 @@ tap_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tap_delete__command, static) = { .path = "delete tap", .short_help = "delete tap {<interface> | sw_if_index <sw_idx>}", .function = tap_delete_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * tap_offload_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -261,7 +257,6 @@ tap_offload_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tap_offload_command, static) = { .path = "set tap offload", @@ -270,7 +265,6 @@ VLIB_CLI_COMMAND (tap_offload_command, static) = "csum-offload-disable>", .function = tap_offload_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * tap_show_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -300,10 +294,8 @@ tap_show_command_fn (vlib_main_t * vm, unformat_input_t * input, if (vec_len (hw_if_indices) == 0) { - /* *INDENT-OFF* */ pool_foreach (vif, mm->interfaces) vec_add1 (hw_if_indices, vif->hw_if_index); - /* *INDENT-ON* */ } virtio_show (vm, hw_if_indices, show_descr, VIRTIO_IF_TYPE_TAP); @@ -313,13 +305,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tap_show_command, static) = { .path = "show tap", .short_help = "show tap {<interface>] [descriptors]", .function = tap_show_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * tun_show_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -349,10 +339,8 @@ tun_show_command_fn (vlib_main_t * vm, unformat_input_t * input, if (vec_len (hw_if_indices) == 0) { - /* *INDENT-OFF* */ pool_foreach (vif, mm->interfaces) vec_add1 (hw_if_indices, vif->hw_if_index); - /* *INDENT-ON* */ } virtio_show (vm, hw_if_indices, show_descr, VIRTIO_IF_TYPE_TUN); @@ -362,13 +350,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tun_show_command, static) = { .path = "show tun", .short_help = "show tun {<interface>] [descriptors]", .function = tun_show_command_fn, }; -/* *INDENT-ON* */ clib_error_t * tap_cli_init (vlib_main_t * vm) diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c index 360c001b168..1e2ee87041d 100644 --- a/src/vnet/devices/tap/tap.c +++ b/src/vnet/devices/tap/tap.c @@ -97,14 +97,12 @@ tap_free (vlib_main_t * vm, virtio_if_t * vif) virtio_pre_input_node_disable (vm, vif); - /* *INDENT-OFF* */ vec_foreach_index (i, vif->vhost_fds) if (vif->vhost_fds[i] != -1) close (vif->vhost_fds[i]); vec_foreach_index (i, vif->rxq_vrings) virtio_vring_free_rx (vm, vif, RX_QUEUE (i)); vec_foreach_index (i, vif->txq_vrings) virtio_vring_free_tx (vm, vif, TX_QUEUE (i)); - /* *INDENT-ON* */ if (vif->tap_fds) { @@ -885,7 +883,6 @@ tap_dump_ifs (tap_interface_details_t ** out_tapids) tap_interface_details_t *r_tapids = NULL; tap_interface_details_t *tapid = NULL; - /* *INDENT-OFF* */ pool_foreach (vif, mm->interfaces) { if ((vif->type != VIRTIO_IF_TYPE_TAP) && (vif->type != VIRTIO_IF_TYPE_TUN)) @@ -929,7 +926,6 @@ tap_dump_ifs (tap_interface_details_t ** out_tapids) tapid->host_ip6_prefix_len = vif->host_ip6_prefix_len; tapid->host_mtu_size = vif->host_mtu_size; } - /* *INDENT-ON* */ *out_tapids = r_tapids; diff --git a/src/vnet/devices/virtio/cli.c b/src/vnet/devices/virtio/cli.c index 45642d6cff6..c1b6c8be065 100644 --- a/src/vnet/devices/virtio/cli.c +++ b/src/vnet/devices/virtio/cli.c @@ -73,7 +73,6 @@ virtio_pci_create_command_fn (vlib_main_t * vm, unformat_input_t * input, return args.error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (virtio_pci_create_command, static) = { .path = "create interface virtio", .short_help = "create interface virtio <pci-address> " @@ -82,7 +81,6 @@ VLIB_CLI_COMMAND (virtio_pci_create_command, static) = { "[buffering [size <buffering-szie>]] [packed] [bind [force]]", .function = virtio_pci_create_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * virtio_pci_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -128,14 +126,12 @@ virtio_pci_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (virtio_pci_delete_command, static) = { .path = "delete interface virtio", .short_help = "delete interface virtio " "{<interface> | sw_if_index <sw_idx>}", .function = virtio_pci_delete_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * virtio_pci_enable_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -190,14 +186,12 @@ virtio_pci_enable_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (virtio_pci_enable_command, static) = { .path = "set virtio pci", .short_help = "set virtio pci {<interface> | sw_if_index <sw_idx>}" " [gso-enabled | csum-offload-enabled | offloads-disabled]", .function = virtio_pci_enable_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_virtio_pci_fn (vlib_main_t * vm, unformat_input_t * input, @@ -256,13 +250,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_virtio_pci_command, static) = { .path = "show virtio pci", .short_help = "show virtio pci [<interface>] [descriptors | desc] [debug-device]", .function = show_virtio_pci_fn, }; -/* *INDENT-ON* */ clib_error_t * virtio_pci_cli_init (vlib_main_t * vm) diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c index ff14f0bb36f..112f77e7065 100644 --- a/src/vnet/devices/virtio/device.c +++ b/src/vnet/devices/virtio/device.c @@ -1202,7 +1202,6 @@ virtio_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) return 0; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (virtio_device_class) = { .name = "virtio", .format_device_name = format_virtio_device_name, @@ -1216,7 +1215,6 @@ VNET_DEVICE_CLASS (virtio_device_class) = { .rx_mode_change_function = virtio_interface_rx_mode_change, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/devices/virtio/node.c b/src/vnet/devices/virtio/node.c index 09478b1c32f..8c837575cf8 100644 --- a/src/vnet/devices/virtio/node.c +++ b/src/vnet/devices/virtio/node.c @@ -524,7 +524,6 @@ VLIB_NODE_FN (virtio_input_node) (vlib_main_t * vm, return n_rx; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (virtio_input_node) = { .name = "virtio-input", .sibling_of = "device-input", @@ -535,7 +534,6 @@ VLIB_REGISTER_NODE (virtio_input_node) = { .n_errors = VIRTIO_INPUT_N_ERROR, .error_strings = virtio_input_error_strings, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c index 0820f8a5016..6234f64fcfb 100644 --- a/src/vnet/devices/virtio/pci.c +++ b/src/vnet/devices/virtio/pci.c @@ -1340,7 +1340,6 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args) clib_error_t *error = 0; u32 interrupt_count = 0; - /* *INDENT-OFF* */ pool_foreach (vif, vim->interfaces) { if (vif->pci_addr.as_u32 == args->addr) { @@ -1353,7 +1352,6 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args) return; } } - /* *INDENT-ON* */ if (args->bind) { diff --git a/src/vnet/devices/virtio/pci.h b/src/vnet/devices/virtio/pci.h index 2b23377999f..5eb80f823be 100644 --- a/src/vnet/devices/virtio/pci.h +++ b/src/vnet/devices/virtio/pci.h @@ -154,13 +154,11 @@ typedef struct * and an ack/status response in the last entry. Data for the * command goes in between. */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 class; u8 cmd; }) virtio_net_ctrl_hdr_t; -/* *INDENT-ON* */ typedef u8 virtio_net_ctrl_ack_t; diff --git a/src/vnet/devices/virtio/virtio_process.c b/src/vnet/devices/virtio/virtio_process.c index 18b34e0aa62..13ba590659c 100644 --- a/src/vnet/devices/virtio/virtio_process.c +++ b/src/vnet/devices/virtio/virtio_process.c @@ -70,13 +70,11 @@ virtio_send_interrupt_process (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (virtio_send_interrupt_node) = { .function = virtio_send_interrupt_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "virtio-send-interrupt-process", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/devices/virtio/virtio_std.h b/src/vnet/devices/virtio/virtio_std.h index 86984339bc2..ec988c08dbb 100644 --- a/src/vnet/devices/virtio/virtio_std.h +++ b/src/vnet/devices/virtio/virtio_std.h @@ -122,7 +122,6 @@ typedef struct /* u16 avail_event; */ } vnet_virtio_vring_used_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u64 addr; // packet data buffer address u32 len; // packet data buffer size @@ -170,7 +169,6 @@ typedef CLIB_PACKED (struct { u16 num_buffers; }) vnet_virtio_net_hdr_mrg_rxbuf_t; -/* *INDENT-ON* */ #endif /* diff --git a/src/vnet/dpo/dpo.c b/src/vnet/dpo/dpo.c index d8342ff17ae..fc789ae0a7f 100644 --- a/src/vnet/dpo/dpo.c +++ b/src/vnet/dpo/dpo.c @@ -613,12 +613,10 @@ dpo_module_init (vlib_main_t * vm) return (NULL); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION(dpo_module_init) = { .runs_before = VLIB_INITS ("ip_main_init"), }; -/* *INDENT-ON* */ static clib_error_t * dpo_memory_show (vlib_main_t * vm, @@ -640,7 +638,6 @@ dpo_memory_show (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ /*? * The '<em>sh dpo memory </em>' command displays the memory usage for each * data-plane object type. @@ -662,6 +659,5 @@ VLIB_CLI_COMMAND (show_fib_memory, static) = { .function = dpo_memory_show, .short_help = "show dpo memory", }; -/* *INDENT-ON* */ // clang-format on diff --git a/src/vnet/dpo/ip6_ll_dpo.c b/src/vnet/dpo/ip6_ll_dpo.c index deb67d88137..86908efbc04 100644 --- a/src/vnet/dpo/ip6_ll_dpo.c +++ b/src/vnet/dpo/ip6_ll_dpo.c @@ -191,7 +191,6 @@ static char *ip6_ll_dpo_error_strings[] = { /** * @brief */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_ll_dpo_node) = { .function = ip6_ll_dpo_switch, @@ -206,7 +205,6 @@ VLIB_REGISTER_NODE (ip6_ll_dpo_node) = [IP6_LL_NEXT_LOOKUP] = "ip6-lookup", }, }; -/* *INDENT-ON* */ void ip6_ll_dpo_module_init (void) diff --git a/src/vnet/ethernet/arp_packet.h b/src/vnet/ethernet/arp_packet.h index c406dade6e2..9a9df680853 100644 --- a/src/vnet/ethernet/arp_packet.h +++ b/src/vnet/ethernet/arp_packet.h @@ -110,12 +110,10 @@ typedef enum IP4_ARP_N_NEXT, } ip4_arp_next_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { mac_address_t mac; ip4_address_t ip4; }) ethernet_arp_ip4_over_ethernet_address_t; -/* *INDENT-ON* */ STATIC_ASSERT (sizeof (ethernet_arp_ip4_over_ethernet_address_t) == 10, "Packet ethernet address and IP4 address too big"); diff --git a/src/vnet/ethernet/init.c b/src/vnet/ethernet/init.c index f78b65c7cc0..3921e1ec0e6 100644 --- a/src/vnet/ethernet/init.c +++ b/src/vnet/ethernet/init.c @@ -62,7 +62,6 @@ add_type (ethernet_main_t * em, ethernet_type_t type, char *type_name) } /* Built-in ip4 tx feature path definition */ -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (ethernet_output, static) = { .arc_name = "ethernet-output", @@ -77,7 +76,6 @@ VNET_FEATURE_INIT (ethernet_tx_drop, static) = .node_name = "error-drop", .runs_before = 0, /* not before any other features */ }; -/* *INDENT-ON* */ static clib_error_t * ethernet_init (vlib_main_t * vm) @@ -107,7 +105,6 @@ ethernet_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ethernet_init) = { /* @@ -119,7 +116,6 @@ VLIB_INIT_FUNCTION (ethernet_init) = "llc_init", "vnet_feature_init"), }; -/* *INDENT-ON* */ ethernet_main_t * ethernet_get_main (vlib_main_t * vm) diff --git a/src/vnet/ethernet/interface.c b/src/vnet/ethernet/interface.c index 849024238bd..f1bb6b81070 100644 --- a/src/vnet/ethernet/interface.c +++ b/src/vnet/ethernet/interface.c @@ -334,7 +334,6 @@ ethernet_set_max_frame_size (vnet_main_t *vnm, vnet_hw_interface_t *hi, "underlying driver doesn't support changing Max Frame Size"); } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (ethernet_hw_interface_class) = { .name = "Ethernet", .tx_hash_fn_type = VNET_HASH_FN_TYPE_ETHERNET, @@ -347,7 +346,6 @@ VNET_HW_INTERFACE_CLASS (ethernet_hw_interface_class) = { .mac_addr_change_function = ethernet_mac_change, .set_max_frame_size = ethernet_set_max_frame_size, }; -/* *INDENT-ON* */ uword unformat_ethernet_interface (unformat_input_t * input, va_list * args) @@ -760,7 +758,6 @@ simulated_ethernet_mac_change (vnet_hw_interface_t * hi, } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (ethernet_simulated_device_class) = { .name = "Loopback", .format_device_name = format_simulated_ethernet_name, @@ -768,7 +765,6 @@ VNET_DEVICE_CLASS (ethernet_simulated_device_class) = { .admin_up_down_function = simulated_ethernet_admin_up_down, .mac_addr_change_function = simulated_ethernet_mac_change, }; -/* *INDENT-ON* */ /* * Maintain a bitmap of allocated loopback instance numbers. @@ -957,13 +953,11 @@ create_simulated_ethernet_interfaces (vlib_main_t * vm, * Example of how to create a loopback interface: * @cliexcmd{loopback create-interface} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_simulated_ethernet_interface_command, static) = { .path = "loopback create-interface", .short_help = "loopback create-interface [mac <mac-addr>] [instance <instance>]", .function = create_simulated_ethernet_interfaces, }; -/* *INDENT-ON* */ /*? * Create a loopback interface. Optionally, a MAC Address can be @@ -976,13 +970,11 @@ VLIB_CLI_COMMAND (create_simulated_ethernet_interface_command, static) = { * Example of how to create a loopback interface: * @cliexcmd{create loopback interface} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_loopback_interface_command, static) = { .path = "create loopback interface", .short_help = "create loopback interface [mac <mac-addr>] [instance <instance>]", .function = create_simulated_ethernet_interfaces, }; -/* *INDENT-ON* */ ethernet_interface_t * ethernet_get_interface (ethernet_main_t * em, u32 hw_if_index) @@ -1193,13 +1185,11 @@ delete_sub_interface (vlib_main_t * vm, * Example of how to delete a loopback interface: * @cliexcmd{loopback delete-interface intfc loop0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (delete_simulated_ethernet_interface_command, static) = { .path = "loopback delete-interface", .short_help = "loopback delete-interface intfc <interface>", .function = delete_simulated_ethernet_interfaces, }; -/* *INDENT-ON* */ /*? * Delete a loopback interface. @@ -1211,13 +1201,11 @@ VLIB_CLI_COMMAND (delete_simulated_ethernet_interface_command, static) = { * Example of how to delete a loopback interface: * @cliexcmd{delete loopback interface intfc loop0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (delete_loopback_interface_command, static) = { .path = "delete loopback interface", .short_help = "delete loopback interface intfc <interface>", .function = delete_simulated_ethernet_interfaces, }; -/* *INDENT-ON* */ /*? * Delete a sub-interface. @@ -1226,13 +1214,11 @@ VLIB_CLI_COMMAND (delete_loopback_interface_command, static) = { * Example of how to delete a sub-interface: * @cliexcmd{delete sub-interface GigabitEthernet0/8/0.200} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (delete_sub_interface_command, static) = { .path = "delete sub-interface", .short_help = "delete sub-interface <interface>", .function = delete_sub_interface, }; -/* *INDENT-ON* */ /* ethernet { ... } configuration. */ /*? diff --git a/src/vnet/ethernet/mac_address.c b/src/vnet/ethernet/mac_address.c index 2237c3772b8..098b3ce19c1 100644 --- a/src/vnet/ethernet/mac_address.c +++ b/src/vnet/ethernet/mac_address.c @@ -15,13 +15,11 @@ #include <vnet/ethernet/mac_address.h> -/* *INDENT-OFF* */ const mac_address_t ZERO_MAC_ADDRESS = { .bytes = { 0, 0, 0, 0, 0, 0, }, }; -/* *INDENT-ON* */ u8 * format_mac_address_t (u8 * s, va_list * args) diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c index 4ef575a85fc..e2558eeca41 100644 --- a/src/vnet/ethernet/node.c +++ b/src/vnet/ethernet/node.c @@ -2098,7 +2098,6 @@ static char *ethernet_error_strings[] = { #undef ethernet_error }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ethernet_input_node) = { .name = "ethernet-input", /* Takes a vector of packets. */ @@ -2140,7 +2139,6 @@ VLIB_REGISTER_NODE (ethernet_input_not_l2_node) = { #undef _ }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT void diff --git a/src/vnet/ethernet/p2p_ethernet_api.c b/src/vnet/ethernet/p2p_ethernet_api.c index a9a8cc0a444..903678ce445 100644 --- a/src/vnet/ethernet/p2p_ethernet_api.c +++ b/src/vnet/ethernet/p2p_ethernet_api.c @@ -58,14 +58,12 @@ vl_api_p2p_ethernet_add_t_handler (vl_api_p2p_ethernet_add_t * mp) BAD_SW_IF_INDEX_LABEL; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_P2P_ETHERNET_ADD_REPLY, ({ rmp->sw_if_index = htonl(p2pe_if_index); })); - /* *INDENT-ON* */ } void diff --git a/src/vnet/ethernet/p2p_ethernet_input.c b/src/vnet/ethernet/p2p_ethernet_input.c index 3e9589e0e19..3d81e99cff2 100644 --- a/src/vnet/ethernet/p2p_ethernet_input.c +++ b/src/vnet/ethernet/p2p_ethernet_input.c @@ -235,7 +235,6 @@ VLIB_NODE_FN (p2p_ethernet_input_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (p2p_ethernet_input_node) = { .name = "p2p-ethernet-input", .vector_size = sizeof (u32), @@ -253,7 +252,6 @@ VLIB_REGISTER_NODE (p2p_ethernet_input_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ethernet/packet.h b/src/vnet/ethernet/packet.h index e1e42badd06..007f93596f3 100644 --- a/src/vnet/ethernet/packet.h +++ b/src/vnet/ethernet/packet.h @@ -184,7 +184,6 @@ typedef struct #define ETHERNET_N_PBB (1 << 24) } ethernet_pbb_header_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /* Backbone source/destination address. */ @@ -201,7 +200,6 @@ typedef CLIB_PACKED (struct /* 3 bit priority, 1 bit DEI, 1 bit UCA, 3 bit RES and 24 bit I_SID (service identifier) */ u32 priority_dei_uca_res_sid; }) ethernet_pbb_header_packed_t; -/* *INDENT-ON* */ #endif /* included_ethernet_packet_h */ diff --git a/src/vnet/feature/feature.c b/src/vnet/feature/feature.c index 1750612783b..a7246fbb16a 100644 --- a/src/vnet/feature/feature.c +++ b/src/vnet/feature/feature.c @@ -533,13 +533,11 @@ show_features_command_fn (vlib_main_t * vm, * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_features_command, static) = { .path = "show features", .short_help = "show features [verbose]", .function = show_features_command_fn, }; -/* *INDENT-ON* */ /** Display the set of driver features configured on a specific interface * Called by "show interface" handler @@ -700,14 +698,12 @@ done: * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_feature_command, static) = { .path = "set interface feature", .short_help = "set interface feature <intfc> <feature_name> arc <arc_name> " "[disable]", .function = set_interface_features_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * vnet_feature_add_del_sw_interface (vnet_main_t * vnm, u32 sw_if_index, diff --git a/src/vnet/feature/registration.c b/src/vnet/feature/registration.c index 537a4ada6e4..bc20412b9cf 100644 --- a/src/vnet/feature/registration.c +++ b/src/vnet/feature/registration.c @@ -351,12 +351,10 @@ again: *in_feature_nodes = feature_nodes; /* Finally, clean up all the shit we allocated */ - /* *INDENT-OFF* */ hash_foreach_pair (hp, index_by_name, ({ vec_add1 (keys_to_delete, (u8 *)hp->key); })); - /* *INDENT-ON* */ hash_free (index_by_name); for (i = 0; i < vec_len (keys_to_delete); i++) vec_free (keys_to_delete[i]); diff --git a/src/vnet/fib/fib.c b/src/vnet/fib/fib.c index ddfa830bb0f..cce03b4b49c 100644 --- a/src/vnet/fib/fib.c +++ b/src/vnet/fib/fib.c @@ -32,9 +32,7 @@ fib_module_init (vlib_main_t * vm) return (NULL); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (fib_module_init) = { .runs_after = VLIB_INITS("dpo_module_init", "adj_module_init"), }; -/* *INDENT-ON* */ diff --git a/src/vnet/fib/fib_bfd.c b/src/vnet/fib/fib_bfd.c index b02fbc67a63..6bfd29ae2cc 100644 --- a/src/vnet/fib/fib_bfd.c +++ b/src/vnet/fib/fib_bfd.c @@ -188,9 +188,7 @@ fib_bfd_main_init (vlib_main_t * vm) return (NULL); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (fib_bfd_main_init) = { .runs_after = VLIB_INITS("bfd_main_init"), }; -/* *INDENT-ON* */ diff --git a/src/vnet/fib/fib_node.c b/src/vnet/fib/fib_node.c index ff72bcfde40..e668c4fc51f 100644 --- a/src/vnet/fib/fib_node.c +++ b/src/vnet/fib/fib_node.c @@ -268,7 +268,6 @@ fib_memory_show (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ /*? * The '<em>sh fib memory </em>' command displays the memory usage for each * FIB object type. @@ -301,4 +300,3 @@ VLIB_CLI_COMMAND (show_fib_memory, static) = { .function = fib_memory_show, .short_help = "show fib memory", }; -/* *INDENT-ON* */ diff --git a/src/vnet/fib/fib_urpf_list.c b/src/vnet/fib/fib_urpf_list.c index b1bbe7399d1..67be6699a0e 100644 --- a/src/vnet/fib/fib_urpf_list.c +++ b/src/vnet/fib/fib_urpf_list.c @@ -228,7 +228,6 @@ show_fib_urpf_list_command (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ /*? * The '<em>sh fib uRPF [index] </em>' command displays the uRPF lists * @@ -246,4 +245,3 @@ VLIB_CLI_COMMAND (show_fib_urpf_list, static) = { .function = show_fib_urpf_list_command, .short_help = "show fib uRPF", }; -/* *INDENT-OFF* */ diff --git a/src/vnet/fib/fib_walk.c b/src/vnet/fib/fib_walk.c index b3b2b1e7944..236607cb891 100644 --- a/src/vnet/fib/fib_walk.c +++ b/src/vnet/fib/fib_walk.c @@ -611,13 +611,11 @@ fib_walk_process (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (fib_walk_process_node,static) = { .function = fib_walk_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "fib-walk", }; -/* *INDENT-ON* */ /** * @brief Allocate a new walk object diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c index 8e580a54716..4211f8785ca 100644 --- a/src/vnet/fib/ip4_fib.c +++ b/src/vnet/fib/ip4_fib.c @@ -621,10 +621,8 @@ ip4_show_fib (vlib_main_t * vm, * 32 4 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip4_show_fib_command, static) = { .path = "show ip fib", .short_help = "show ip fib [summary] [table <table-id>] [index <fib-id>] [<ip4-addr>[/<mask>]] [mtrie] [detail]", .function = ip4_show_fib, }; -/* *INDENT-ON* */ diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c index 6c73d19d8e3..c40491cc997 100644 --- a/src/vnet/fib/ip6_fib.c +++ b/src/vnet/fib/ip6_fib.c @@ -862,13 +862,11 @@ ip6_show_fib (vlib_main_t * vm, * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_show_fib_command, static) = { .path = "show ip6 fib", .short_help = "show ip6 fib [summary] [table <table-id>] [index <fib-id>] [<ip6-addr>[/<width>]] [detail]", .function = ip6_show_fib, }; -/* *INDENT-ON* */ static clib_error_t * ip6_config (vlib_main_t * vm, unformat_input_t * input) diff --git a/src/vnet/flow/flow.c b/src/vnet/flow/flow.c index 9b6a376af3e..eda15356958 100644 --- a/src/vnet/flow/flow.c +++ b/src/vnet/flow/flow.c @@ -74,12 +74,10 @@ vnet_flow_del (vnet_main_t * vnm, u32 flow_index) if (f == 0) return VNET_FLOW_ERROR_NO_SUCH_ENTRY; - /* *INDENT-OFF* */ hash_foreach (hw_if_index, private_data, f->private_data, ({ vnet_flow_disable (vnm, flow_index, hw_if_index); })); - /* *INDENT-ON* */ hash_free (f->private_data); clib_memset (f, 0, sizeof (*f)); diff --git a/src/vnet/flow/flow_api.c b/src/vnet/flow/flow_api.c index 29ba9e05edf..bfe97ec2978 100644 --- a/src/vnet/flow/flow_api.c +++ b/src/vnet/flow/flow_api.c @@ -299,12 +299,10 @@ vl_api_flow_add_t_handler (vl_api_flow_add_t * mp) rv = vnet_flow_add (vnm, &flow, &flow_index); out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_FLOW_ADD_REPLY, ({ rmp->flow_index = ntohl (flow_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/vnet/flow/flow_cli.c b/src/vnet/flow/flow_cli.c index bf343b0d550..e4b73717241 100644 --- a/src/vnet/flow/flow_cli.c +++ b/src/vnet/flow/flow_cli.c @@ -138,13 +138,11 @@ format_flow_enabled_hw (u8 * s, va_list * args) u32 hw_if_index; uword private_data; vnet_main_t *vnm = vnet_get_main (); - /* *INDENT-OFF* */ hash_foreach (hw_if_index, private_data, f->private_data, ({ t = format (t, "%s%U", t ? ", " : "", format_vnet_hw_if_index_name, vnm, hw_if_index); })); - /* *INDENT-ON* */ s = format (s, "%v", t); vec_free (t); return s; @@ -228,7 +226,6 @@ show_flow_entry (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "%s: %s", "spec", f->generic.pattern.spec); vlib_cli_output (vm, "%s: %s", "mask", f->generic.pattern.mask); } - /* *INDENT-OFF* */ hash_foreach (hw_if_index, private_data, f->private_data, ({ hi = vnet_get_hw_interface (vnm, hw_if_index); @@ -239,12 +236,10 @@ show_flow_entry (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, " %U\n", dev_class->format_flow, hi->dev_instance, f->index, private_data); })); - /* *INDENT-ON* */ return 0; } no_args: - /* *INDENT-OFF* */ pool_foreach (f, fm->global_flow_pool) { vlib_cli_output (vm, "%U\n", format_flow, f); @@ -254,18 +249,15 @@ no_args: vlib_cli_output (vm, "%s: %s", "mask", f->generic.pattern.mask); } } - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_flow_entry_command, static) = { .path = "show flow entry", .short_help = "show flow entry [index <index>]", .function = show_flow_entry, }; -/* *INDENT-ON* */ static clib_error_t * show_flow_ranges (vlib_main_t * vm, unformat_input_t * input, @@ -276,22 +268,18 @@ show_flow_ranges (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "%8s %8s %s", "Start", "Count", "Owner"); - /* *INDENT-OFF* */ vec_foreach (r, fm->ranges) { vlib_cli_output (vm, "%8u %8u %s", r->start, r->count, r->owner); }; - /* *INDENT-ON* */ return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_flow_ranges_command, static) = { .path = "show flow ranges", .short_help = "show flow ranges", .function = show_flow_ranges, }; -/* *INDENT-ON* */ static clib_error_t * show_flow_interface (vlib_main_t * vm, unformat_input_t * input, @@ -329,13 +317,11 @@ show_flow_interface (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_flow_interface_command, static) = { .path = "show flow interface", .short_help = "show flow interface <interface name>", .function = show_flow_interface, }; -/* *INDENT-ON* */ static clib_error_t * test_flow (vlib_main_t * vm, unformat_input_t * input, @@ -833,7 +819,6 @@ test_flow (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_flow_command, static) = { .path = "test flow", .short_help = "test flow [add|del|enable|disable] [index <id>] " @@ -850,7 +835,6 @@ VLIB_CLI_COMMAND (test_flow_command, static) = { "[rss queues <queue_start> to <queue_end>]", .function = test_flow, }; -/* *INDENT-ON* */ static u8 * format_flow_match_element (u8 * s, va_list * args) diff --git a/src/vnet/gre/packet.h b/src/vnet/gre/packet.h index bbd67d565c5..bbda2df3f68 100644 --- a/src/vnet/gre/packet.h +++ b/src/vnet/gre/packet.h @@ -138,7 +138,6 @@ typedef struct This field is platform dependent. */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u32 seq_num; union @@ -158,7 +157,6 @@ typedef CLIB_PACKED (struct { erspan_t2_t erspan; }) erspan_t2_header_t; -/* *INDENT-ON* */ /* u64 template for ERSPAN type 2 header with both EN bits set */ #define ERSPAN_HDR2 0x1000180000000000ul diff --git a/src/vnet/gso/cli.c b/src/vnet/gso/cli.c index 060ce812fad..11dbaad728f 100644 --- a/src/vnet/gso/cli.c +++ b/src/vnet/gso/cli.c @@ -76,13 +76,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_feature_gso_command, static) = { .path = "set interface feature gso", .short_help = "set interface feature gso <intfc> [enable | disable]", .function = set_interface_feature_gso_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/gso/node.c b/src/vnet/gso/node.c index 7e66bb9fe00..910f1585e7f 100644 --- a/src/vnet/gso/node.c +++ b/src/vnet/gso/node.c @@ -839,7 +839,6 @@ VLIB_NODE_FN (gso_ip6_node) (vlib_main_t * vm, vlib_node_runtime_t * node, 1 /* ip6 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (gso_l2_ip4_node) = { .vector_size = sizeof (u32), diff --git a/src/vnet/handoff.c b/src/vnet/handoff.c index 61ca30f2962..e9c3bb6de67 100644 --- a/src/vnet/handoff.c +++ b/src/vnet/handoff.c @@ -312,14 +312,12 @@ set_interface_handoff_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_handoff_command, static) = { .path = "set interface handoff", .short_help = "set interface handoff <interface-name> workers <workers-list>" " [symmetrical|asymmetrical]", .function = set_interface_handoff_command_fn, }; -/* *INDENT-ON* */ clib_error_t * handoff_init (vlib_main_t * vm) diff --git a/src/vnet/hdlc/hdlc.c b/src/vnet/hdlc/hdlc.c index fa1e7cd5eaf..443a0396e9e 100644 --- a/src/vnet/hdlc/hdlc.c +++ b/src/vnet/hdlc/hdlc.c @@ -197,7 +197,6 @@ hdlc_build_rewrite (vnet_main_t * vnm, return (rewrite); } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (hdlc_hw_interface_class) = { .name = "HDLC", .format_header = format_hdlc_header_with_length, @@ -205,7 +204,6 @@ VNET_HW_INTERFACE_CLASS (hdlc_hw_interface_class) = { .build_rewrite = hdlc_build_rewrite, .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P, }; -/* *INDENT-ON* */ static void add_protocol (hdlc_main_t * pm, hdlc_protocol_t protocol, char *protocol_name) diff --git a/src/vnet/hdlc/node.c b/src/vnet/hdlc/node.c index 8bb621231c7..48269a3b8d3 100644 --- a/src/vnet/hdlc/node.c +++ b/src/vnet/hdlc/node.c @@ -279,7 +279,6 @@ static char *hdlc_error_strings[] = { #undef hdlc_error }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (hdlc_input_node) = { .function = hdlc_input, .name = "hdlc-input", @@ -302,7 +301,6 @@ VLIB_REGISTER_NODE (hdlc_input_node) = { .format_trace = format_hdlc_input_trace, .unformat_buffer = unformat_hdlc_header, }; -/* *INDENT-ON* */ static clib_error_t * hdlc_input_runtime_init (vlib_main_t * vm) diff --git a/src/vnet/interface.c b/src/vnet/interface.c index 706692ca04d..5fb2ff65fa2 100644 --- a/src/vnet/interface.c +++ b/src/vnet/interface.c @@ -45,11 +45,9 @@ #include <vnet/interface/rx_queue_funcs.h> #include <vnet/interface/tx_queue_funcs.h> -/* *INDENT-OFF* */ VLIB_REGISTER_LOG_CLASS (if_default_log, static) = { .class_name = "interface", }; -/* *INDENT-ON* */ #define log_debug(fmt,...) vlib_log_debug(if_default_log.class, fmt, __VA_ARGS__) #define log_err(fmt,...) vlib_log_err(if_default_log.class, fmt, __VA_ARGS__) @@ -141,15 +139,12 @@ serialize_vnet_interface_state (serialize_main_t * m, va_list * va) /* Serialize hardware interface classes since they may have changed. Must do this before sending up/down flags. */ - /* *INDENT-OFF* */ pool_foreach (hif, im->hw_interfaces) { vnet_hw_interface_class_t * hw_class = vnet_get_hw_interface_class (vnm, hif->hw_class_index); serialize_cstring (m, hw_class->name); } - /* *INDENT-ON* */ /* Send sw/hw interface state when non-zero. */ - /* *INDENT-OFF* */ pool_foreach (sif, im->sw_interfaces) { if (sif->flags != 0) { @@ -158,14 +153,12 @@ serialize_vnet_interface_state (serialize_main_t * m, va_list * va) st->flags = sif->flags; } } - /* *INDENT-ON* */ vec_serialize (m, sts, serialize_vec_vnet_sw_hw_interface_state); if (sts) vec_set_len (sts, 0); - /* *INDENT-OFF* */ pool_foreach (hif, im->hw_interfaces) { if (hif->flags != 0) { @@ -174,7 +167,6 @@ serialize_vnet_interface_state (serialize_main_t * m, va_list * va) st->flags = vnet_hw_interface_flags_to_sw(hif->flags); } } - /* *INDENT-ON* */ vec_serialize (m, sts, serialize_vec_vnet_sw_hw_interface_state); @@ -206,7 +198,6 @@ unserialize_vnet_interface_state (serialize_main_t * m, va_list * va) uword *p; clib_error_t *error; - /* *INDENT-OFF* */ pool_foreach (hif, im->hw_interfaces) { unserialize_cstring (m, &class_name); p = hash_get_mem (im->hw_interface_class_by_name, class_name); @@ -222,7 +213,6 @@ unserialize_vnet_interface_state (serialize_main_t * m, va_list * va) clib_error_report (error); vec_free (class_name); } - /* *INDENT-ON* */ } vec_unserialize (m, &sts, unserialize_vec_vnet_sw_hw_interface_state); @@ -1116,7 +1106,6 @@ vnet_delete_hw_interface (vnet_main_t * vnm, u32 hw_if_index) /* Delete any sub-interfaces. */ { u32 id, sw_if_index; - /* *INDENT-OFF* */ hash_foreach (id, sw_if_index, hw->sub_interface_sw_if_index_by_id, ({ vnet_sw_interface_t *si = vnet_get_sw_interface (vnm, sw_if_index); @@ -1126,7 +1115,6 @@ vnet_delete_hw_interface (vnet_main_t * vnm, u32 hw_if_index) vnet_delete_sw_interface (vnm, sw_if_index); })); hash_free (hw->sub_interface_sw_if_index_by_id); - /* *INDENT-ON* */ } /* Delete software interface corresponding to hardware interface. */ @@ -1177,14 +1165,12 @@ vnet_hw_interface_walk_sw (vnet_main_t * vnm, if (WALK_STOP == fn (vnm, hi->sw_if_index, ctx)) return; - /* *INDENT-OFF* */ hash_foreach (id, sw_if_index, hi->sub_interface_sw_if_index_by_id, ({ if (WALK_STOP == fn (vnm, sw_if_index, ctx)) break; })); - /* *INDENT-ON* */ } void @@ -1196,13 +1182,11 @@ vnet_hw_interface_walk (vnet_main_t * vnm, im = &vnm->interface_main; - /* *INDENT-OFF* */ pool_foreach (hi, im->hw_interfaces) { if (WALK_STOP == fn(vnm, hi->hw_if_index, ctx)) break; } - /* *INDENT-ON* */ } void @@ -1214,13 +1198,11 @@ vnet_sw_interface_walk (vnet_main_t * vnm, im = &vnm->interface_main; - /* *INDENT-OFF* */ pool_foreach (si, im->sw_interfaces) { if (WALK_STOP == fn (vnm, si, ctx)) break; } - /* *INDENT-ON* */ } void @@ -1945,13 +1927,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (collect_detailed_interface_stats_command, static) = { .path = "interface collect detailed-stats", .short_help = "interface collect detailed-stats <enable|disable>", .function = collect_detailed_interface_stats_cli, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c index 9f1d43a6c37..2995836672d 100644 --- a/src/vnet/interface_api.c +++ b/src/vnet/interface_api.c @@ -387,7 +387,6 @@ vl_api_sw_interface_dump_t_handler (vl_api_sw_interface_dump_t * mp) vec_add1 (filter, 0); /* Ensure it's a C string for strcasecmp() */ } - /* *INDENT-OFF* */ pool_foreach (swif, im->sw_interfaces) { if (!vnet_swif_is_api_visible (swif)) @@ -401,7 +400,6 @@ vl_api_sw_interface_dump_t_handler (vl_api_sw_interface_dump_t * mp) send_sw_interface_details (am, rp, swif, name, mp->context); } - /* *INDENT-ON* */ vec_free (name); vec_free (filter); @@ -810,14 +808,12 @@ link_state_process (vlib_main_t * vm, if (event_by_sw_if_index[i] == 0) continue; - /* *INDENT-OFF* */ pool_foreach (reg, vam->interface_events_registrations) { vl_reg = vl_api_client_index_to_registration (reg->client_index); if (vl_reg) send_sw_interface_event (vam, reg, vl_reg, i, event_by_sw_if_index[i]); } - /* *INDENT-ON* */ } vec_reset_length (event_by_sw_if_index); } @@ -833,13 +829,11 @@ static clib_error_t *sw_interface_add_del_function (vnet_main_t * vm, u32 sw_if_index, u32 flags); -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (link_state_process_node,static) = { .function = link_state_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "vpe-link-state-process", }; -/* *INDENT-ON* */ VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (admin_up_down_function); VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION (link_up_down_function); @@ -1477,12 +1471,10 @@ vl_api_create_subif_t_handler (vl_api_create_subif_t * mp) BAD_SW_IF_INDEX_LABEL; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_CREATE_SUBIF_REPLY, ({ rmp->sw_if_index = ntohl(sub_sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -1524,12 +1516,10 @@ vl_api_create_loopback_t_handler (vl_api_create_loopback_t * mp) mac_address_decode (mp->mac_address, &mac); rv = vnet_create_loopback_interface (&sw_if_index, (u8 *) & mac, 0, 0); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_CREATE_LOOPBACK_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); })); - /* *INDENT-ON* */ } static void vl_api_create_loopback_instance_t_handler @@ -1546,12 +1536,10 @@ static void vl_api_create_loopback_instance_t_handler rv = vnet_create_loopback_interface (&sw_if_index, (u8 *) & mac, is_specified, user_instance); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_CREATE_LOOPBACK_INSTANCE_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c index b2410b82c05..c56eb9777cf 100644 --- a/src/vnet/interface_cli.c +++ b/src/vnet/interface_cli.c @@ -149,14 +149,12 @@ skip_unformat: vlib_cli_output (vm, "%U\n", format_vnet_hw_interface, vnm, hi, verbose); - /* *INDENT-OFF* */ clib_bitmap_foreach (hw_idx, hi->bond_info) { shi = vnet_get_hw_interface(vnm, hw_idx); vlib_cli_output (vm, "%U\n", format_vnet_hw_interface, vnm, shi, verbose); } - /* *INDENT-ON* */ } } } @@ -250,14 +248,12 @@ clear_hw_interfaces (vlib_main_t * vm, * cpu socket 0 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_hw_interfaces_command, static) = { .path = "show hardware-interfaces", .short_help = "show hardware-interfaces [brief|verbose|detail] [bond] " "[<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]]", .function = show_hw_interfaces, }; -/* *INDENT-ON* */ /*? @@ -271,14 +267,12 @@ VLIB_CLI_COMMAND (show_hw_interfaces_command, static) = { * name and software index (where 2 is the software index): * @cliexcmd{clear hardware-interfaces GigabitEthernet7/0/0 2} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_hw_interface_counters_command, static) = { .path = "clear hardware-interfaces", .short_help = "clear hardware-interfaces " "[<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]]", .function = clear_hw_interfaces, }; -/* *INDENT-ON* */ static int sw_interface_name_compare (void *a1, void *a2) @@ -420,14 +414,12 @@ show_sw_interfaces (vlib_main_t * vm, sorted_sis = vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces)); vec_set_len (sorted_sis, 0); - /* *INDENT-OFF* */ pool_foreach (si, im->sw_interfaces) { int visible = vnet_swif_is_api_visible (si); if (visible) vec_add1 (sorted_sis, si[0]); } - /* *INDENT-ON* */ /* Sort by name. */ vec_sort_with_function (sorted_sis, sw_interface_name_compare); } @@ -469,7 +461,6 @@ show_sw_interfaces (vlib_main_t * vm, /* Display any L2 info */ vlib_cli_output (vm, "%U", format_l2_input, si->sw_if_index); - /* *INDENT-OFF* */ /* Display any IP4 addressing info */ foreach_ip_interface_address (lm4, ia, si->sw_if_index, 1 /* honor unnumbered */, @@ -484,9 +475,7 @@ show_sw_interfaces (vlib_main_t * vm, vlib_cli_output (vm, " L3 %U/%d", format_ip4_address, r4, ia->address_length); })); - /* *INDENT-ON* */ - /* *INDENT-OFF* */ /* Display any IP6 addressing info */ foreach_ip_interface_address (lm6, ia, si->sw_if_index, 1 /* honor unnumbered */, @@ -501,7 +490,6 @@ show_sw_interfaces (vlib_main_t * vm, vlib_cli_output (vm, " L3 %U/%d", format_ip6_address, r6, ia->address_length); })); - /* *INDENT-ON* */ } } else @@ -517,7 +505,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_sw_interfaces_command, static) = { .path = "show interface", .short_help = "show interface [address|addr|features|feat|vtr|tag] " @@ -525,22 +512,17 @@ VLIB_CLI_COMMAND (show_sw_interfaces_command, static) = { .function = show_sw_interfaces, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* Root of all interface commands. */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vnet_cli_interface_command, static) = { .path = "interface", .short_help = "Interface commands", }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vnet_cli_set_interface_command, static) = { .path = "set interface", .short_help = "Interface commands", }; -/* *INDENT-ON* */ static clib_error_t * clear_interface_counters (vlib_main_t * vm, @@ -581,13 +563,11 @@ clear_interface_counters (vlib_main_t * vm, * Example of how to clear the statistics for all interfaces: * @cliexcmd{clear interfaces} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_interface_counters_command, static) = { .path = "clear interfaces", .short_help = "clear interfaces", .function = clear_interface_counters, }; -/* *INDENT-ON* */ /** * Parse subinterface names. @@ -912,7 +892,6 @@ done: * @cliexcmd{set interface GigabitEthernet2/0/0.7 up} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_sub_interfaces_command, static) = { .path = "create sub-interfaces", .short_help = "create sub-interfaces <interface> " @@ -921,7 +900,6 @@ VLIB_CLI_COMMAND (create_sub_interfaces_command, static) = { "{<subId> dot1q|dot1ad <vlanId>|any [inner-dot1q <vlanId>|any] [exact-match]}", .function = create_sub_interfaces, }; -/* *INDENT-ON* */ static clib_error_t * set_state (vlib_main_t * vm, @@ -970,13 +948,11 @@ done: '<em>down</em>': * @cliexcmd{set interface state GigabitEthernet2/0/0 down} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_state_command, static) = { .path = "set interface state", .short_help = "set interface state <interface> [up|down|punt|enable]", .function = set_state, }; -/* *INDENT-ON* */ static clib_error_t * set_unnumbered (vlib_main_t * vm, @@ -1026,13 +1002,11 @@ set_unnumbered (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_unnumbered_command, static) = { .path = "set interface unnumbered", .short_help = "set interface unnumbered [<interface> use <interface> | del <interface>]", .function = set_unnumbered, }; -/* *INDENT-ON* */ @@ -1069,13 +1043,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_hw_class_command, static) = { .path = "set interface hw-class", .short_help = "Set interface hardware class", .function = set_hw_class, }; -/* *INDENT-ON* */ static clib_error_t * vnet_interface_cli_init (vlib_main_t * vm) @@ -1119,13 +1091,11 @@ renumber_interface_command_fn (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (renumber_interface_command, static) = { .path = "renumber interface", .short_help = "renumber interface <interface> <new-dev-instance>", .function = renumber_interface_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * promiscuous_cmd (vlib_main_t * vm, @@ -1155,13 +1125,11 @@ promiscuous_cmd (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_promiscuous_cmd, static) = { .path = "set interface promiscuous", .short_help = "set interface promiscuous [on|off] <interface>", .function = promiscuous_cmd, }; -/* *INDENT-ON* */ static clib_error_t * mtu_cmd (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) @@ -1212,13 +1180,11 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_mtu_cmd, static) = { .path = "set interface mtu", .short_help = "set interface mtu [packet|ip4|ip6|mpls] <value> <interface>", .function = mtu_cmd, }; -/* *INDENT-ON* */ static clib_error_t * show_interface_sec_mac_addr_fn (vlib_main_t * vm, unformat_input_t * input, @@ -1242,14 +1208,12 @@ show_interface_sec_mac_addr_fn (vlib_main_t * vm, unformat_input_t * input, sorted_sis = vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces)); vec_set_len (sorted_sis, 0); - /* *INDENT-OFF* */ pool_foreach (si, im->sw_interfaces) { int visible = vnet_swif_is_api_visible (si); if (visible) vec_add1 (sorted_sis, si[0]); } - /* *INDENT-ON* */ /* Sort by name. */ vec_sort_with_function (sorted_sis, sw_interface_name_compare); } @@ -1290,13 +1254,11 @@ show_interface_sec_mac_addr_fn (vlib_main_t * vm, unformat_input_t * input, * @cliexstart{show interface secondary-mac-address} * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_interface_sec_mac_addr, static) = { .path = "show interface secondary-mac-address", .short_help = "show interface secondary-mac-address [<interface>]", .function = show_interface_sec_mac_addr_fn, }; -/* *INDENT-ON* */ static clib_error_t * interface_add_del_mac_address (vlib_main_t * vm, unformat_input_t * input, @@ -1364,13 +1326,11 @@ done: * @cliexcmd{set interface secondary-mac-address GigabitEthernet0/8/0 aa:bb:cc:dd:ee:01 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (interface_add_del_mac_address_cmd, static) = { .path = "set interface secondary-mac-address", .short_help = "set interface secondary-mac-address <interface> <mac-address> [(add|del)]", .function = interface_add_del_mac_address, }; -/* *INDENT-ON* */ static clib_error_t * set_interface_mac_address (vlib_main_t * vm, unformat_input_t * input, @@ -1414,13 +1374,11 @@ done: * @cliexcmd{set interface mac address pg0 aa:bb:cc:dd:ee:04} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_mac_address_cmd, static) = { .path = "set interface mac address", .short_help = "set interface mac address <interface> <mac-address>", .function = set_interface_mac_address, }; -/* *INDENT-ON* */ static clib_error_t * set_tag (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) @@ -1439,13 +1397,11 @@ set_tag (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_tag_command, static) = { .path = "set interface tag", .short_help = "set interface tag <interface> <tag>", .function = set_tag, }; -/* *INDENT-ON* */ static clib_error_t * clear_tag (vlib_main_t * vm, unformat_input_t * input, @@ -1463,13 +1419,11 @@ clear_tag (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_tag_command, static) = { .path = "clear interface tag", .short_help = "clear interface tag <interface>", .function = clear_tag, }; -/* *INDENT-ON* */ static clib_error_t * set_ip_directed_broadcast (vlib_main_t * vm, @@ -1503,13 +1457,11 @@ set_ip_directed_broadcast (vlib_main_t * vm, * subnet broadcast address will be sent L2 broadcast on the interface, * otherwise it is dropped. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ip_directed_broadcast_command, static) = { .path = "set interface ip directed-broadcast", .short_help = "set interface enable <interface> <enable|disable>", .function = set_ip_directed_broadcast, }; -/* *INDENT-ON* */ clib_error_t * set_hw_interface_change_rx_mode (vnet_main_t * vnm, u32 hw_if_index, @@ -1665,13 +1617,11 @@ set_interface_rx_mode (vlib_main_t * vm, unformat_input_t * input, * VirtualEthernet0/0/13 queue 3 (polling) * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_set_if_rx_mode,static) = { .path = "set interface rx-mode", .short_help = "set interface rx-mode <interface> [queue <n>] [polling | interrupt | adaptive]", .function = set_interface_rx_mode, }; -/* *INDENT-ON* */ static clib_error_t * show_interface_rx_placement_fn (vlib_main_t * vm, unformat_input_t * input, @@ -1737,13 +1687,11 @@ show_interface_rx_placement_fn (vlib_main_t * vm, unformat_input_t * input, * VirtualEthernet0/0/13 queue 3 (polling) * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_interface_rx_placement, static) = { .path = "show interface rx-placement", .short_help = "show interface rx-placement", .function = show_interface_rx_placement_fn, }; -/* *INDENT-ON* */ clib_error_t * set_hw_interface_rx_placement (u32 hw_if_index, u32 queue_id, u32 thread_index, u8 is_main) @@ -1868,7 +1816,6 @@ set_interface_rx_placement (vlib_main_t *vm, unformat_input_t *input, * VirtualEthernet0/0/13 queue 3 (polling) * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_set_if_rx_placement,static) = { .path = "set interface rx-placement", .short_help = "set interface rx-placement <interface> [queue <n>] " @@ -1876,7 +1823,6 @@ VLIB_CLI_COMMAND (cmd_set_if_rx_placement,static) = { .function = set_interface_rx_placement, .is_mp_safe = 1, }; -/* *INDENT-ON* */ int set_hw_interface_tx_queue (u32 hw_if_index, u32 queue_id, uword *bitmap) @@ -2061,13 +2007,11 @@ done: * @cliexstart{set interface rss queues VirtualFunctionEthernet18/1/0 list 0,2-5,7} * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (cmd_set_interface_rss_queues,static) = { .path = "set interface rss queues", .short_help = "set interface rss queues <interface> <list <queue-list>>", .function = set_interface_rss_queues_fn, }; -/* *INDENT-ON* */ static u8 * format_vnet_pcap (u8 * s, va_list * args) @@ -2457,7 +2401,6 @@ pcap_trace_command_fn (vlib_main_t * vm, * saved to /tmp/vppTest.pcap... * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (pcap_tx_trace_command, static) = { .path = "pcap trace", @@ -2467,7 +2410,6 @@ VLIB_CLI_COMMAND (pcap_tx_trace_command, static) = { " [preallocate-data][free-data]", .function = pcap_trace_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * set_pcap_filter_function (vlib_main_t *vm, unformat_input_t *input, diff --git a/src/vnet/interface_format.c b/src/vnet/interface_format.c index f74a4ea7c20..0eff8c4597c 100644 --- a/src/vnet/interface_format.c +++ b/src/vnet/interface_format.c @@ -143,11 +143,9 @@ format_vnet_hw_interface_rss_queues (u8 * s, va_list * args) if (bitmap) { - /* *INDENT-OFF* */ clib_bitmap_foreach (i, bitmap) { s = format (s, "%u ", i); } - /* *INDENT-ON* */ } return s; diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c index 28c52687b24..47844dcd68a 100644 --- a/src/vnet/interface_output.c +++ b/src/vnet/interface_output.c @@ -1221,7 +1221,6 @@ VLIB_NODE_FN (interface_punt) (vlib_main_t * vm, return interface_drop_punt (vm, node, frame, VNET_ERROR_DISPOSITION_PUNT); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (interface_drop) = { .name = "error-drop", .vector_size = sizeof (u32), @@ -1232,9 +1231,7 @@ VLIB_REGISTER_NODE (interface_drop) = { [0] = "drop", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (interface_punt) = { .name = "error-punt", .vector_size = sizeof (u32), @@ -1245,7 +1242,6 @@ VLIB_REGISTER_NODE (interface_punt) = { [0] = "punt", }, }; -/* *INDENT-ON* */ VLIB_REGISTER_NODE (vnet_per_buffer_interface_output_node) = { .name = "interface-output", diff --git a/src/vnet/interface_stats.c b/src/vnet/interface_stats.c index 3afde0ea54f..ff1a2af9130 100644 --- a/src/vnet/interface_stats.c +++ b/src/vnet/interface_stats.c @@ -170,7 +170,6 @@ VLIB_NODE_FN (stats_collect_tx_node) (vlib_main_t * vm, return stats_collect_inline (vm, node, frame, VLIB_TX); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (stats_collect_rx_node) = { .vector_size = sizeof (u32), .format_trace = format_stats_collect_trace, @@ -201,7 +200,6 @@ VNET_FEATURE_INIT (stats_collect_tx_node, static) = { .runs_before = VNET_FEATURES ("interface-output-arc-end"), }; -/* *INDENT-ON* */ static clib_error_t * stats_collect_init (vlib_main_t * vm) diff --git a/src/vnet/ip-neighbor/ip4_neighbor.c b/src/vnet/ip-neighbor/ip4_neighbor.c index 8be4b824712..61b9e768fe5 100644 --- a/src/vnet/ip-neighbor/ip4_neighbor.c +++ b/src/vnet/ip-neighbor/ip4_neighbor.c @@ -274,7 +274,6 @@ VLIB_NODE_FN (ip4_glean_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return (ip4_arp_inline (vm, node, frame, 1)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_arp_node) = { .name = "ip4-arp", @@ -300,7 +299,6 @@ VLIB_REGISTER_NODE (ip4_glean_node) = [IP4_ARP_NEXT_DROP] = "ip4-drop", }, }; -/* *INDENT-ON* */ #define foreach_notrace_ip4_arp_error \ _(THROTTLED) \ diff --git a/src/vnet/ip-neighbor/ip6_neighbor.c b/src/vnet/ip-neighbor/ip6_neighbor.c index fd0dbfcd2bb..ca8aed3d4ca 100644 --- a/src/vnet/ip-neighbor/ip6_neighbor.c +++ b/src/vnet/ip-neighbor/ip6_neighbor.c @@ -264,7 +264,6 @@ ip6_glean (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) return (ip6_discover_neighbor_inline (vm, node, frame, 1)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_glean_node) = { .function = ip6_glean, @@ -295,7 +294,6 @@ VLIB_REGISTER_NODE (ip6_discover_neighbor_node) = [IP6_NBR_NEXT_REPLY_TX] = "ip6-rewrite-mcast", }, }; -/* *INDENT-ON* */ /* Template used to generate IP6 neighbor solicitation packets. */ vlib_packet_template_t ip6_neighbor_packet_template; 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 diff --git a/src/vnet/ip-neighbor/ip_neighbor_api.c b/src/vnet/ip-neighbor/ip_neighbor_api.c index a5ed546f114..2297546f111 100644 --- a/src/vnet/ip-neighbor/ip_neighbor_api.c +++ b/src/vnet/ip-neighbor/ip_neighbor_api.c @@ -234,12 +234,10 @@ vl_api_ip_neighbor_add_del_t_handler (vl_api_ip_neighbor_add_del_t * mp, BAD_SW_IF_INDEX_LABEL; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_IP_NEIGHBOR_ADD_DEL_REPLY, ({ rmp->stats_index = htonl (stats_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/vnet/ip-neighbor/ip_neighbor_watch.c b/src/vnet/ip-neighbor/ip_neighbor_watch.c index 72908f4e613..74f450114e1 100644 --- a/src/vnet/ip-neighbor/ip_neighbor_watch.c +++ b/src/vnet/ip-neighbor/ip_neighbor_watch.c @@ -66,13 +66,11 @@ ip_neighbor_event_process (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip_neighbor_event_process_node) = { .function = ip_neighbor_event_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "ip-neighbor-event", }; -/* *INDENT-ON* */ static clib_error_t * @@ -84,7 +82,6 @@ want_ip_neighbor_events_reaper (u32 client_index) i32 pos; /* walk the entire IP neighbour DB and removes the client's registrations */ - /* *INDENT-OFF* */ mhash_foreach(key, v, &ipnw_db.ipnwdb_hash, ({ watchers = (ip_neighbor_watcher_t*) *v; @@ -97,7 +94,6 @@ want_ip_neighbor_events_reaper (u32 client_index) if (vec_len(watchers) == 0) vec_add1 (empty_keys, *key); })); - /* *INDENT-OFF* */ vec_foreach (key, empty_keys) mhash_unset (&ipnw_db.ipnwdb_hash, key, NULL); @@ -236,7 +232,6 @@ ip_neighbor_watchers_show (vlib_main_t * vm, ip_neighbor_key_t *key; uword *v; - /* *INDENT-OFF* */ mhash_foreach(key, v, &ipnw_db.ipnwdb_hash, ({ watchers = (ip_neighbor_watcher_t*) *v; @@ -247,17 +242,14 @@ ip_neighbor_watchers_show (vlib_main_t * vm, vec_foreach (watcher, watchers) vlib_cli_output (vm, " %U", format_ip_neighbor_watcher, watcher); })); - /* *INDENT-ON* */ return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip_neighbor_watchers_cmd_node, static) = { .path = "show ip neighbor-watcher", .function = ip_neighbor_watchers_show, .short_help = "show ip neighbors-watcher", }; -/* *INDENT-ON* */ static clib_error_t * ip_neighbor_watch_init (vlib_main_t * vm) @@ -267,12 +259,10 @@ ip_neighbor_watch_init (vlib_main_t * vm) return (NULL); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ip_neighbor_watch_init) = { .runs_after = VLIB_INITS("ip_neighbor_init"), }; -/* *INDENT-ON* */ /* diff --git a/src/vnet/ip/icmp4.c b/src/vnet/ip/icmp4.c index e9909bf16d9..452817dd9c1 100644 --- a/src/vnet/ip/icmp4.c +++ b/src/vnet/ip/icmp4.c @@ -204,7 +204,6 @@ ip4_icmp_input (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_icmp_input_node) = { .function = ip4_icmp_input, .name = "ip4-icmp-input", @@ -221,7 +220,6 @@ VLIB_REGISTER_NODE (ip4_icmp_input_node) = { [ICMP_INPUT_NEXT_ERROR] = "ip4-punt", }, }; -/* *INDENT-ON* */ typedef enum { @@ -388,7 +386,6 @@ ip4_icmp_error (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_icmp_error_node) = { .function = ip4_icmp_error, .name = "ip4-icmp-error", @@ -405,7 +402,6 @@ VLIB_REGISTER_NODE (ip4_icmp_error_node) = { .format_trace = format_icmp_input_trace, }; -/* *INDENT-ON* */ static uword diff --git a/src/vnet/ip/icmp46_packet.h b/src/vnet/ip/icmp46_packet.h index 0545046fe60..08e73f6cd7d 100644 --- a/src/vnet/ip/icmp46_packet.h +++ b/src/vnet/ip/icmp46_packet.h @@ -187,7 +187,6 @@ typedef enum #undef _ } icmp6_code_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u8 type; @@ -195,7 +194,6 @@ typedef CLIB_PACKED (struct /* IP checksum of icmp header plus data which follows. */ u16 checksum; }) icmp46_header_t; -/* *INDENT-ON* */ /* ip6 neighbor discovery */ #define foreach_icmp6_neighbor_discovery_option \ @@ -238,7 +236,6 @@ typedef enum icmp6_neighbor_discovery_option_type #undef _ } icmp6_neighbor_discovery_option_type_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /* Option type. */ @@ -357,6 +354,5 @@ typedef CLIB_PACKED (struct icmp6_neighbor_discovery_ethernet_link_layer_address_option_t link_layer_option; }) icmp6_neighbor_solicitation_header_t; -/* *INDENT-ON* */ #endif /* included_vnet_icmp46_packet_h */ diff --git a/src/vnet/ip/icmp6.c b/src/vnet/ip/icmp6.c index 184fce6b377..087ee6b4719 100644 --- a/src/vnet/ip/icmp6.c +++ b/src/vnet/ip/icmp6.c @@ -235,7 +235,6 @@ ip6_icmp_input (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_icmp_input_node) = { .function = ip6_icmp_input, .name = "ip6-icmp-input", @@ -252,7 +251,6 @@ VLIB_REGISTER_NODE (ip6_icmp_input_node) = { [ICMP_INPUT_NEXT_PUNT] = "ip6-punt", }, }; -/* *INDENT-ON* */ typedef enum { @@ -426,7 +424,6 @@ ip6_icmp_error (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_icmp_error_node) = { .function = ip6_icmp_error, .name = "ip6-icmp-error", @@ -443,7 +440,6 @@ VLIB_REGISTER_NODE (ip6_icmp_error_node) = { .format_trace = format_icmp6_input_trace, }; -/* *INDENT-ON* */ static uword diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c index 0a602b43ac7..d045c2f37c1 100644 --- a/src/vnet/ip/ip.c +++ b/src/vnet/ip/ip.c @@ -118,7 +118,6 @@ ip_set (ip46_address_t * dst, void *src, u8 is_ip4) sizeof (ip6_address_t)); } -/* *INDENT-OFF* */ static const char *ip_arc_names[N_IP_FEATURE_LOCATIONS][N_AF][N_SAFI] = { [IP_FEATURE_INPUT] = { [AF_IP4] = { @@ -171,7 +170,6 @@ static const char *ip_arc_names[N_IP_FEATURE_LOCATIONS][N_AF][N_SAFI] = { }, }, }; -/* *INDENT-ON* */ void ip_feature_enable_disable (ip_address_family_t af, diff --git a/src/vnet/ip/ip4.h b/src/vnet/ip/ip4.h index e969594ec00..45d07c2e0f6 100644 --- a/src/vnet/ip/ip4.h +++ b/src/vnet/ip/ip4.h @@ -211,7 +211,6 @@ ip4_interface_address_matching_destination (ip4_main_t * im, ip_interface_address_t *ia; ip4_address_t *result = 0; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm, ia, sw_if_index, 1 /* honor unnumbered */, ({ @@ -222,7 +221,6 @@ ip4_interface_address_matching_destination (ip4_main_t * im, break; } })); - /* *INDENT-ON* */ if (result_ia) *result_ia = result ? ia : 0; return result; diff --git a/src/vnet/ip/ip46_address.h b/src/vnet/ip/ip46_address.h index f726178ee63..90f766464f6 100644 --- a/src/vnet/ip/ip46_address.h +++ b/src/vnet/ip/ip46_address.h @@ -34,7 +34,6 @@ typedef enum extern u8 *format_ip46_type (u8 * s, va_list * args); -/* *INDENT-OFF* */ typedef CLIB_PACKED (union ip46_address_t_ { struct { u32 pad[3]; @@ -44,7 +43,6 @@ typedef CLIB_PACKED (union ip46_address_t_ { u8 as_u8[16]; u64 as_u64[2]; }) ip46_address_t; -/* *INDENT-ON* */ format_function_t format_ip46_address; diff --git a/src/vnet/ip/ip46_cli.c b/src/vnet/ip/ip46_cli.c index f58be898d9b..e3da27914bd 100644 --- a/src/vnet/ip/ip46_cli.c +++ b/src/vnet/ip/ip46_cli.c @@ -71,12 +71,10 @@ ip6_address_compare (ip6_address_t * a1, ip6_address_t * a2) return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip_command, static) = { .path = "set interface ip", .short_help = "IP4/IP6 commands", }; -/* *INDENT-ON* */ void ip_del_all_interface_addresses (vlib_main_t * vm, u32 sw_if_index) @@ -90,7 +88,6 @@ ip_del_all_interface_addresses (vlib_main_t * vm, u32 sw_if_index) ip_interface_address_t *ia; int i; - /* *INDENT-OFF* */ foreach_ip_interface_address (&im4->lookup_main, ia, sw_if_index, 0 /* honor unnumbered */, ({ @@ -99,9 +96,7 @@ ip_del_all_interface_addresses (vlib_main_t * vm, u32 sw_if_index) vec_add1 (ip4_addrs, x[0]); vec_add1 (ip4_masks, ia->address_length); })); - /* *INDENT-ON* */ - /* *INDENT-OFF* */ foreach_ip_interface_address (&im6->lookup_main, ia, sw_if_index, 0 /* honor unnumbered */, ({ @@ -110,7 +105,6 @@ ip_del_all_interface_addresses (vlib_main_t * vm, u32 sw_if_index) vec_add1 (ip6_addrs, x[0]); vec_add1 (ip6_masks, ia->address_length); })); - /* *INDENT-ON* */ for (i = 0; i < vec_len (ip4_addrs); i++) ip4_add_del_interface_address (vm, sw_if_index, &ip4_addrs[i], @@ -212,13 +206,11 @@ done: * @cliexcmd{set interface ip address del GigabitEthernet2/0/0 all} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip_address_command, static) = { .path = "set interface ip address", .function = add_del_ip_address, .short_help = "set interface ip address [del] <interface> <ip-addr>/<mask> | [all]", }; -/* *INDENT-ON* */ static clib_error_t * set_reassembly_command_fn (vlib_main_t * vm, @@ -294,13 +286,11 @@ set_reassembly_command_fn (vlib_main_t * vm, return NULL; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_reassembly_command, static) = { .path = "set interface reassembly", .short_help = "set interface reassembly <interface-name> [on|off|ip4|ip6]", .function = set_reassembly_command_fn, }; -/* *INDENT-ON* */ /* Dummy init function to get us linked in. */ static clib_error_t * diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c index b3c9ff7874c..eb2b7ee04bc 100644 --- a/src/vnet/ip/ip4_forward.c +++ b/src/vnet/ip/ip4_forward.c @@ -103,7 +103,6 @@ VLIB_NODE_FN (ip4_lookup_node) (vlib_main_t * vm, vlib_node_runtime_t * node, static u8 *format_ip4_lookup_trace (u8 * s, va_list * args); -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_lookup_node) = { .name = "ip4-lookup", @@ -112,7 +111,6 @@ VLIB_REGISTER_NODE (ip4_lookup_node) = .n_next_nodes = IP_LOOKUP_N_NEXT, .next_nodes = IP4_LOOKUP_NEXT_NODES, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip4_load_balance_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -268,7 +266,6 @@ VLIB_NODE_FN (ip4_load_balance_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_load_balance_node) = { .name = "ip4-load-balance", @@ -276,7 +273,6 @@ VLIB_REGISTER_NODE (ip4_load_balance_node) = .sibling_of = "ip4-lookup", .format_trace = format_ip4_lookup_trace, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT /* get first interface address */ @@ -288,7 +284,6 @@ ip4_interface_first_address (ip4_main_t * im, u32 sw_if_index, ip_interface_address_t *ia = 0; ip4_address_t *result = 0; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm, ia, sw_if_index, 1 /* honor unnumbered */ , @@ -298,7 +293,6 @@ ip4_interface_first_address (ip4_main_t * im, u32 sw_if_index, result = a; break; })); - /* *INDENT-OFF* */ if (result_ia) *result_ia = result ? ia : 0; return result; @@ -671,7 +665,6 @@ ip4_add_del_interface_address_internal (vlib_main_t * vm, * subnets on interfaces. Easy fix - disallow overlapping subnets, like * most routers do. */ - /* *INDENT-OFF* */ if (!is_del) { /* When adding an address check that it does not conflict @@ -732,7 +725,6 @@ ip4_add_del_interface_address_internal (vlib_main_t * vm, } } } - /* *INDENT-ON* */ if_address_index = ip_interface_address_find (lm, addr_fib, address_length); @@ -853,7 +845,6 @@ ip4_directed_broadcast (u32 sw_if_index, u8 enable) * when directed broadcast is enabled, the subnet braodcast route will forward * packets using an adjacency with a broadcast MAC. otherwise it drops */ - /* *INDENT-OFF* */ foreach_ip_interface_address(&im->lookup_main, ia, sw_if_index, 0, ({ @@ -877,7 +868,6 @@ ip4_directed_broadcast (u32 sw_if_index, u8 enable) &pfx, sw_if_index); } })); - /* *INDENT-ON* */ } #endif @@ -897,7 +887,6 @@ ip4_sw_interface_admin_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags) fib_index = vec_elt (im->fib_index_by_sw_if_index, sw_if_index); - /* *INDENT-OFF* */ foreach_ip_interface_address (&im->lookup_main, ia, sw_if_index, 0 /* honor unnumbered */, ({ @@ -911,7 +900,6 @@ ip4_sw_interface_admin_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags) im, fib_index, a, ia->address_length); })); - /* *INDENT-ON* */ return 0; } @@ -919,7 +907,6 @@ ip4_sw_interface_admin_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags) VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (ip4_sw_interface_admin_up_down); /* Built-in ip4 unicast rx feature path definition */ -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (ip4_unicast, static) = { .arc_name = "ip4-unicast", @@ -1058,7 +1045,6 @@ VNET_FEATURE_INIT (ip4_interface_output, static) = .node_name = "interface-output", .runs_before = 0, /* not before any other features */ }; -/* *INDENT-ON* */ static clib_error_t * ip4_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) @@ -1083,13 +1069,11 @@ ip4_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) vlib_main_t *vm = vlib_get_main (); vnet_sw_interface_update_unnumbered (sw_if_index, ~0, 0); - /* *INDENT-OFF* */ foreach_ip_interface_address (lm4, ia, sw_if_index, 0, ({ address = ip_interface_address_get_address (lm4, ia); ip4_add_del_interface_address(vm, sw_if_index, address, ia->address_length, 1); })); - /* *INDENT-ON* */ ip4_mfib_interface_enable_disable (sw_if_index, 0); if (0 != im4->fib_index_by_sw_if_index[sw_if_index]) @@ -1397,13 +1381,11 @@ ip4_tcp_udp_validate_checksum (vlib_main_t * vm, vlib_buffer_t * p0) } #endif -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (ip4_local) = { .arc_name = "ip4-local", .start_nodes = VNET_FEATURES ("ip4-local", "ip4-receive"), .last_in_arc = "ip4-local-end-of-arc", }; -/* *INDENT-ON* */ static inline void ip4_local_l4_csum_validate (vlib_main_t * vm, vlib_buffer_t * p, @@ -1989,14 +1971,12 @@ show_ip_local_command_fn (vlib_main_t * vm, * 47 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip_local, static) = { .path = "show ip local", .function = show_ip_local_command_fn, .short_help = "show ip local", }; -/* *INDENT-ON* */ typedef enum { @@ -2656,7 +2636,6 @@ VLIB_NODE_FN (ip4_mcast_midchain_node) (vlib_main_t * vm, return ip4_rewrite_inline (vm, node, frame, 0, 1, 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_rewrite_node) = { .name = "ip4-rewrite", .vector_size = sizeof (u32), @@ -2701,7 +2680,6 @@ VLIB_REGISTER_NODE (ip4_midchain_node) = { .format_trace = format_ip4_rewrite_trace, .sibling_of = "ip4-rewrite", }; -/* *INDENT-ON */ static clib_error_t * set_ip_flow_hash_command_fn (vlib_main_t * vm, @@ -2833,14 +2811,12 @@ set_ip_flow_hash_command_fn (vlib_main_t * vm, * [0] [@0]: dpo-drop ip6 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ip_flow_hash_command, static) = { .path = "set ip flow-hash", .short_help = "set ip flow-hash table <table-id> [src] [dst] [sport] " "[dport] [proto] [reverse] [gtpv1teid]", .function = set_ip_flow_hash_command_fn, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT int @@ -2957,7 +2933,6 @@ set_ip_classify_command_fn (vlib_main_t * vm, * Example of how to assign a classification table to an interface: * @cliexcmd{set ip classify intfc GigabitEthernet2/0/0 table-index 1} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ip_classify_command, static) = { .path = "set ip classify", @@ -2965,7 +2940,6 @@ VLIB_CLI_COMMAND (set_ip_classify_command, static) = "set ip classify intfc <interface> table-index <classify-idx>", .function = set_ip_classify_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip4_input.c b/src/vnet/ip/ip4_input.c index 436e52ff12c..106d17da3cb 100644 --- a/src/vnet/ip/ip4_input.c +++ b/src/vnet/ip/ip4_input.c @@ -374,7 +374,6 @@ VLIB_NODE_FN (ip4_input_no_checksum_node) (vlib_main_t * vm, return ip4_input_inline (vm, node, frame, /* verify_checksum */ 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_input_node) = { .name = "ip4-input", .vector_size = sizeof (u32), @@ -405,7 +404,6 @@ VLIB_REGISTER_NODE (ip4_input_no_checksum_node) = { .format_buffer = format_ip4_header, .format_trace = format_ip4_input_trace, }; -/* *INDENT-ON* */ static clib_error_t * ip4_init (vlib_main_t * vm) diff --git a/src/vnet/ip/ip4_options.c b/src/vnet/ip/ip4_options.c index 6ef6b6030cc..bbe311ffb20 100644 --- a/src/vnet/ip/ip4_options.c +++ b/src/vnet/ip/ip4_options.c @@ -127,7 +127,6 @@ format_ip4_options_trace (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_options_node) = { .name = "ip4-options", .vector_size = sizeof (u32), @@ -140,7 +139,6 @@ VLIB_REGISTER_NODE (ip4_options_node) = { .format_buffer = format_ip4_header, .format_trace = format_ip4_options_trace, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip4_packet.h b/src/vnet/ip/ip4_packet.h index 2673558e19e..269049194e6 100644 --- a/src/vnet/ip/ip4_packet.h +++ b/src/vnet/ip/ip4_packet.h @@ -129,19 +129,15 @@ typedef union /* For checksumming we'll want to access IP header in word sized chunks. */ /* For 64 bit machines. */ - /* *INDENT-OFF* */ CLIB_PACKED (struct { u64 checksum_data_64[2]; u32 checksum_data_64_32[1]; }); - /* *INDENT-ON* */ /* For 32 bit machines. */ - /* *INDENT-OFF* */ CLIB_PACKED (struct { u32 checksum_data_32[5]; }); - /* *INDENT-ON* */ } ip4_header_t; /* Value of ip_version_and_header_length for packets w/o options. */ @@ -200,9 +196,7 @@ ip4_next_header (ip4_header_t * i) /* Turn off array bounds check due to ip4_header_t option field operations. */ -/* *INDENT-OFF* */ WARN_OFF(array-bounds) -/* *INDENT-ON* */ static_always_inline u16 ip4_header_checksum_inline (ip4_header_t * i, int with_checksum) @@ -305,9 +299,7 @@ ip4_header_checksum_inline (ip4_header_t * i, int with_checksum) return ~((u16) sum); } -/* *INDENT-OFF* */ WARN_ON(array-bounds) -/* *INDENT-ON* */ always_inline u16 ip4_header_checksum (ip4_header_t * i) diff --git a/src/vnet/ip/ip4_punt_drop.c b/src/vnet/ip/ip4_punt_drop.c index f2985a244aa..b8cc3304437 100644 --- a/src/vnet/ip/ip4_punt_drop.c +++ b/src/vnet/ip/ip4_punt_drop.c @@ -18,7 +18,6 @@ #include <vnet/policer/policer.h> #include <vnet/policer/police_inlines.h> -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (ip4_punt) = { .arc_name = "ip4-punt", @@ -30,7 +29,6 @@ VNET_FEATURE_ARC_INIT (ip4_drop) = .arc_name = "ip4-drop", .start_nodes = VNET_FEATURES ("ip4-drop", "ip4-not-enabled"), }; -/* *INDENT-ON* */ extern ip_punt_policer_t ip4_punt_policer_cfg; @@ -89,7 +87,6 @@ VLIB_NODE_FN (ip4_punt_policer_node) (vlib_main_t * vm, ip4_punt_policer_cfg.policer_index)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_punt_policer_node) = { .name = "ip4-punt-policer", .vector_size = sizeof (u32), @@ -109,7 +106,6 @@ VNET_FEATURE_INIT (ip4_punt_policer_node) = { .node_name = "ip4-punt-policer", .runs_before = VNET_FEATURES("ip4-punt-redirect"), }; -/* *INDENT-ON* */ #define foreach_ip4_punt_redirect_error \ @@ -138,7 +134,6 @@ VLIB_NODE_FN (ip4_punt_redirect_node) (vlib_main_t * vm, FIB_PROTOCOL_IP4)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_punt_redirect_node) = { .name = "ip4-punt-redirect", .vector_size = sizeof (u32), @@ -160,7 +155,6 @@ VNET_FEATURE_INIT (ip4_punt_redirect_node, static) = { .node_name = "ip4-punt-redirect", .runs_before = VNET_FEATURES("error-punt"), }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip4_drop_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) @@ -194,7 +188,6 @@ ip4_punt (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) vnet_feat_arc_ip4_punt.feature_arc_index); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_drop_node) = { .name = "ip4-drop", @@ -237,7 +230,6 @@ VNET_FEATURE_INIT (ip4_drop_end_of_arc, static) = { .node_name = "error-drop", .runs_before = 0, /* not before any other features */ }; -/* *INDENT-ON */ #ifndef CLIB_MARCH_VARIANT void @@ -301,14 +293,12 @@ done: * @cliexpar * @cliexcmd{set ip punt policer <INDEX>} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip4_punt_policer_command, static) = { .path = "ip punt policer", .function = ip4_punt_police_cmd, .short_help = "ip punt policer [add|del] <index>", }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT @@ -404,14 +394,12 @@ done: * @cliexpar * @cliexcmd{set ip punt policer} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip4_punt_redirect_command, static) = { .path = "ip punt redirect", .function = ip4_punt_redirect_cmd, .short_help = "ip punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>", }; -/* *INDENT-ON* */ static clib_error_t * ip4_punt_redirect_show_cmd (vlib_main_t * vm, @@ -428,7 +416,6 @@ ip4_punt_redirect_show_cmd (vlib_main_t * vm, * @cliexpar * @cliexcmd{set ip punt redierect} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip4_punt_redirect_command, static) = { .path = "show ip punt redirect", @@ -436,7 +423,6 @@ VLIB_CLI_COMMAND (show_ip4_punt_redirect_command, static) = .short_help = "show ip punt redirect", .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip4_source_and_port_range_check.c b/src/vnet/ip/ip4_source_and_port_range_check.c index 2edbeeddf10..27b2d549ea7 100644 --- a/src/vnet/ip/ip4_source_and_port_range_check.c +++ b/src/vnet/ip/ip4_source_and_port_range_check.c @@ -563,7 +563,6 @@ ip4_source_and_port_range_check_tx (vlib_main_t * vm, if this changes can easily make new function */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_source_port_and_range_check_rx) = { .function = ip4_source_and_port_range_check_rx, .name = "ip4-source-and-port-range-check-rx", @@ -580,9 +579,7 @@ VLIB_REGISTER_NODE (ip4_source_port_and_range_check_rx) = { .format_buffer = format_ip4_header, .format_trace = format_ip4_source_and_port_range_check_trace, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_source_port_and_range_check_tx) = { .function = ip4_source_and_port_range_check_tx, .name = "ip4-source-and-port-range-check-tx", @@ -599,7 +596,6 @@ VLIB_REGISTER_NODE (ip4_source_port_and_range_check_tx) = { .format_buffer = format_ip4_header, .format_trace = format_ip4_source_and_port_range_check_trace, }; -/* *INDENT-ON* */ int set_ip_source_and_port_range_check (vlib_main_t * vm, @@ -797,13 +793,11 @@ set_ip_source_and_port_range_check_fn (vlib_main_t * vm, * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip_source_and_port_range_check_command, static) = { .path = "set interface ip source-and-port-range-check", .function = set_ip_source_and_port_range_check_fn, .short_help = "set interface ip source-and-port-range-check <interface> [tcp-out-vrf <table-id>] [udp-out-vrf <table-id>] [tcp-in-vrf <table-id>] [udp-in-vrf <table-id>] [del]", }; -/* *INDENT-ON* */ static u8 * format_ppr_dpo (u8 * s, va_list * args) @@ -1264,14 +1258,12 @@ ip_source_and_port_range_check_command_fn (vlib_main_t * vm, * Example of how to delete an IPv4 subnet and range of ports from an IPv4 FIB table: * @cliexcmd{set ip source-and-port-range-check vrf 7 172.16.1.0/24 range 23 - 100 del} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip_source_and_port_range_check_command, static) = { .path = "set ip source-and-port-range-check", .function = ip_source_and_port_range_check_command_fn, .short_help = "set ip source-and-port-range-check vrf <table-id> <ip-addr>/<mask> {port nn | range <nn> - <nn>} [del]", }; -/* *INDENT-ON* */ static clib_error_t * @@ -1390,14 +1382,12 @@ show_source_and_port_range_check_fn (vlib_main_t * vm, * 172.16.2.2 port 250 FAIL * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_source_and_port_range_check, static) = { .path = "show ip source-and-port-range-check", .function = show_source_and_port_range_check_fn, .short_help = "show ip source-and-port-range-check vrf <table-id> <ip-addr> [port <n>]", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip4_to_ip6.h b/src/vnet/ip/ip4_to_ip6.h index a6d87f1f962..57c2b6ff78b 100644 --- a/src/vnet/ip/ip4_to_ip6.h +++ b/src/vnet/ip/ip4_to_ip6.h @@ -28,14 +28,12 @@ typedef int (*ip4_to_ip6_set_fn_t) (vlib_buffer_t * b, ip4_header_t * ip4, ip6_header_t * ip6, void *ctx); -/* *INDENT-OFF* */ static u8 icmp_to_icmp6_updater_pointer_table[] = { 0, 1, 4, 4, ~0, ~0, ~0, ~0, 7, 6, ~0, ~0, 8, 8, 8, 8, 24, 24, 24, 24 }; -/* *INDENT-ON* */ #define frag_id_4to6(id) (id) diff --git a/src/vnet/ip/ip6.h b/src/vnet/ip/ip6.h index f33780f1a98..56eec523d5b 100644 --- a/src/vnet/ip/ip6.h +++ b/src/vnet/ip/ip6.h @@ -238,7 +238,6 @@ ip6_interface_address_matching_destination (ip6_main_t * im, ip_interface_address_t *ia; ip6_address_t *result = 0; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm, ia, sw_if_index, 1 /* honor unnumbered */, ({ @@ -249,7 +248,6 @@ ip6_interface_address_matching_destination (ip6_main_t * im, break; } })); - /* *INDENT-ON* */ if (result_ia) *result_ia = result ? ia : 0; return result; diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index 7c952014d0c..1f7fc3f66fa 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -71,7 +71,6 @@ ip6_add_interface_prefix_routes (ip6_main_t * im, ip_lookup_main_t *lm = &im->lookup_main; ip_interface_prefix_t *if_prefix; - /* *INDENT-OFF* */ ip_interface_prefix_key_t key = { .prefix = { .fp_len = address_length, @@ -85,7 +84,6 @@ ip6_add_interface_prefix_routes (ip6_main_t * im, }, .sw_if_index = sw_if_index, }; - /* *INDENT-ON* */ /* If prefix already set on interface, just increment ref count & return */ if_prefix = ip_get_interface_prefix (lm, &key); @@ -178,7 +176,6 @@ ip6_del_interface_prefix_routes (ip6_main_t * im, ip_lookup_main_t *lm = &im->lookup_main; ip_interface_prefix_t *if_prefix; - /* *INDENT-OFF* */ ip_interface_prefix_key_t key = { .prefix = { .fp_len = address_length, @@ -192,7 +189,6 @@ ip6_del_interface_prefix_routes (ip6_main_t * im, }, .sw_if_index = sw_if_index, }; - /* *INDENT-ON* */ if_prefix = ip_get_interface_prefix (lm, &key); if (!if_prefix) @@ -283,7 +279,6 @@ ip6_interface_first_address (ip6_main_t * im, u32 sw_if_index) ip_interface_address_t *ia = 0; ip6_address_t *result = 0; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm, ia, sw_if_index, 1 /* honor unnumbered */, ({ @@ -291,7 +286,6 @@ ip6_interface_first_address (ip6_main_t * im, u32 sw_if_index) result = a; break; })); - /* *INDENT-ON* */ return result; } @@ -359,7 +353,6 @@ ip6_add_del_interface_address (vlib_main_t * vm, vec_elt (im->fib_index_by_sw_if_index, sw_if_index)); vec_add1 (addr_fib, ip6_af); - /* *INDENT-OFF* */ if (!is_del) { /* When adding an address check that it does not conflict @@ -417,7 +410,6 @@ ip6_add_del_interface_address (vlib_main_t * vm, } } } - /* *INDENT-ON* */ if_address_index = ip_interface_address_find (lm, addr_fib, address_length); @@ -537,7 +529,6 @@ ip6_sw_interface_admin_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags) fib_index = vec_elt (im->fib_index_by_sw_if_index, sw_if_index); - /* *INDENT-OFF* */ foreach_ip_interface_address (&im->lookup_main, ia, sw_if_index, 0 /* honor unnumbered */, ({ @@ -550,7 +541,6 @@ ip6_sw_interface_admin_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags) ip6_del_interface_routes (sw_if_index, im, fib_index, a, ia->address_length); })); - /* *INDENT-ON* */ return 0; } @@ -558,7 +548,6 @@ ip6_sw_interface_admin_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags) VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (ip6_sw_interface_admin_up_down); /* Built-in ip6 unicast rx feature path definition */ -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (ip6_unicast, static) = { .arc_name = "ip6-unicast", @@ -683,7 +672,6 @@ VNET_FEATURE_INIT (ip6_interface_output, static) = { .node_name = "interface-output", .runs_before = 0, /* not before any other features */ }; -/* *INDENT-ON* */ static clib_error_t * ip6_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) @@ -709,13 +697,11 @@ ip6_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) vlib_main_t *vm = vlib_get_main (); vnet_sw_interface_update_unnumbered (sw_if_index, ~0, 0); - /* *INDENT-OFF* */ foreach_ip_interface_address (lm6, ia, sw_if_index, 0, ({ address = ip_interface_address_get_address (lm6, ia); ip6_add_del_interface_address(vm, sw_if_index, address, ia->address_length, 1); })); - /* *INDENT-ON* */ ip6_mfib_interface_enable_disable (sw_if_index, 0); if (0 != im6->fib_index_by_sw_if_index[sw_if_index]) @@ -748,7 +734,6 @@ VLIB_NODE_FN (ip6_lookup_node) (vlib_main_t * vm, static u8 *format_ip6_lookup_trace (u8 * s, va_list * args); -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_lookup_node) = { .name = "ip6-lookup", @@ -757,7 +742,6 @@ VLIB_REGISTER_NODE (ip6_lookup_node) = .n_next_nodes = IP6_LOOKUP_N_NEXT, .next_nodes = IP6_LOOKUP_NEXT_NODES, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip6_load_balance_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -935,7 +919,6 @@ VLIB_NODE_FN (ip6_load_balance_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_load_balance_node) = { .name = "ip6-load-balance", @@ -943,7 +926,6 @@ VLIB_REGISTER_NODE (ip6_load_balance_node) = .sibling_of = "ip6-lookup", .format_trace = format_ip6_lookup_trace, }; -/* *INDENT-ON* */ typedef struct { @@ -1234,12 +1216,10 @@ ip6_next_proto_is_tcp_udp (vlib_buffer_t * p0, ip6_header_t * ip0, return 0; } -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (ip6_local) = { .arc_name = "ip6-local", .start_nodes = VNET_FEATURES ("ip6-local", "ip6-receive"), }; -/* *INDENT-ON* */ static_always_inline u8 ip6_tcp_udp_icmp_bad_length (vlib_main_t * vm, vlib_buffer_t * p0) @@ -2243,7 +2223,6 @@ VLIB_NODE_FN (ip6_mcast_midchain_node) (vlib_main_t * vm, return ip6_rewrite_inline (vm, node, frame, 0, 1, 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_midchain_node) = { .name = "ip6-midchain", .vector_size = sizeof (u32), @@ -2290,7 +2269,6 @@ VLIB_REGISTER_NODE (ip6_mcast_midchain_node) = .sibling_of = "ip6-rewrite", }; -/* *INDENT-ON* */ /* * Hop-by-Hop handling @@ -2304,7 +2282,6 @@ _(PROCESSED, "pkts with ip6 hop-by-hop options") \ _(FORMAT, "incorrectly formatted hop-by-hop options") \ _(UNKNOWN_OPTION, "unknown ip6 hop-by-hop options") -/* *INDENT-OFF* */ typedef enum { #define _(sym,str) IP6_HOP_BY_HOP_ERROR_##sym, @@ -2312,7 +2289,6 @@ typedef enum #undef _ IP6_HOP_BY_HOP_N_ERROR, } ip6_hop_by_hop_error_t; -/* *INDENT-ON* */ /* * Primary h-b-h handler trace support @@ -2739,7 +2715,6 @@ VLIB_NODE_FN (ip6_hop_by_hop_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_hop_by_hop_node) = { .name = "ip6-hop-by-hop", @@ -2751,7 +2726,6 @@ VLIB_REGISTER_NODE (ip6_hop_by_hop_node) = .error_strings = ip6_hop_by_hop_error_strings, .n_next_nodes = 0, }; -/* *INDENT-ON* */ static clib_error_t * ip6_hop_by_hop_init (vlib_main_t * vm) @@ -3003,14 +2977,12 @@ set_ip6_flow_hash_command_fn (vlib_main_t * vm, * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ip6_flow_hash_command, static) = { .path = "set ip6 flow-hash", .short_help = "set ip6 flow-hash table <table-id> [src] [dst] [sport] " "[dport] [proto] [reverse] [flowlabel]", .function = set_ip6_flow_hash_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_ip6_local_command_fn (vlib_main_t * vm, @@ -3051,14 +3023,12 @@ show_ip6_local_command_fn (vlib_main_t * vm, * 115 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip6_local, static) = { .path = "show ip6 local", .function = show_ip6_local_command_fn, .short_help = "show ip6 local", }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT int @@ -3170,7 +3140,6 @@ set_ip6_classify_command_fn (vlib_main_t * vm, * Example of how to assign a classification table to an interface: * @cliexcmd{set ip6 classify intfc GigabitEthernet2/0/0 table-index 1} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ip6_classify_command, static) = { .path = "set ip6 classify", @@ -3178,7 +3147,6 @@ VLIB_CLI_COMMAND (set_ip6_classify_command, static) = "set ip6 classify intfc <interface> table-index <classify-idx>", .function = set_ip6_classify_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip6_hop_by_hop.c b/src/vnet/ip/ip6_hop_by_hop.c index e66084c2c4d..412741abcf8 100644 --- a/src/vnet/ip/ip6_hop_by_hop.c +++ b/src/vnet/ip/ip6_hop_by_hop.c @@ -438,8 +438,7 @@ VLIB_NODE_FN (ip6_add_hop_by_hop_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ -VLIB_REGISTER_NODE (ip6_add_hop_by_hop_node) = /* *INDENT-OFF* */ +VLIB_REGISTER_NODE (ip6_add_hop_by_hop_node) = { .name = "ip6-add-hop-by-hop", .vector_size = sizeof (u32), @@ -455,7 +454,6 @@ VLIB_REGISTER_NODE (ip6_add_hop_by_hop_node) = /* *INDENT-OFF* */ #undef _ }, }; -/* *INDENT-ON* */ /* The main h-b-h tracer was already invoked, no need to do much here */ typedef struct @@ -778,7 +776,6 @@ VLIB_NODE_FN (ip6_pop_hop_by_hop_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_pop_hop_by_hop_node) = { .name = "ip6-pop-hop-by-hop", @@ -791,7 +788,6 @@ VLIB_REGISTER_NODE (ip6_pop_hop_by_hop_node) = /* See ip/lookup.h */ .n_next_nodes = 0, }; -/* *INDENT-ON* */ typedef struct { @@ -1006,7 +1002,6 @@ VLIB_NODE_FN (ip6_local_hop_by_hop_node) (vlib_main_t * vm, } #ifndef CLIB_MARCH_VARIANT -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_local_hop_by_hop_node) = { .name = "ip6-local-hop-by-hop", @@ -1025,7 +1020,6 @@ VLIB_REGISTER_NODE (ip6_local_hop_by_hop_node) = [IP6_LOCAL_HOP_BY_HOP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ clib_error_t * show_ip6_hbh_command_fn (vlib_main_t * vm, @@ -1059,13 +1053,11 @@ show_ip6_hbh_command_fn (vlib_main_t * vm, * Display ip6 local hop-by-hop next protocol handler nodes * @cliexcmd{show ip6 hbh} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip6_hbh, static) = { .path = "show ip6 hbh", .short_help = "show ip6 hbh", .function = show_ip6_hbh_command_fn, }; -/* *INDENT-ON* */ #endif /* CLIB_MARCH_VARIANT */ @@ -1105,12 +1097,10 @@ ip6_hop_by_hop_ioam_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ip6_hop_by_hop_ioam_init) = { .runs_after = VLIB_INITS("ip_main_init", "ip6_lookup_init"), }; -/* *INDENT-ON* */ void ip6_local_hop_by_hop_register_protocol (u32 protocol, u32 node_index) @@ -1264,13 +1254,11 @@ clear_ioam_rewrite_command_fn (vlib_main_t * vm, * Example of how to clear iOAM features: * @cliexcmd{clear ioam rewrite} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_clear_ioam_rewrite_cmd, static) = { .path = "clear ioam rewrite", .short_help = "clear ioam rewrite", .function = clear_ioam_rewrite_command_fn, }; -/* *INDENT-ON* */ clib_error_t * ip6_ioam_enable (int has_trace_option, int has_pot_option, @@ -1371,13 +1359,11 @@ ip6_set_ioam_rewrite_command_fn (vlib_main_t * vm, * Example of how to enable trace and pot with ppc set to encap: * @cliexcmd{set ioam rewrite trace pot ppc encap} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_set_ioam_rewrite_cmd, static) = { .path = "set ioam rewrite", .short_help = "set ioam [trace] [pot] [seqno] [analyse]", .function = ip6_set_ioam_rewrite_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * ip6_show_ioam_summary_cmd_fn (vlib_main_t * vm, @@ -1455,13 +1441,11 @@ ip6_show_ioam_summary_cmd_fn (vlib_main_t * vm, * EDGE TO EDGE - PPC OPTION - 1 (Encap) * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_show_ioam_run_cmd, static) = { .path = "show ioam summary", .short_help = "show ioam summary", .function = ip6_show_ioam_summary_cmd_fn, }; -/* *INDENT-ON* */ void vnet_register_ioam_end_of_path_callback (void *cb) diff --git a/src/vnet/ip/ip6_input.c b/src/vnet/ip/ip6_input.c index 8d89890f999..64c9d76ebaa 100644 --- a/src/vnet/ip/ip6_input.c +++ b/src/vnet/ip/ip6_input.c @@ -219,7 +219,6 @@ VLIB_NODE_FN (ip6_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_input_node) = { .name = "ip6-input", .vector_size = sizeof (u32), @@ -238,7 +237,6 @@ VLIB_REGISTER_NODE (ip6_input_node) = { .format_buffer = format_ip6_header, .format_trace = format_ip6_input_trace, }; -/* *INDENT-ON* */ static clib_error_t * ip6_init (vlib_main_t * vm) diff --git a/src/vnet/ip/ip6_link.c b/src/vnet/ip/ip6_link.c index 544a7c33505..c2a7ccacbc1 100644 --- a/src/vnet/ip/ip6_link.c +++ b/src/vnet/ip/ip6_link.c @@ -242,12 +242,10 @@ ip6_link_delegate_flush (ip6_link_t * il) { ip6_link_delegate_t *ild; - /* *INDENT-OFF* */ FOREACH_IP6_LINK_DELEGATE (ild, il, ({ il_delegate_vfts[ild->ild_type].ildv_disable(ild->ild_index); })); - /* *INDENT-ON* */ vec_free (il->il_delegates); il->il_delegates = NULL; @@ -357,14 +355,12 @@ ip6_link_set_local_address (u32 sw_if_index, const ip6_address_t * address) ip6_address_copy (&ilp.ilp_addr, address); ip6_ll_table_entry_update (&ilp, FIB_ROUTE_PATH_LOCAL); - /* *INDENT-OFF* */ FOREACH_IP6_LINK_DELEGATE (ild, il, ({ if (NULL != il_delegate_vfts[ild->ild_type].ildv_ll_change) il_delegate_vfts[ild->ild_type].ildv_ll_change(ild->ild_index, &il->il_ll_addr); })); - /* *INDENT-ON* */ return (0); } @@ -465,7 +461,6 @@ ip6_link_add_del_address (ip6_main_t * im, if (NULL == il) return; - /* *INDENT-OFF* */ FOREACH_IP6_LINK_DELEGATE (ild, il, ({ if (is_delete) @@ -481,7 +476,6 @@ ip6_link_add_del_address (ip6_main_t * im, address, address_length); } })); - /* *INDENT-ON* */ } static clib_error_t * @@ -555,14 +549,12 @@ test_ip6_link_command_fn (vlib_main_t * vm, * Original MAC address: 16:d9:e0:91:79:86 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_link_command, static) = { .path = "test ip6 link", .function = test_ip6_link_command_fn, .short_help = "test ip6 link <mac-address>", }; -/* *INDENT-ON* */ static u8 * ip6_print_addrs (u8 * s, u32 * addrs) @@ -659,13 +651,11 @@ format_ip6_link (u8 * s, va_list * arg) s = format (s, "%U%U\n", format_white_space, 4, format_ip6_address, &il->il_ll_addr); - /* *INDENT-OFF* */ FOREACH_IP6_LINK_DELEGATE(ild, il, ({ s = format (s, "%U", il_delegate_vfts[ild->ild_type].ildv_format, ild->ild_index, 2); })); - /* *INDENT-ON* */ return (s); } @@ -738,14 +728,12 @@ ip6_link_show (vlib_main_t * vm, * show ip6 interface: IPv6 not enabled on interface * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_link_show_command, static) = { .path = "show ip6 interface", .function = ip6_link_show, .short_help = "show ip6 interface <interface>", }; -/* *INDENT-ON* */ static clib_error_t * enable_ip6_interface_cmd (vlib_main_t * vm, @@ -778,14 +766,12 @@ enable_ip6_interface_cmd (vlib_main_t * vm, * Example of how enable IPv6 on a given interface: * @cliexcmd{enable ip6 interface GigabitEthernet2/0/0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (enable_ip6_interface_command, static) = { .path = "enable ip6 interface", .function = enable_ip6_interface_cmd, .short_help = "enable ip6 interface <interface>", }; -/* *INDENT-ON* */ static clib_error_t * disable_ip6_interface_cmd (vlib_main_t * vm, @@ -818,14 +804,12 @@ disable_ip6_interface_cmd (vlib_main_t * vm, * Example of how disable IPv6 on a given interface: * @cliexcmd{disable ip6 interface GigabitEthernet2/0/0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (disable_ip6_interface_command, static) = { .path = "disable ip6 interface", .function = disable_ip6_interface_cmd, .short_help = "disable ip6 interface <interface>", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip6_ll_table.c b/src/vnet/ip/ip6_ll_table.c index 331f3f34dcc..f9172f6c50c 100644 --- a/src/vnet/ip/ip6_ll_table.c +++ b/src/vnet/ip/ip6_ll_table.c @@ -63,7 +63,6 @@ ip6_ll_fib_create (u32 sw_if_index) * leave the default route as a drop, but fix fe::/10 to be a glean * via the interface. */ - /* *INDENT-OFF* */ fib_prefix_t pfx = { .fp_proto = FIB_PROTOCOL_IP6, .fp_len = 10, @@ -89,7 +88,6 @@ ip6_ll_fib_create (u32 sw_if_index) 1, NULL, FIB_ROUTE_PATH_FLAG_NONE); - /* *INDENT-ON* */ } static void @@ -349,13 +347,11 @@ ip6_ll_show_fib (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_show_fib_command, static) = { .path = "show ip6-ll", .short_help = "show ip6-ll [summary] [interface] [<ip6-addr>[/<width>]] [detail]", .function = ip6_ll_show_fib, }; -/* *INDENT-ON* */ static clib_error_t * ip6_ll_sw_interface_add_del (vnet_main_t *vnm, u32 sw_if_index, u32 is_add) diff --git a/src/vnet/ip/ip6_punt_drop.c b/src/vnet/ip/ip6_punt_drop.c index 32a2ab760ff..78ca9521f53 100644 --- a/src/vnet/ip/ip6_punt_drop.c +++ b/src/vnet/ip/ip6_punt_drop.c @@ -18,7 +18,6 @@ #include <vnet/policer/policer.h> #include <vnet/policer/police_inlines.h> -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (ip6_punt) = { .arc_name = "ip6-punt", @@ -30,7 +29,6 @@ VNET_FEATURE_ARC_INIT (ip6_drop) = .arc_name = "ip6-drop", .start_nodes = VNET_FEATURES ("ip6-drop", "ip6-not-enabled"), }; -/* *INDENT-ON* */ extern ip_punt_policer_t ip6_punt_policer_cfg; @@ -77,7 +75,6 @@ VLIB_NODE_FN (ip6_punt_policer_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_punt_policer_node) = { .name = "ip6-punt-policer", @@ -99,7 +96,6 @@ VNET_FEATURE_INIT (ip6_punt_policer_node, static) = { .node_name = "ip6-punt-policer", .runs_before = VNET_FEATURES("ip6-punt-redirect") }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip6_drop_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) @@ -134,7 +130,6 @@ VLIB_NODE_FN (ip6_punt_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vnet_feat_arc_ip6_punt.feature_arc_index); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_drop_node) = { .name = "ip6-drop", @@ -175,7 +170,6 @@ VNET_FEATURE_INIT (ip6_drop_end_of_arc, static) = { .node_name = "error-drop", .runs_before = 0, /* not before any other features */ }; -/* *INDENT-ON */ #ifndef CLIB_MARCH_VARIANT void @@ -239,7 +233,6 @@ done: * @cliexpar * @cliexcmd{set ip punt policer <INDEX>} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_punt_policer_command, static) = { .path = "ip6 punt policer", @@ -247,7 +240,6 @@ VLIB_CLI_COMMAND (ip6_punt_policer_command, static) = .short_help = "ip6 punt policer [add|del] <index>", }; -/* *INDENT-ON* */ #define foreach_ip6_punt_redirect_error \ _(DROP, "ip6 punt redirect drop") @@ -275,7 +267,6 @@ VLIB_NODE_FN (ip6_punt_redirect_node) (vlib_main_t * vm, FIB_PROTOCOL_IP6)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_punt_redirect_node) = { .name = "ip6-punt-redirect", .vector_size = sizeof (u32), @@ -297,7 +288,6 @@ VNET_FEATURE_INIT (ip6_punt_redirect_node, static) = { .node_name = "ip6-punt-redirect", .runs_before = VNET_FEATURES("error-punt") }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT @@ -393,14 +383,12 @@ done: * @cliexpar * @cliexcmd{set ip punt policer <INDEX>} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_punt_redirect_command, static) = { .path = "ip6 punt redirect", .function = ip6_punt_redirect_cmd, .short_help = "ip6 punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>", }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT @@ -421,7 +409,6 @@ ip6_punt_redirect_show_cmd (vlib_main_t * vm, * @cliexpar * @cliexcmd{set ip punt policer <INDEX>} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip6_punt_redirect_command, static) = { .path = "show ip6 punt redirect", @@ -429,7 +416,6 @@ VLIB_CLI_COMMAND (show_ip6_punt_redirect_command, static) = .short_help = "show ip6 punt redirect", .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip6_to_ip4.h b/src/vnet/ip/ip6_to_ip4.h index b1b5bdb2d11..29d5718d4da 100644 --- a/src/vnet/ip/ip6_to_ip4.h +++ b/src/vnet/ip/ip6_to_ip4.h @@ -31,7 +31,6 @@ typedef int (*ip6_to_ip4_tcp_udp_set_fn_t) (vlib_buffer_t * b, ip6_header_t * ip6, ip4_header_t * ip4, void *ctx); -/* *INDENT-OFF* */ static u8 icmp6_to_icmp_updater_pointer_table[] = { 0, 1, ~0, ~0, 2, 2, 9, 8, @@ -44,7 +43,6 @@ static u8 icmp6_to_icmp_updater_pointer_table[] = 24, 24, 24, 24, 24, 24, 24, 24 }; -/* *INDENT-ON* */ #define frag_id_6to4(id) ((id) ^ ((id) >> 16)) diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 2c9589741b7..644b4988abc 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -106,7 +106,6 @@ vl_api_ip_table_dump_t_handler (vl_api_ip_table_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (fib_table, ip4_main.fibs) { send_ip_table_details(am, reg, mp->context, fib_table); @@ -118,7 +117,6 @@ vl_api_ip_table_dump_t_handler (vl_api_ip_table_dump_t * mp) continue; send_ip_table_details(am, reg, mp->context, fib_table); } - /* *INDENT-ON* */ } typedef struct vl_api_ip_fib_dump_walk_ctx_t_ @@ -326,7 +324,6 @@ vl_api_ip_mtable_dump_t_handler (vl_api_ip_mtable_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (mfib_table, ip4_main.mfibs) { send_ip_mtable_details (reg, mp->context, mfib_table); @@ -335,7 +332,6 @@ vl_api_ip_mtable_dump_t_handler (vl_api_ip_mtable_dump_t * mp) { send_ip_mtable_details (reg, mp->context, mfib_table); } - /* *INDENT-ON* */ } typedef struct vl_api_ip_mfib_dump_ctx_t_ @@ -782,12 +778,10 @@ vl_api_ip_route_add_del_t_handler (vl_api_ip_route_add_del_t * mp) rv = ip_route_add_del_t_handler (mp, &stats_index); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_IP_ROUTE_ADD_DEL_REPLY, ({ rmp->stats_index = htonl (stats_index); })) - /* *INDENT-ON* */ } void @@ -839,7 +833,6 @@ vl_api_ip_route_lookup_t_handler (vl_api_ip_route_lookup_t * mp) } } - /* *INDENT-OFF* */ REPLY_MACRO3_ZERO(VL_API_IP_ROUTE_LOOKUP_REPLY, npaths * sizeof (*fp), ({ @@ -859,7 +852,6 @@ vl_api_ip_route_lookup_t_handler (vl_api_ip_route_lookup_t * mp) } } })); - /* *INDENT-ON* */ vec_free (rpaths); } @@ -1049,12 +1041,10 @@ vl_api_ip_mroute_add_del_t_handler (vl_api_ip_mroute_add_del_t * mp) rv = api_mroute_add_del_t_handler (mp, &stats_index); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_IP_MROUTE_ADD_DEL_REPLY, ({ rmp->stats_index = htonl (stats_index); })); - /* *INDENT-ON* */ } static void @@ -1117,7 +1107,6 @@ vl_api_ip_address_dump_t_handler (vl_api_ip_address_dump_t * mp) if (mp->is_ipv6) { - /* *INDENT-OFF* */ /* Do not send subnet details of the IP-interface for * unnumbered interfaces. otherwise listening clients * will be confused that the subnet is applied on more @@ -1131,11 +1120,9 @@ vl_api_ip_address_dump_t_handler (vl_api_ip_address_dump_t * mp) }; send_ip_address_details(am, reg, &pfx, sw_if_index, mp->context); })); - /* *INDENT-ON* */ } else { - /* *INDENT-OFF* */ foreach_ip_interface_address (lm4, ia, sw_if_index, 0, ({ fib_prefix_t pfx = { @@ -1146,7 +1133,6 @@ vl_api_ip_address_dump_t_handler (vl_api_ip_address_dump_t * mp) send_ip_address_details(am, reg, &pfx, sw_if_index, mp->context); })); - /* *INDENT-ON* */ } BAD_SW_IF_INDEX_LABEL; @@ -1203,7 +1189,6 @@ vl_api_ip_unnumbered_dump_t_handler (vl_api_ip_unnumbered_dump_t * mp) } else { - /* *INDENT-OFF* */ pool_foreach (si, im->sw_interfaces) { if ((si->flags & VNET_SW_INTERFACE_FLAG_UNNUMBERED)) @@ -1214,7 +1199,6 @@ vl_api_ip_unnumbered_dump_t_handler (vl_api_ip_unnumbered_dump_t * mp) mp->context); } } - /* *INDENT-ON* */ } BAD_SW_IF_INDEX_LABEL; @@ -1238,12 +1222,10 @@ vl_api_ip_dump_t_handler (vl_api_ip_dump_t * mp) /* Gather interfaces. */ sorted_sis = vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces)); vec_set_len (sorted_sis, 0); - /* *INDENT-OFF* */ pool_foreach (si, im->sw_interfaces) { vec_add1 (sorted_sis, si[0]); } - /* *INDENT-ON* */ vec_foreach (si, sorted_sis) { @@ -1723,7 +1705,6 @@ vl_api_ip_table_flush_t_handler (vl_api_ip_table_flush_t * mp) vnet_sw_interface_t *si; /* Shut down interfaces in this FIB / clean out intfc routes */ - /* *INDENT-OFF* */ pool_foreach (si, im->sw_interfaces) { if (fib_index == fib_table_get_index_for_sw_if_index (fproto, @@ -1734,7 +1715,6 @@ vl_api_ip_table_flush_t_handler (vl_api_ip_table_flush_t * mp) vnet_sw_interface_set_flags (vnm, si->sw_if_index, flags); } } - /* *INDENT-ON* */ fib_table_flush (fib_index, fproto, FIB_SOURCE_API); mfib_table_flush (mfib_table_find (fproto, ntohl (mp->table.table_id)), diff --git a/src/vnet/ip/ip_checksum.c b/src/vnet/ip/ip_checksum.c index 1ac7248ea05..4fbf1fb74fa 100644 --- a/src/vnet/ip/ip_checksum.c +++ b/src/vnet/ip/ip_checksum.c @@ -165,14 +165,12 @@ test_ip_checksum_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_checksum, static) = { .path = "test ip checksum", .short_help = "test ip checksum", .function = test_ip_checksum_fn, }; -/* *INDENT-ON* */ #endif /* CLIB_DEBUG */ diff --git a/src/vnet/ip/ip_container_proxy.c b/src/vnet/ip/ip_container_proxy.c index 18d07ba6082..1618704e804 100644 --- a/src/vnet/ip/ip_container_proxy.c +++ b/src/vnet/ip/ip_container_proxy.c @@ -138,7 +138,6 @@ ip_container_proxy_walk (ip_container_proxy_cb_t cb, void *ctx) }; u32 fib_index; - /* *INDENT-OFF* */ pool_foreach_index (fib_index, ip4_main.fibs) { fib_table_walk (fib_index, FIB_PROTOCOL_IP4, @@ -149,7 +148,6 @@ ip_container_proxy_walk (ip_container_proxy_cb_t cb, void *ctx) fib_table_walk (fib_index, FIB_PROTOCOL_IP6, ip_container_proxy_fib_table_walk, &wctx); } - /* *INDENT-ON* */ } clib_error_t * @@ -216,14 +214,12 @@ ip_container_cmd (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip_container_command_node, static) = { .path = "ip container", .function = ip_container_cmd, .short_help = "ip container <address> <interface>", .is_mp_safe = 1, }; -/* *INDENT-ON* */ clib_error_t * show_ip_container_cmd_fn (vlib_main_t * vm, unformat_input_t * main_input, @@ -275,14 +271,12 @@ show_ip_container_cmd_fn (vlib_main_t * vm, unformat_input_t * main_input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip_container_command, static) = { .path = "show ip container", .function = show_ip_container_cmd_fn, .short_help = "show ip container <address> <interface>", .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip_frag.c b/src/vnet/ip/ip_frag.c index 5e8d3682eaa..934e40a5d18 100644 --- a/src/vnet/ip/ip_frag.c +++ b/src/vnet/ip/ip_frag.c @@ -500,7 +500,6 @@ ip6_frag_do_fragment (vlib_main_t * vm, u32 from_bi, u16 mtu, return IP_FRAG_ERROR_NONE; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_frag_node) = { .function = ip4_frag, .name = IP4_FRAG_NODE_NAME, @@ -519,9 +518,7 @@ VLIB_REGISTER_NODE (ip4_frag_node) = { [IP_FRAG_NEXT_ICMP_ERROR] = "ip4-icmp-error", [IP_FRAG_NEXT_DROP] = "ip4-drop" }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_frag_node) = { .function = ip6_frag, .name = IP6_FRAG_NODE_NAME, @@ -540,7 +537,6 @@ VLIB_REGISTER_NODE (ip6_frag_node) = { [IP_FRAG_NEXT_ICMP_ERROR] = "error-drop", [IP_FRAG_NEXT_DROP] = "ip6-drop" }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip_in_out_acl.c b/src/vnet/ip/ip_in_out_acl.c index 11e3873b008..eb3c94a188a 100644 --- a/src/vnet/ip/ip_in_out_acl.c +++ b/src/vnet/ip/ip_in_out_acl.c @@ -816,7 +816,6 @@ VLIB_NODE_FN (ip4_outacl_node) VLIB_TX, 1 /* is_output */); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_inacl_node) = { .name = "ip4-inacl", .vector_size = sizeof (u32), @@ -855,7 +854,6 @@ VLIB_REGISTER_NODE (ip4_outacl_node) = { [ACL_NEXT_INDEX_DENY] = "ip4-drop", }, }; -/* *INDENT-ON* */ VNET_FEATURE_INIT (ip4_punt_acl_feature) = { .arc_name = "ip4-punt", @@ -891,7 +889,6 @@ VLIB_NODE_FN (ip6_outacl_node) (vlib_main_t * vm, vlib_node_runtime_t * node, VLIB_TX, 1 /* is_output */); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_inacl_node) = { .name = "ip6-inacl", .vector_size = sizeof (u32), @@ -930,7 +927,6 @@ VLIB_REGISTER_NODE (ip6_outacl_node) = { [ACL_NEXT_INDEX_DENY] = "ip6-drop", }, }; -/* *INDENT-ON* */ VNET_FEATURE_INIT (ip6_punt_acl_feature) = { .arc_name = "ip6-punt", diff --git a/src/vnet/ip/ip_init.c b/src/vnet/ip/ip_init.c index 8894a878881..c2490f196ef 100644 --- a/src/vnet/ip/ip_init.c +++ b/src/vnet/ip/ip_init.c @@ -104,7 +104,6 @@ do { \ return error; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ip_main_init) = { .init_order = VLIB_INITS ("vnet_main_init", "ip4_init", "ip6_init", "icmp4_init", "icmp6_init", "ip6_hop_by_hop_init", @@ -112,7 +111,6 @@ VLIB_INIT_FUNCTION (ip_main_init) = { "in_out_acl_init", "policer_classify_init", "flow_classify_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/ip_interface.c b/src/vnet/ip/ip_interface.c index d5ee7fd9b2b..ca1938f651a 100644 --- a/src/vnet/ip/ip_interface.c +++ b/src/vnet/ip/ip_interface.c @@ -145,27 +145,23 @@ ip_interface_has_address (u32 sw_if_index, ip46_address_t * ip, u8 is_ip4) { ip_lookup_main_t *lm4 = &ip4_main.lookup_main; ip4_address_t *ip4; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm4, ia, sw_if_index, 1 /* unnumbered */ , ({ ip4 = ip_interface_address_get_address (lm4, ia); if (ip4_address_compare (ip4, &ip->ip4) == 0) return 1; })); - /* *INDENT-ON* */ } else { ip_lookup_main_t *lm6 = &ip6_main.lookup_main; ip6_address_t *ip6; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm6, ia, sw_if_index, 1 /* unnumbered */ , ({ ip6 = ip_interface_address_get_address (lm6, ia); if (ip6_address_compare (ip6, &ip->ip6) == 0) return 1; })); - /* *INDENT-ON* */ } return 0; } @@ -179,16 +175,13 @@ ip_interface_get_first_ip (u32 sw_if_index, u8 is_ip4) if (is_ip4) { - /* *INDENT-OFF* */ foreach_ip_interface_address (lm4, ia, sw_if_index, 1 /* unnumbered */ , ({ return ip_interface_address_get_address (lm4, ia); })); - /* *INDENT-ON* */ } else { - /* *INDENT-OFF* */ foreach_ip_interface_address (lm6, ia, sw_if_index, 1 /* unnumbered */ , ({ ip6_address_t *rv; @@ -197,7 +190,6 @@ ip_interface_get_first_ip (u32 sw_if_index, u8 is_ip4) if (!ip6_address_is_link_local_unicast (rv)) return rv; })); - /* *INDENT-ON* */ } return 0; @@ -211,7 +203,6 @@ ip_interface_address_mark_one_interface (vnet_main_t *vnm, ip_lookup_main_t *lm6 = &ip6_main.lookup_main; ip_interface_address_t *ia = 0; - /* *INDENT-OFF* */ foreach_ip_interface_address (lm4, ia, si->sw_if_index, 1 /* unnumbered */ , ({ ia->flags |= IP_INTERFACE_ADDRESS_FLAG_STALE; @@ -220,7 +211,6 @@ ip_interface_address_mark_one_interface (vnet_main_t *vnm, ({ ia->flags |= IP_INTERFACE_ADDRESS_FLAG_STALE; })); - /* *INDENT-ON* */ return (WALK_CONTINUE); } @@ -246,7 +236,6 @@ ip_interface_address_sweep_one_interface (vnet_main_t * vnm, u32 *ip4_masks = 0; int i; - /* *INDENT-OFF* */ foreach_ip_interface_address (&im4->lookup_main, ia, si->sw_if_index, 1, ({ if (ia->flags & IP_INTERFACE_ADDRESS_FLAG_STALE) @@ -268,7 +257,6 @@ ip_interface_address_sweep_one_interface (vnet_main_t * vnm, vec_add1 (ip6_masks, ia->address_length); } })); - /* *INDENT-ON* */ for (i = 0; i < vec_len (ip4_addrs); i++) ip4_add_del_interface_address (vm, si->sw_if_index, &ip4_addrs[i], diff --git a/src/vnet/ip/ip_interface.h b/src/vnet/ip/ip_interface.h index f0474c1bf9a..f0034ed0314 100644 --- a/src/vnet/ip/ip_interface.h +++ b/src/vnet/ip/ip_interface.h @@ -56,7 +56,6 @@ ip_get_interface_prefix (ip_lookup_main_t * lm, ip_interface_prefix_key_t * k) return p ? pool_elt_at_index (lm->if_prefix_pool, p[0]) : 0; } -/* *INDENT-OFF* */ #define foreach_ip_interface_address(lm,a,sw_if_index,loop,body) \ do { \ vnet_main_t *_vnm = vnet_get_main(); \ @@ -90,7 +89,6 @@ do { \ body; \ } \ } while (0) -/* *INDENT-ON* */ #endif /* included_ip_interface_h */ diff --git a/src/vnet/ip/ip_types.h b/src/vnet/ip/ip_types.h index e4d89ebd88d..f1b387df194 100644 --- a/src/vnet/ip/ip_types.h +++ b/src/vnet/ip/ip_types.h @@ -75,13 +75,11 @@ typedef enum ip_feature_location_t_ #define N_IP_FEATURE_LOCATIONS (IP_FEATURE_DROP+1) -/* *INDENT-OFF* */ typedef struct ip_address { ip46_address_t ip; ip_address_family_t version; } __clib_packed ip_address_t; -/* *INDENT-ON* */ #define IP_ADDRESS_V4_ALL_0S {.ip.ip4.as_u32 = 0, .version = AF_IP4} #define IP_ADDRESS_V6_ALL_0S {.ip.ip6.as_u64 = {0, 0}, .version = AF_IP6} @@ -112,13 +110,11 @@ extern void ip_address_from_46 (const ip46_address_t * a, extern void ip_address_increment (ip_address_t * ip); extern void ip_address_reset (ip_address_t * ip); -/* *INDENT-OFF* */ typedef struct ip_prefix { ip_address_t addr; u8 len; } __clib_packed ip_prefix_t; -/* *INDENT-ON* */ #define ip_prefix_addr(_a) (_a)->addr #define ip_prefix_version(_a) ip_addr_version(&ip_prefix_addr(_a)) diff --git a/src/vnet/ip/lookup.c b/src/vnet/ip/lookup.c index f86c8b61289..c225c222a38 100644 --- a/src/vnet/ip/lookup.c +++ b/src/vnet/ip/lookup.c @@ -557,33 +557,25 @@ vnet_show_ip6_table_cmd (vlib_main_t *vm, unformat_input_t *main_input, return (vnet_show_ip_table_cmd (vm, main_input, cmd, FIB_PROTOCOL_IP6)); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_ip_command, static) = { .path = "ip", .short_help = "Internet protocol (IP) commands", }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_ip6_command, static) = { .path = "ip6", .short_help = "Internet protocol version 6 (IPv6) commands", }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_show_ip_command, static) = { .path = "show ip", .short_help = "Internet protocol (IP) show commands", }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_show_ip6_command, static) = { .path = "show ip6", .short_help = "Internet protocol version 6 (IPv6) show commands", }; -/* *INDENT-ON* */ /*? * This command is used to add or delete IPv4 or IPv6 routes. All @@ -612,7 +604,6 @@ VLIB_CLI_COMMAND (vlib_cli_show_ip6_command, static) = { * To add a route to a particular FIB table (VRF), use: * @cliexcmd{ip route add 172.16.24.0/24 table 7 via GigabitEthernet2/0/0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip_route_command, static) = { .path = "ip route", .short_help = "ip route [add|del] [count <n>] <dst-ip-addr>/<width> [table " @@ -626,29 +617,24 @@ VLIB_CLI_COMMAND (ip_route_command, static) = { .is_mp_safe = 1, }; -/* *INDENT-ON* */ /*? * This command is used to add or delete IPv4 Tables. All * Tables must be explicitly added before that can be used. Creating a * table will add both unicast and multicast FIBs * ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip4_table_command, static) = { .path = "ip table", .short_help = "ip table [add|del] <table-id>", .function = vnet_ip4_table_cmd, }; -/* *INDENT-ON* */ -/* *INDENT-ON* */ /*? * This command is used to add or delete IPv4 Tables. All * Tables must be explicitly added before that can be used. Creating a * table will add both unicast and multicast FIBs * ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_table_command, static) = { .path = "ip6 table", .short_help = "ip6 table [add|del] <table-id>", @@ -753,14 +739,12 @@ ip6_table_bind_cmd (vlib_main_t * vm, * Example of how to add an interface to an IPv4 FIB table (where 2 is the table-id): * @cliexcmd{set interface ip table GigabitEthernet2/0/0 2} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip_table_command, static) = { .path = "set interface ip table", .function = ip4_table_bind_cmd, .short_help = "set interface ip table <interface> <table-id>", }; -/* *INDENT-ON* */ /*? * Place the indicated interface into the supplied IPv6 FIB table (also known @@ -781,14 +765,12 @@ VLIB_CLI_COMMAND (set_interface_ip_table_command, static) = * Example of how to add an interface to an IPv6 FIB table (where 2 is the table-id): * @cliexcmd{set interface ip6 table GigabitEthernet2/0/0 2} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip6_table_command, static) = { .path = "set interface ip6 table", .function = ip6_table_bind_cmd, .short_help = "set interface ip6 table <interface> <table-id>" }; -/* *INDENT-ON* */ clib_error_t * vnet_ip_mroute_cmd (vlib_main_t * vm, @@ -1025,7 +1007,6 @@ done: * @cliexcmd{ip mroute add 232.1.1.1 Signal} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip_mroute_command, static) = { .path = "ip mroute", @@ -1033,7 +1014,6 @@ VLIB_CLI_COMMAND (ip_mroute_command, static) = .function = vnet_ip_mroute_cmd, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/lookup.h b/src/vnet/ip/lookup.h index 4489df1aed8..8083d974df6 100644 --- a/src/vnet/ip/lookup.h +++ b/src/vnet/ip/lookup.h @@ -168,14 +168,12 @@ always_inline void ip_lookup_set_buffer_fib_index (u32 * fib_index_by_sw_if_index, vlib_buffer_t * b) { - /* *INDENT-OFF* */ vnet_buffer (b)->ip.fib_index = vec_elt (fib_index_by_sw_if_index, vnet_buffer (b)->sw_if_index[VLIB_RX]); vnet_buffer (b)->ip.fib_index = ((vnet_buffer (b)->sw_if_index[VLIB_TX] == (u32) ~ 0) ? vnet_buffer (b)->ip.fib_index : vnet_buffer (b)->sw_if_index[VLIB_TX]); - /* *INDENT-ON* */ } void ip_lookup_init (ip_lookup_main_t * lm, u32 ip_lookup_node_index); diff --git a/src/vnet/ip/punt.c b/src/vnet/ip/punt.c index aedfcad855e..3c46549634a 100644 --- a/src/vnet/ip/punt.c +++ b/src/vnet/ip/punt.c @@ -474,7 +474,6 @@ punt_cli (vlib_main_t * vm, unformat_input_t line_input, *input = &line_input; clib_error_t *error = NULL; bool is_add = true; - /* *INDENT-OFF* */ punt_reg_t pr = { .punt = { .l4 = { @@ -486,7 +485,6 @@ punt_cli (vlib_main_t * vm, .type = PUNT_TYPE_L4, }; u32 port; - /* *INDENT-ON* */ if (!unformat_user (input__, unformat_line_input, input)) return 0; @@ -552,13 +550,11 @@ done: * @cliexcmd{set punt udp del all} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (punt_command, static) = { .path = "set punt", .short_help = "set punt [IPV4|ip6|ipv6] [UDP|tcp] [del] [ALL|<port-num>]", .function = punt_cli, }; -/* *INDENT-ON* */ static clib_error_t * punt_socket_register_cmd (vlib_main_t * vm, @@ -568,7 +564,6 @@ punt_socket_register_cmd (vlib_main_t * vm, unformat_input_t line_input, *input = &line_input; u8 *socket_name = 0; clib_error_t *error = NULL; - /* *INDENT-OFF* */ punt_reg_t pr = { .punt = { .l4 = { @@ -579,7 +574,6 @@ punt_socket_register_cmd (vlib_main_t * vm, }, .type = PUNT_TYPE_L4, }; - /* *INDENT-ON* */ if (!unformat_user (input__, unformat_line_input, input)) return 0; @@ -627,7 +621,6 @@ done: * @cliexcmd{punt socket register socket punt_l4_foo.sock} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (punt_socket_register_command, static) = { .path = "punt socket register", @@ -635,7 +628,6 @@ VLIB_CLI_COMMAND (punt_socket_register_command, static) = .short_help = "punt socket register [IPV4|ipv6] [UDP|tcp] [ALL|<port-num>] socket <socket>", .is_mp_safe = 1, }; -/* *INDENT-ON* */ static clib_error_t * punt_socket_deregister_cmd (vlib_main_t * vm, @@ -644,7 +636,6 @@ punt_socket_deregister_cmd (vlib_main_t * vm, { unformat_input_t line_input, *input = &line_input; clib_error_t *error = NULL; - /* *INDENT-OFF* */ punt_reg_t pr = { .punt = { .l4 = { @@ -655,7 +646,6 @@ punt_socket_deregister_cmd (vlib_main_t * vm, }, .type = PUNT_TYPE_L4, }; - /* *INDENT-ON* */ if (!unformat_user (input__, unformat_line_input, input)) return 0; @@ -696,7 +686,6 @@ done: * @cliexpar * @cliexcmd{punt socket register} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (punt_socket_deregister_command, static) = { .path = "punt socket deregister", @@ -704,7 +693,6 @@ VLIB_CLI_COMMAND (punt_socket_deregister_command, static) = .short_help = "punt socket deregister [IPV4|ipv6] [UDP|tcp] [ALL|<port-num>]", .is_mp_safe = 1, }; -/* *INDENT-ON* */ void punt_client_walk (punt_type_t pt, punt_client_walk_cb_t cb, void *ctx) @@ -717,24 +705,20 @@ punt_client_walk (punt_type_t pt, punt_client_walk_cb_t cb, void *ctx) { u32 pci, key; - /* *INDENT-OFF* */ hash_foreach(key, pci, pm->db.clients_by_l4_port, ({ cb (pool_elt_at_index(pm->punt_client_pool, pci), ctx); })); - /* *INDENT-ON* */ break; } case PUNT_TYPE_IP_PROTO: { u32 pci, key; - /* *INDENT-OFF* */ hash_foreach(key, pci, pm->db.clients_by_ip_proto, ({ cb (pool_elt_at_index(pm->punt_client_pool, pci), ctx); })); - /* *INDENT-ON* */ break; } case PUNT_TYPE_EXCEPTION: @@ -832,7 +816,6 @@ done: * @cliexpar * @cliexcmd{show punt socket ipv4} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_punt_socket_registration_command, static) = { .path = "show punt socket registrations", @@ -840,7 +823,6 @@ VLIB_CLI_COMMAND (show_punt_socket_registration_command, static) = .short_help = "show punt socket registrations [l4|exception]", .is_mp_safe = 1, }; -/* *INDENT-ON* */ clib_error_t * ip_punt_init (vlib_main_t * vm) diff --git a/src/vnet/ip/punt_api.c b/src/vnet/ip/punt_api.c index bcbf939f69d..20297af2e75 100644 --- a/src/vnet/ip/punt_api.c +++ b/src/vnet/ip/punt_api.c @@ -224,12 +224,10 @@ vl_api_punt_socket_register_t_handler (vl_api_punt_socket_register_t * mp) char *p = vnet_punt_get_server_pathname (); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_PUNT_SOCKET_REGISTER_REPLY, ({ memcpy ((char *) rmp->pathname, p, sizeof (rmp->pathname)); })); - /* *INDENT-ON* */ } typedef struct punt_socket_send_ctx_t_ diff --git a/src/vnet/ip/punt_node.c b/src/vnet/ip/punt_node.c index 8a2057be509..6400e49c626 100644 --- a/src/vnet/ip/punt_node.c +++ b/src/vnet/ip/punt_node.c @@ -183,7 +183,6 @@ VLIB_NODE_FN (udp6_punt_node) (vlib_main_t * vm, return udp46_punt_inline (vm, node, from_frame, 0 /* is_ip4 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (udp4_punt_node) = { .name = "ip4-udp-punt", /* Takes a vector of packets. */ @@ -215,7 +214,6 @@ VLIB_REGISTER_NODE (udp6_punt_node) = { #undef _ }, }; -/* *INDENT-ON* */ typedef struct { @@ -460,7 +458,6 @@ exception_punt_socket (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (udp4_punt_socket_node) = { .function = udp4_punt_socket, .name = "ip4-udp-punt-socket", @@ -518,7 +515,6 @@ VLIB_REGISTER_NODE (icmp6_punt_socket_node) = { .error_strings = punt_error_strings, }; -/* *INDENT-ON* */ typedef struct { @@ -649,7 +645,6 @@ punt_socket_rx (vlib_main_t * vm, return total_count; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (punt_socket_rx_node) = { .function = punt_socket_rx, @@ -668,7 +663,6 @@ VLIB_REGISTER_NODE (punt_socket_rx_node) = }, .format_trace = format_punt_trace, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip/reass/ip4_sv_reass.c b/src/vnet/ip/reass/ip4_sv_reass.c index 41077b746a3..7c3c2fff217 100644 --- a/src/vnet/ip/reass/ip4_sv_reass.c +++ b/src/vnet/ip/reass/ip4_sv_reass.c @@ -998,7 +998,6 @@ VLIB_NODE_FN (ip4_sv_reass_node) (vlib_main_t * vm, false /* is_custom */, false /* with_custom_context */); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_sv_reass_node) = { .name = "ip4-sv-reassembly", .vector_size = sizeof (u32), @@ -1014,7 +1013,6 @@ VLIB_REGISTER_NODE (ip4_sv_reass_node) = { }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip4_sv_reass_node_feature) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1025,7 +1023,6 @@ VLIB_NODE_FN (ip4_sv_reass_node_feature) (vlib_main_t * vm, false /* is_custom */, false /* with_custom_context */); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_sv_reass_node_feature) = { .name = "ip4-sv-reassembly-feature", .vector_size = sizeof (u32), @@ -1040,16 +1037,13 @@ VLIB_REGISTER_NODE (ip4_sv_reass_node_feature) = { [IP4_SV_REASSEMBLY_NEXT_HANDOFF] = "ip4-sv-reass-feature-hoff", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip4_sv_reass_feature) = { .arc_name = "ip4-unicast", .node_name = "ip4-sv-reassembly-feature", .runs_before = VNET_FEATURES ("ip4-lookup"), .runs_after = 0, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip4_sv_reass_node_output_feature) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1061,7 +1055,6 @@ VLIB_NODE_FN (ip4_sv_reass_node_output_feature) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_sv_reass_node_output_feature) = { .name = "ip4-sv-reassembly-output-feature", .vector_size = sizeof (u32), @@ -1076,16 +1069,13 @@ VLIB_REGISTER_NODE (ip4_sv_reass_node_output_feature) = { [IP4_SV_REASSEMBLY_NEXT_HANDOFF] = "ip4-sv-reass-feature-hoff", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip4_sv_reass_output_feature) = { .arc_name = "ip4-output", .node_name = "ip4-sv-reassembly-output-feature", .runs_before = 0, .runs_after = 0, }; -/* *INDENT-ON* */ VLIB_REGISTER_NODE (ip4_sv_reass_custom_node) = { .name = "ip4-sv-reassembly-custom-next", @@ -1333,7 +1323,6 @@ ip4_sv_reass_walk_expired (vlib_main_t *vm, clib_spinlock_lock (&rt->lock); vec_reset_length (pool_indexes_to_free); - /* *INDENT-OFF* */ pool_foreach_index (index, rt->pool) { reass = pool_elt_at_index (rt->pool, index); if (now > reass->last_heard + rm->timeout) @@ -1341,15 +1330,12 @@ ip4_sv_reass_walk_expired (vlib_main_t *vm, vec_add1 (pool_indexes_to_free, index); } } - /* *INDENT-ON* */ int *i; - /* *INDENT-OFF* */ vec_foreach (i, pool_indexes_to_free) { ip4_sv_reass_t *reass = pool_elt_at_index (rt->pool, i[0]); ip4_sv_reass_free (vm, rm, rt, reass); } - /* *INDENT-ON* */ clib_spinlock_unlock (&rt->lock); } @@ -1364,7 +1350,6 @@ ip4_sv_reass_walk_expired (vlib_main_t *vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_sv_reass_expire_node) = { .function = ip4_sv_reass_walk_expired, .type = VLIB_NODE_TYPE_PROCESS, @@ -1373,7 +1358,6 @@ VLIB_REGISTER_NODE (ip4_sv_reass_expire_node) = { .n_errors = IP4_N_ERROR, .error_counters = ip4_error_counters, }; -/* *INDENT-ON* */ static u8 * format_ip4_sv_reass_key (u8 * s, va_list * args) @@ -1440,11 +1424,9 @@ show_ip4_reass (vlib_main_t * vm, clib_spinlock_lock (&rt->lock); if (details) { - /* *INDENT-OFF* */ pool_foreach (reass, rt->pool) { vlib_cli_output (vm, "%U", format_ip4_sv_reass, vm, reass); } - /* *INDENT-ON* */ } sum_reass_n += rt->reass_n; clib_spinlock_unlock (&rt->lock); @@ -1468,13 +1450,11 @@ show_ip4_reass (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip4_sv_reass_cmd, static) = { .path = "show ip4-sv-reassembly", .short_help = "show ip4-sv-reassembly [details]", .function = show_ip4_reass, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT vnet_api_error_t @@ -1590,7 +1570,6 @@ VLIB_NODE_FN (ip4_sv_reass_handoff_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_sv_reass_handoff_node) = { .name = "ip4-sv-reassembly-handoff", .vector_size = sizeof (u32), @@ -1604,7 +1583,6 @@ VLIB_REGISTER_NODE (ip4_sv_reass_handoff_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip4_sv_reass_custom_context_handoff_node) (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) @@ -1628,7 +1606,6 @@ VLIB_REGISTER_NODE (ip4_sv_reass_custom_context_handoff_node) = { }, }; -/* *INDENT-OFF* */ VLIB_NODE_FN (ip4_sv_reass_feature_handoff_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1637,10 +1614,8 @@ VLIB_NODE_FN (ip4_sv_reass_feature_handoff_node) (vlib_main_t * vm, return ip4_sv_reass_handoff_node_inline ( vm, node, frame, true /* is_feature */, false /* is_custom_context */); } -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_sv_reass_feature_handoff_node) = { .name = "ip4-sv-reass-feature-hoff", .vector_size = sizeof (u32), @@ -1654,7 +1629,6 @@ VLIB_REGISTER_NODE (ip4_sv_reass_feature_handoff_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT int diff --git a/src/vnet/ip/reass/ip6_sv_reass.c b/src/vnet/ip/reass/ip6_sv_reass.c index 0a17cc13f45..fe2ed05555c 100644 --- a/src/vnet/ip/reass/ip6_sv_reass.c +++ b/src/vnet/ip/reass/ip6_sv_reass.c @@ -804,7 +804,6 @@ VLIB_NODE_FN (ip6_sv_reass_node) (vlib_main_t * vm, false /* custom context */); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_sv_reass_node) = { .name = "ip6-sv-reassembly", .vector_size = sizeof (u32), @@ -820,7 +819,6 @@ VLIB_REGISTER_NODE (ip6_sv_reass_node) = { [IP6_SV_REASSEMBLY_NEXT_HANDOFF] = "ip6-sv-reassembly-handoff", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip6_sv_reass_node_feature) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -831,7 +829,6 @@ VLIB_NODE_FN (ip6_sv_reass_node_feature) (vlib_main_t * vm, false /* custom context */); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_sv_reass_node_feature) = { .name = "ip6-sv-reassembly-feature", .vector_size = sizeof (u32), @@ -847,16 +844,13 @@ VLIB_REGISTER_NODE (ip6_sv_reass_node_feature) = { [IP6_SV_REASSEMBLY_NEXT_HANDOFF] = "ip6-sv-reass-feature-hoff", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip6_sv_reassembly_feature) = { .arc_name = "ip6-unicast", .node_name = "ip6-sv-reassembly-feature", .runs_before = VNET_FEATURES ("ip6-lookup"), .runs_after = 0, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip6_sv_reass_custom_context_node) (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) @@ -1084,7 +1078,6 @@ ip6_sv_reass_walk_expired (vlib_main_t *vm, clib_spinlock_lock (&rt->lock); vec_reset_length (pool_indexes_to_free); - /* *INDENT-OFF* */ pool_foreach_index (index, rt->pool) { reass = pool_elt_at_index (rt->pool, index); if (now > reass->last_heard + rm->timeout) @@ -1092,15 +1085,12 @@ ip6_sv_reass_walk_expired (vlib_main_t *vm, vec_add1 (pool_indexes_to_free, index); } } - /* *INDENT-ON* */ int *i; - /* *INDENT-OFF* */ vec_foreach (i, pool_indexes_to_free) { ip6_sv_reass_t *reass = pool_elt_at_index (rt->pool, i[0]); ip6_sv_reass_free (vm, rm, rt, reass); } - /* *INDENT-ON* */ clib_spinlock_unlock (&rt->lock); } @@ -1115,7 +1105,6 @@ ip6_sv_reass_walk_expired (vlib_main_t *vm, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_sv_reass_expire_node) = { .function = ip6_sv_reass_walk_expired, .format_trace = format_ip6_sv_reass_trace, @@ -1125,7 +1114,6 @@ VLIB_REGISTER_NODE (ip6_sv_reass_expire_node) = { .n_errors = IP6_N_ERROR, .error_counters = ip6_error_counters, }; -/* *INDENT-ON* */ static u8 * format_ip6_sv_reass_key (u8 * s, va_list * args) @@ -1191,11 +1179,9 @@ show_ip6_sv_reass (vlib_main_t * vm, unformat_input_t * input, clib_spinlock_lock (&rt->lock); if (details) { - /* *INDENT-OFF* */ pool_foreach (reass, rt->pool) { vlib_cli_output (vm, "%U", format_ip6_sv_reass, vm, reass); } - /* *INDENT-ON* */ } sum_reass_n += rt->reass_n; clib_spinlock_unlock (&rt->lock); @@ -1221,13 +1207,11 @@ show_ip6_sv_reass (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ip6_sv_reassembly_cmd, static) = { .path = "show ip6-sv-reassembly", .short_help = "show ip6-sv-reassembly [details]", .function = show_ip6_sv_reass, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT vnet_api_error_t @@ -1340,7 +1324,6 @@ VLIB_NODE_FN (ip6_sv_reassembly_handoff_node) (vlib_main_t * vm, vm, node, frame, false /* is_feature */, false /* custom_context */); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_sv_reassembly_handoff_node) = { .name = "ip6-sv-reassembly-handoff", .vector_size = sizeof (u32), @@ -1364,7 +1347,6 @@ VLIB_NODE_FN (ip6_sv_reassembly_feature_handoff_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_sv_reassembly_feature_handoff_node) = { .name = "ip6-sv-reass-feature-hoff", .vector_size = sizeof (u32), @@ -1378,7 +1360,6 @@ VLIB_REGISTER_NODE (ip6_sv_reassembly_feature_handoff_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip6_sv_reassembly_custom_context_handoff_node) (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) diff --git a/src/vnet/ip/vtep.h b/src/vnet/ip/vtep.h index 8b2c7fe723f..97e74429e88 100644 --- a/src/vnet/ip/vtep.h +++ b/src/vnet/ip/vtep.h @@ -29,7 +29,6 @@ * processing and go directly to the tunnel protocol handler node. */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { union { @@ -40,7 +39,6 @@ typedef CLIB_PACKED u64 as_u64; }; }) vtep4_key_t; -/* *INDENT-ON* */ /** * @brief Tunnel endpoint key (IPv6) @@ -51,13 +49,11 @@ typedef CLIB_PACKED * processing and go directly to the tunnel protocol handler node. */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip6_address_t addr; u32 fib_index; }) vtep6_key_t; -/* *INDENT-ON* */ typedef struct { diff --git a/src/vnet/ip6-nd/ip6_mld.c b/src/vnet/ip6-nd/ip6_mld.c index ea70bcc5d19..74428ec93c3 100644 --- a/src/vnet/ip6-nd/ip6_mld.c +++ b/src/vnet/ip6-nd/ip6_mld.c @@ -33,7 +33,6 @@ * adjacency tables and neighbor discovery logic. */ -/* *INDENT-OFF*/ /* multicast listener report packet format for ethernet. */ typedef CLIB_PACKED (struct { @@ -51,7 +50,6 @@ typedef CLIB_PACKED (struct ip6_header_t ip; icmp6_multicast_listener_report_header_t report_hdr; }) icmp6_multicast_listener_report_packet_t; -/* *INDENT-ON*/ typedef struct { @@ -224,12 +222,10 @@ ip6_mld_delegate_disable (index_t imdi) imd = pool_elt_at_index (ip6_mld_pool, imdi); /* clean MLD pools */ - /* *INDENT-OFF* */ pool_flush (m, imd->mldp_group_pool, ({ mhash_unset (&imd->address_to_mldp_index, &m->mcast_address, 0); })); - /* *INDENT-ON* */ pool_free (imd->mldp_group_pool); @@ -326,7 +322,6 @@ ip6_neighbor_send_mldpv2_report (u32 sw_if_index) rh0->icmp.checksum = 0; - /* *INDENT-OFF* */ pool_foreach (m, imd->mldp_group_pool) { rr.type = m->type; @@ -345,7 +340,6 @@ ip6_neighbor_send_mldpv2_report (u32 sw_if_index) payload_length += sizeof( icmp6_multicast_address_record_t); } - /* *INDENT-ON* */ rh0->rsvd = 0; rh0->num_addr_records = clib_host_to_net_u16 (num_addr_records); @@ -388,7 +382,6 @@ ip6_mld_timer_event (vlib_main_t * vm, ip6_mld_t *imd; /* Interface ip6 radv info list */ - /* *INDENT-OFF* */ pool_foreach (imd, ip6_mld_pool) { if (!vnet_sw_interface_is_admin_up (vnm, imd->sw_if_index)) @@ -405,7 +398,6 @@ ip6_mld_timer_event (vlib_main_t * vm, imd->all_routers_mcast = 1; } } - /* *INDENT-ON* */ return 0; } @@ -433,13 +425,11 @@ ip6_mld_event_process (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_mld_event_process_node) = { .function = ip6_mld_event_process, .name = "ip6-mld-process", .type = VLIB_NODE_TYPE_PROCESS, }; -/* *INDENT-ON* */ static u8 * format_ip6_mld (u8 * s, va_list * args) @@ -453,7 +443,6 @@ format_ip6_mld (u8 * s, va_list * args) s = format (s, "%UJoined group address(es):\n", format_white_space, indent); - /* *INDENT-OFF* */ pool_foreach (m, imd->mldp_group_pool) { s = format (s, "%U%U\n", @@ -461,7 +450,6 @@ format_ip6_mld (u8 * s, va_list * args) format_ip6_address, &m->mcast_address); } - /* *INDENT-ON* */ return (s); } @@ -526,12 +514,10 @@ ip6_mld_init (vlib_main_t * vm) return (NULL); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ip6_mld_init) = { .runs_after = VLIB_INITS("icmp6_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip6-nd/ip6_nd.c b/src/vnet/ip6-nd/ip6_nd.c index 513d2bf6e87..763aca290e6 100644 --- a/src/vnet/ip6-nd/ip6_nd.c +++ b/src/vnet/ip6-nd/ip6_nd.c @@ -149,7 +149,6 @@ icmp6_neighbor_solicitation_or_advertisement (vlib_main_t * vm, if (PREDICT_TRUE (error0 == ICMP6_ERROR_NONE && o0 != 0 && !ip6_sadd_unspecified)) { - /* *INDENT-OFF* */ ip_neighbor_learn_t learn = { .sw_if_index = sw_if_index0, .ip = { @@ -159,7 +158,6 @@ icmp6_neighbor_solicitation_or_advertisement (vlib_main_t * vm, h0->target_address), } }; - /* *INDENT-ON* */ memcpy (&learn.mac, o0->ethernet_address, sizeof (learn.mac)); ip_neighbor_learn_dp (&learn); } @@ -343,7 +341,6 @@ icmp6_neighbor_advertisement (vlib_main_t * vm, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_icmp_neighbor_solicitation_node,static) = { .function = icmp6_neighbor_solicitation, @@ -374,7 +371,6 @@ VLIB_REGISTER_NODE (ip6_icmp_neighbor_advertisement_node,static) = [0] = "ip6-punt", }, }; -/* *INDENT-ON* */ static u8 * format_ip6_nd (u8 * s, va_list * args) @@ -427,12 +423,10 @@ ip6_nd_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ip6_nd_init) = { .runs_after = VLIB_INITS("icmp6_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip6-nd/ip6_nd_api.c b/src/vnet/ip6-nd/ip6_nd_api.c index c11c3cb6597..5555d8fea64 100644 --- a/src/vnet/ip6-nd/ip6_nd_api.c +++ b/src/vnet/ip6-nd/ip6_nd_api.c @@ -95,13 +95,11 @@ vl_api_ip6nd_proxy_dump_t_handler (vl_api_ip6nd_proxy_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach_index (fib_index, im6->fibs) { fib_table_walk (fib_index, FIB_PROTOCOL_IP6, api_ip6nd_proxy_fib_table_walk, &ctx); } - /* *INDENT-ON* */ vec_sort_with_function (ctx.indices, fib_entry_cmp_for_sort); @@ -419,7 +417,6 @@ static void static void ip6_ra_handle_report (const ip6_ra_report_t * rap) { - /* *INDENT-OFF* */ vpe_client_registration_t *rp; pool_foreach (rp, vpe_api_main.ip6_ra_events_registrations) @@ -473,7 +470,6 @@ ip6_ra_handle_report (const ip6_ra_report_t * rap) vl_api_send_msg (vl_reg, (u8 *) event); } } - /* *INDENT-ON* */ } static void diff --git a/src/vnet/ip6-nd/ip6_nd_proxy.c b/src/vnet/ip6-nd/ip6_nd_proxy.c index 256b48581bb..f7f07cb59f6 100644 --- a/src/vnet/ip6-nd/ip6_nd_proxy.c +++ b/src/vnet/ip6-nd/ip6_nd_proxy.c @@ -23,7 +23,6 @@ static int ip6_nd_proxy_add_del (u32 sw_if_index, const ip6_address_t * addr, u8 is_del) { - /* *INDENT-OFF* */ u32 fib_index; fib_prefix_t pfx = { .fp_len = 128, @@ -35,7 +34,6 @@ ip6_nd_proxy_add_del (u32 sw_if_index, const ip6_address_t * addr, u8 is_del) ip46_address_t nh = { .ip6 = *addr, }; - /* *INDENT-ON* */ fib_index = ip6_fib_table_get_index_for_sw_if_index (sw_if_index); @@ -117,14 +115,12 @@ set_ip6_nd_proxy_cmd (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ip6_nd_proxy_command, static) = { .path = "set ip6 nd proxy", .short_help = "set ip6 nd proxy <interface> [del] <host-ip>", .function = set_ip6_nd_proxy_cmd, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip6-nd/ip6_ra.c b/src/vnet/ip6-nd/ip6_ra.c index 3781ea3b891..ffc02e813e2 100644 --- a/src/vnet/ip6-nd/ip6_ra.c +++ b/src/vnet/ip6-nd/ip6_ra.c @@ -30,7 +30,6 @@ * The files contains the API and CLI code for managing IPv6 RAs */ -/* *INDENT-OFF* */ /* Router solicitation packet format for ethernet. */ typedef CLIB_PACKED (struct { @@ -51,7 +50,6 @@ typedef CLIB_PACKED (struct icmp6_neighbor_discovery_prefix_information_option_t prefix[0]; }) icmp6_router_advertisement_packet_t; -/* *INDENT-ON* */ #define DEF_MAX_RADV_INTERVAL 200 #define DEF_MIN_RADV_INTERVAL .75 * DEF_MAX_RADV_INTERVAL @@ -305,7 +303,6 @@ icmp6_router_solicitation (vlib_main_t * vm, if (PREDICT_TRUE (error0 == ICMP6_ERROR_NONE && o0 != 0 && !is_unspecified && !is_link_local)) { - /* *INDENT-OFF* */ ip_neighbor_learn_t learn = { .sw_if_index = sw_if_index0, .ip = { @@ -313,7 +310,6 @@ icmp6_router_solicitation (vlib_main_t * vm, .version = AF_IP6, }, }; - /* *INDENT-ON* */ memcpy (&learn.mac, o0->ethernet_address, sizeof (learn.mac)); ip_neighbor_learn_dp (&learn); } @@ -460,7 +456,6 @@ icmp6_router_solicitation (vlib_main_t * vm, /* add advertised prefix options */ ip6_radv_prefix_t *pr_info; - /* *INDENT-OFF* */ pool_foreach (pr_info, radv_info->adv_prefixes_pool) { if(pr_info->enabled && @@ -526,7 +521,6 @@ icmp6_router_solicitation (vlib_main_t * vm, } } - /* *INDENT-ON* */ /* add additional options before here */ @@ -634,7 +628,6 @@ icmp6_router_solicitation (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_icmp_router_solicitation_node,static) = { .function = icmp6_router_solicitation, @@ -651,7 +644,6 @@ VLIB_REGISTER_NODE (ip6_icmp_router_solicitation_node,static) = [ICMP6_ROUTER_SOLICITATION_NEXT_REPLY_TX] = "interface-output", }, }; -/* *INDENT-ON* */ /* validate advertised info for consistancy (see RFC-4861 section 6.2.7) - log any inconsistencies, packet will always be dropped */ static_always_inline uword @@ -944,7 +936,6 @@ icmp6_router_advertisement (vlib_main_t * vm, prefix->prefix.fp_proto = FIB_PROTOCOL_IP6; /* look for matching prefix - if we our advertising it, it better be consistant */ - /* *INDENT-OFF* */ pool_foreach (pr_info, radv_info->adv_prefixes_pool) { @@ -975,7 +966,6 @@ icmp6_router_advertisement (vlib_main_t * vm, } break; } - /* *INDENT-ON* */ break; } default: @@ -1009,7 +999,6 @@ icmp6_router_advertisement (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_icmp_router_advertisement_node,static) = { .function = icmp6_router_advertisement, @@ -1024,7 +1013,6 @@ VLIB_REGISTER_NODE (ip6_icmp_router_advertisement_node,static) = [0] = "ip6-drop", }, }; -/* *INDENT-ON* */ static inline f64 random_f64_from_to (f64 from, f64 to) @@ -1214,14 +1202,12 @@ send_rs_process (vlib_main_t * vm, vlib_node_runtime_t * rt, do { due_time = current_time + 1e9; - /* *INDENT-OFF* */ pool_foreach (radv_info, ip6_ra_pool) { if (check_send_rs (vm, radv_info, current_time, &dt) && (dt < due_time)) due_time = dt; } - /* *INDENT-ON* */ current_time = vlib_time_now (vm); } while (due_time < current_time); @@ -1232,13 +1218,11 @@ send_rs_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_rs_process_node) = { .function = send_rs_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "ip6-rs-process", }; -/* *INDENT-ON* */ void icmp6_send_router_solicitation (vlib_main_t * vm, u32 sw_if_index, u8 stop, @@ -1346,12 +1330,10 @@ ip6_ra_delegate_disable (index_t rai) radv_info = pool_elt_at_index (ip6_ra_pool, rai); /* clean up prefix and MDP pools */ - /* *INDENT-OFF* */ pool_flush(p, radv_info->adv_prefixes_pool, ({ mhash_unset (&radv_info->address_to_prefix_index, &p->prefix, 0); })); - /* *INDENT-ON* */ pool_free (radv_info->adv_prefixes_pool); @@ -1373,12 +1355,10 @@ ip6_ra_update_secondary_radv_info (ip6_address_t * address, u8 prefix_len, ip6_address_mask_from_width (&mask, prefix_len); vec_reset_length (radv_indices); - /* *INDENT-OFF* */ pool_foreach (radv_info, ip6_ra_pool) { vec_add1 (radv_indices, radv_info - ip6_ra_pool); } - /* *INDENT-ON* */ /* * If we have another customer for this prefix, @@ -1393,7 +1373,6 @@ ip6_ra_update_secondary_radv_info (ip6_address_t * address, u8 prefix_len, if (radv_info->sw_if_index == primary_sw_if_index) continue; - /* *INDENT-OFF* */ pool_foreach (this_prefix, radv_info->adv_prefixes_pool) { if (this_prefix->prefix_len == prefix_len @@ -1416,7 +1395,6 @@ ip6_ra_update_secondary_radv_info (ip6_address_t * address, u8 prefix_len, clib_warning ("ip6_neighbor_ra_prefix returned %d", rv); } } - /* *INDENT-ON*/ } } @@ -1437,7 +1415,6 @@ ip6_ra_process_timer_event (vlib_main_t * vm, f64 now = vlib_time_now (vm); /* Interface ip6 radv info list */ - /* *INDENT-OFF* */ pool_foreach (radv_info, ip6_ra_pool) { if( !vnet_sw_interface_is_admin_up (vnm, radv_info->sw_if_index)) @@ -1527,7 +1504,6 @@ ip6_ra_process_timer_event (vlib_main_t * vm, } } } - /* *INDENT-ON* */ if (f) { @@ -1584,14 +1560,12 @@ ip6_ra_event_process (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_ra_process_node) = { .function = ip6_ra_event_process, .name = "ip6-ra-process", .type = VLIB_NODE_TYPE_PROCESS, }; -/* *INDENT-ON* */ static void ip6_ra_signal_report (ip6_ra_report_t * r) @@ -2053,14 +2027,12 @@ format_ip6_ra (u8 * s, va_list * args) indent += 2; - /* *INDENT-OFF* */ pool_foreach (p, radv_info->adv_prefixes_pool) { s = format (s, "%Uprefix %U, length %d\n", format_white_space, indent+2, format_ip6_address, &p->prefix, p->prefix_len); } - /* *INDENT-ON* */ s = format (s, "%UMTU is %d\n", format_white_space, indent, radv_info->adv_link_mtu); @@ -2236,14 +2208,12 @@ format_ip6_ra (u8 * s, va_list * args) * Example of how to delete a prefix: * @cliexcmd{ip6 nd GigabitEthernet2/0/0 no prefix fe80::fe:28ff:fe9c:75b3/64} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_nd_command, static) = { .path = "ip6 nd", .short_help = "ip6 nd <interface> ...", .function = ip6_ra_cmd, }; -/* *INDENT-ON* */ /** * VFT for registering as a delegate to an IP6 link @@ -2269,12 +2239,10 @@ ip6_ra_init (vlib_main_t * vm) return (NULL); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (ip6_ra_init) = { .runs_after = VLIB_INITS("icmp6_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ip6-nd/rd_cp.c b/src/vnet/ip6-nd/rd_cp.c index 1840233c64b..5d419286051 100644 --- a/src/vnet/ip6-nd/rd_cp.c +++ b/src/vnet/ip6-nd/rd_cp.c @@ -260,7 +260,6 @@ ip6_ra_report_handler (const ip6_ra_report_t * r) { router_lifetime_in_sec = r->router_lifetime_in_sec; u8 route_already_present = 0; - /* *INDENT-OFF* */ pool_foreach (default_route, rm->default_route_pool) { if (default_route->sw_if_index != sw_if_index) @@ -274,7 +273,6 @@ ip6_ra_report_handler (const ip6_ra_report_t * r) goto default_route_pool_foreach_out; } } - /* *INDENT-ON* */ default_route_pool_foreach_out: if (!route_already_present) @@ -331,7 +329,6 @@ ip6_ra_report_handler (const ip6_ra_report_t * r) continue; u8 address_already_present = 0; - /* *INDENT-OFF* */ pool_foreach (slaac_address, rm->slaac_address_pool) { if (slaac_address->sw_if_index != sw_if_index) @@ -347,7 +344,6 @@ ip6_ra_report_handler (const ip6_ra_report_t * r) goto slaac_address_pool_foreach_out; } } - /* *INDENT-ON* */ slaac_address_pool_foreach_out: if (address_already_present) @@ -412,7 +408,6 @@ rd_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) * we do not use pool_foreach() to iterate over pool elements here * as we are removing elements inside the loop body */ - /* *INDENT-OFF* */ pool_foreach_index (index, rm->slaac_address_pool) { slaac_address = pool_elt_at_index(rm->slaac_address_pool, index); @@ -440,7 +435,6 @@ rd_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) else remove_default_route (vm, default_route); } - /* *INDENT-ON* */ current_time = vlib_time_now (vm); } while (due_time < current_time); @@ -451,13 +445,11 @@ rd_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (rd_cp_process_node) = { .function = rd_cp_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "rd-cp-process", }; -/* *INDENT-ON* */ static void interrupt_process (void) @@ -512,21 +504,17 @@ rd_cp_set_address_autoconfig (u32 sw_if_index, if (if_config->enabled && !enable) { - /* *INDENT-OFF* */ pool_foreach (slaac_address, rm->slaac_address_pool) { remove_slaac_address (vm, slaac_address); } - /* *INDENT-ON* */ } if (if_config->install_default_routes && !install_default_routes) { - /* *INDENT-OFF* */ pool_foreach (default_route, rm->default_route_pool) { remove_default_route (vm, default_route); } - /* *INDENT-ON* */ } if_config->enabled = enable; @@ -586,13 +574,11 @@ ip6_nd_address_autoconfig (vlib_main_t * vm, * @cliexcmd{ip6 nd address autoconfig GigabitEthernet2/0/0 disable} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ip6_nd_address_autoconfig_command, static) = { .path = "ip6 nd address autoconfig", .short_help = "ip6 nd address autoconfig <interface> [default-route|disable]", .function = ip6_nd_address_autoconfig, }; -/* *INDENT-ON* */ static clib_error_t * rd_cp_init (vlib_main_t * vm) diff --git a/src/vnet/ipfix-export/flow_report.c b/src/vnet/ipfix-export/flow_report.c index de4c72c437f..4eb93520ed8 100644 --- a/src/vnet/ipfix-export/flow_report.c +++ b/src/vnet/ipfix-export/flow_report.c @@ -579,13 +579,11 @@ flow_report_process (vlib_main_t * vm, return 0; /* not so much */ } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (flow_report_process_node) = { .function = flow_report_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "flow-report-process", }; -/* *INDENT-ON* */ int vnet_flow_report_add_del (ipfix_exporter_t *exp, @@ -862,7 +860,6 @@ set_ipfix_exporter_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ipfix_exporter_command, static) = { .path = "set ipfix exporter", .short_help = "set ipfix exporter " @@ -873,7 +870,6 @@ VLIB_CLI_COMMAND (set_ipfix_exporter_command, static) = { "[udp-checksum]", .function = set_ipfix_exporter_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -885,13 +881,11 @@ ipfix_flush_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipfix_flush_command, static) = { .path = "ipfix flush", .short_help = "flush the current ipfix data [for make test]", .function = ipfix_flush_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * flow_report_init (vlib_main_t * vm) diff --git a/src/vnet/ipfix-export/flow_report_classify.c b/src/vnet/ipfix-export/flow_report_classify.c index 7e9fcfc1a07..9e1b99f252d 100644 --- a/src/vnet/ipfix-export/flow_report_classify.c +++ b/src/vnet/ipfix-export/flow_report_classify.c @@ -480,13 +480,11 @@ ipfix_classify_table_add_del_command_fn (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipfix_classify_table_add_del_command, static) = { .path = "ipfix classify table", .short_help = "ipfix classify table add|del <table-index>", .function = ipfix_classify_table_add_del_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * set_ipfix_classify_stream_command_fn (vlib_main_t * vm, @@ -523,14 +521,12 @@ set_ipfix_classify_stream_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_ipfix_classify_stream_command, static) = { .path = "set ipfix classify stream", .short_help = "set ipfix classify stream" "[domain <domain-id>] [src-port <src-port>]", .function = set_ipfix_classify_stream_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * flow_report_classify_init (vlib_main_t * vm) diff --git a/src/vnet/ipip/ipip.c b/src/vnet/ipip/ipip.c index 600f5421125..ec329e21eea 100644 --- a/src/vnet/ipip/ipip.c +++ b/src/vnet/ipip/ipip.c @@ -269,7 +269,6 @@ ipip_tunnel_stack (adj_index_t ai) } else { - /* *INDENT-OFF* */ fib_prefix_t dst = { .fp_len = t->transport == IPIP_TRANSPORT_IP6 ? 128 : 32, .fp_proto = (t->transport == IPIP_TRANSPORT_IP6 ? @@ -277,7 +276,6 @@ ipip_tunnel_stack (adj_index_t ai) FIB_PROTOCOL_IP4), .fp_addr = t->tunnel_dst }; - /* *INDENT-ON* */ adj_midchain_delegate_stack (ai, t->fib_index, &dst); } @@ -512,7 +510,6 @@ ipip_tunnel_desc (u32 sw_if_index, return (0); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS(ipip_device_class) = { .name = "IPIP tunnel device", .format_device_name = format_ipip_tunnel_name, @@ -542,7 +539,6 @@ VNET_HW_INTERFACE_CLASS(mipip_hw_interface_class) = { .update_adjacency = mipip_update_adj, .flags = VNET_HW_INTERFACE_CLASS_FLAG_NBMA, }; -/* *INDENT-ON* */ ipip_tunnel_t * ipip_tunnel_db_find (const ipip_tunnel_key_t * key) diff --git a/src/vnet/ipip/ipip_api.c b/src/vnet/ipip/ipip_api.c index 59ff2827fa1..dcd3ec875df 100644 --- a/src/vnet/ipip/ipip_api.c +++ b/src/vnet/ipip/ipip_api.c @@ -86,12 +86,10 @@ vl_api_ipip_add_tunnel_t_handler (vl_api_ipip_add_tunnel_t * mp) } out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_IPIP_ADD_TUNNEL_REPLY, ({ rmp->sw_if_index = ntohl(sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -132,7 +130,6 @@ send_ipip_tunnel_details (ipip_tunnel_t * t, vl_api_ipip_tunnel_dump_t * mp) ft = fib_table_get (t->fib_index, (is_ipv6 ? FIB_PROTOCOL_IP6 : FIB_PROTOCOL_IP4)); - /* *INDENT-OFF* */ REPLY_MACRO_DETAILS2(VL_API_IPIP_TUNNEL_DETAILS, ({ ip_address_encode (&t->tunnel_src, IP46_TYPE_ANY, &rmp->tunnel.src); @@ -144,7 +141,6 @@ send_ipip_tunnel_details (ipip_tunnel_t * t, vl_api_ipip_tunnel_dump_t * mp) rmp->tunnel.flags = tunnel_encap_decap_flags_encode(t->flags); rmp->tunnel.mode = ipip_tunnel_mode_encode (t->mode); })); - /* *INDENT-ON* */ } static void @@ -158,12 +154,10 @@ vl_api_ipip_tunnel_dump_t_handler (vl_api_ipip_tunnel_dump_t * mp) if (sw_if_index == ~0) { - /* *INDENT-OFF* */ pool_foreach (t, im->tunnels) { send_ipip_tunnel_details(t, mp); } - /* *INDENT-ON* */ } else { @@ -202,12 +196,10 @@ vl_api_ipip_6rd_add_tunnel_t_handler (vl_api_ipip_6rd_add_tunnel_t * mp) &sixrd_tunnel_index); } - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_IPIP_6RD_ADD_TUNNEL_REPLY, ({ rmp->sw_if_index = htonl (sixrd_tunnel_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/vnet/ipip/ipip_cli.c b/src/vnet/ipip/ipip_cli.c index 1a8e8896965..606a1f53f9a 100644 --- a/src/vnet/ipip/ipip_cli.c +++ b/src/vnet/ipip/ipip_cli.c @@ -197,7 +197,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(create_ipip_tunnel_command, static) = { .path = "create ipip tunnel", .short_help = "create ipip tunnel src <addr> dst <addr> [instance <n>] " @@ -209,7 +208,6 @@ VLIB_CLI_COMMAND(delete_ipip_tunnel_command, static) = { .short_help = "delete ipip tunnel sw_if_index <sw_if_index>", .function = delete_ipip_tunnel_command_fn, }; -/* *INDENT-ON* */ static u8 * format_ipip_tunnel (u8 * s, va_list * args) @@ -274,10 +272,8 @@ show_ipip_tunnel_command_fn (vlib_main_t * vm, if (ti == ~0) { - /* *INDENT-OFF* */ pool_foreach (t, gm->tunnels) {vlib_cli_output(vm, "%U", format_ipip_tunnel, t); } - /* *INDENT-ON* */ } else { @@ -290,12 +286,10 @@ show_ipip_tunnel_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(show_ipip_tunnel_command, static) = { .path = "show ipip tunnel", .function = show_ipip_tunnel_command_fn, }; -/* *INDENT-ON* */ static u8 * format_ipip_tunnel_key (u8 * s, va_list * args) @@ -318,12 +312,10 @@ ipip_tunnel_hash_show (vlib_main_t * vm, ipip_tunnel_key_t *key; u32 index; - /* *INDENT-OFF* */ hash_foreach(key, index, im->tunnel_by_key, ({ vlib_cli_output (vm, " %U -> %d", format_ipip_tunnel_key, key, index); })); - /* *INDENT-ON* */ return NULL; } @@ -331,14 +323,12 @@ ipip_tunnel_hash_show (vlib_main_t * vm, /** * show IPSEC tunnel protection hash tables */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipip_tunnel_hash_show_node, static) = { .path = "show ipip tunnel-hash", .function = ipip_tunnel_hash_show, .short_help = "show ipip tunnel-hash", }; -/* *INDENT-ON* */ static clib_error_t * create_sixrd_tunnel_command_fn (vlib_main_t * vm, @@ -464,7 +454,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(create_sixrd_tunnel_command, static) = { .path = "create 6rd tunnel", .short_help = "create 6rd tunnel ip6-pfx <ip6-pfx> ip4-pfx <ip4-pfx> " @@ -477,7 +466,6 @@ VLIB_CLI_COMMAND(delete_sixrd_tunnel_command, static) = { .short_help = "delete 6rd tunnel sw_if_index <sw_if_index>", .function = delete_sixrd_tunnel_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ipip/node.c b/src/vnet/ipip/node.c index b008a21a20f..a289cc885df 100644 --- a/src/vnet/ipip/node.c +++ b/src/vnet/ipip/node.c @@ -260,7 +260,6 @@ static char *ipip_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE(ipip4_input_node) = { .name = "ipip4-input", /* Takes a vector of packets. */ @@ -293,7 +292,6 @@ VLIB_REGISTER_NODE(ipip6_input_node) = { .format_trace = format_ipip_rx_trace, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ipip/sixrd.c b/src/vnet/ipip/sixrd.c index 3fb7b52dca6..6e0bfb042cc 100644 --- a/src/vnet/ipip/sixrd.c +++ b/src/vnet/ipip/sixrd.c @@ -250,7 +250,6 @@ sixrd_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) return /* no error */ 0; } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS(sixrd_hw_interface_class) = { .name = "ip6ip-6rd", .build_rewrite = sixrd_build_rewrite, @@ -265,7 +264,6 @@ VNET_DEVICE_CLASS(sixrd_device_class) = { #endif } ; -/* *INDENT-ON* */ int sixrd_add_tunnel (ip6_address_t * ip6_prefix, u8 ip6_prefix_len, @@ -341,7 +339,6 @@ sixrd_add_tunnel (ip6_address_t * ip6_prefix, u8 ip6_prefix_len, ip6_sw_interface_enable_disable (t->sw_if_index, true); /* Create IPv6 route/adjacency */ - /* *INDENT-OFF* */ fib_prefix_t pfx6 = { .fp_proto = FIB_PROTOCOL_IP6, .fp_len = t->sixrd.ip6_prefix_len, @@ -349,7 +346,6 @@ sixrd_add_tunnel (ip6_address_t * ip6_prefix, u8 ip6_prefix_len, .ip6 = t->sixrd.ip6_prefix, }, }; - /* *INDENT-ON* */ fib_table_lock (ip6_fib_index, FIB_PROTOCOL_IP6, FIB_SOURCE_6RD); fib_table_entry_update_one_path (ip6_fib_index, &pfx6, FIB_SOURCE_6RD, @@ -386,7 +382,6 @@ sixrd_del_tunnel (u32 sw_if_index) return -1; } - /* *INDENT-OFF* */ fib_prefix_t pfx6 = { .fp_proto = FIB_PROTOCOL_IP6, .fp_len = t->sixrd.ip6_prefix_len, @@ -394,7 +389,6 @@ sixrd_del_tunnel (u32 sw_if_index) .ip6 = t->sixrd.ip6_prefix, }, }; - /* *INDENT-ON* */ fib_table_entry_path_remove (t->sixrd.ip6_fib_index, &pfx6, FIB_SOURCE_6RD, diff --git a/src/vnet/ipsec/ah.h b/src/vnet/ipsec/ah.h index ae4cd0b5908..450c9cfd6dc 100644 --- a/src/vnet/ipsec/ah.h +++ b/src/vnet/ipsec/ah.h @@ -30,19 +30,15 @@ typedef struct } ah_header_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip4_header_t ip4; ah_header_t ah; }) ip4_and_ah_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip6_header_t ip6; ah_header_t ah; }) ip6_and_ah_header_t; -/* *INDENT-ON* */ always_inline u32 ah_encrypt_err_to_sa_err (u32 err) diff --git a/src/vnet/ipsec/ah_decrypt.c b/src/vnet/ipsec/ah_decrypt.c index 62a6b706362..918ebf03f67 100644 --- a/src/vnet/ipsec/ah_decrypt.c +++ b/src/vnet/ipsec/ah_decrypt.c @@ -450,7 +450,6 @@ VLIB_NODE_FN (ah4_decrypt_node) (vlib_main_t * vm, return ah_decrypt_inline (vm, node, from_frame, 0 /* is_ip6 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ah4_decrypt_node) = { .name = "ah4-decrypt", .vector_size = sizeof (u32), @@ -468,7 +467,6 @@ VLIB_REGISTER_NODE (ah4_decrypt_node) = { [AH_DECRYPT_NEXT_HANDOFF] = "ah4-decrypt-handoff", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ah6_decrypt_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -477,7 +475,6 @@ VLIB_NODE_FN (ah6_decrypt_node) (vlib_main_t * vm, return ah_decrypt_inline (vm, node, from_frame, 1 /* is_ip6 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ah6_decrypt_node) = { .name = "ah6-decrypt", .vector_size = sizeof (u32), @@ -495,7 +492,6 @@ VLIB_REGISTER_NODE (ah6_decrypt_node) = { [AH_DECRYPT_NEXT_HANDOFF] = "ah6-decrypt-handoff", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT diff --git a/src/vnet/ipsec/ah_encrypt.c b/src/vnet/ipsec/ah_encrypt.c index 03e04880161..960327f071d 100644 --- a/src/vnet/ipsec/ah_encrypt.c +++ b/src/vnet/ipsec/ah_encrypt.c @@ -442,7 +442,6 @@ VLIB_NODE_FN (ah4_encrypt_node) (vlib_main_t * vm, return ah_encrypt_inline (vm, node, from_frame, 0 /* is_ip6 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ah4_encrypt_node) = { .name = "ah4-encrypt", .vector_size = sizeof (u32), @@ -459,7 +458,6 @@ VLIB_REGISTER_NODE (ah4_encrypt_node) = { [AH_ENCRYPT_NEXT_INTERFACE_OUTPUT] = "interface-output", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ah6_encrypt_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -468,7 +466,6 @@ VLIB_NODE_FN (ah6_encrypt_node) (vlib_main_t * vm, return ah_encrypt_inline (vm, node, from_frame, 1 /* is_ip6 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ah6_encrypt_node) = { .name = "ah6-encrypt", .vector_size = sizeof (u32), @@ -485,7 +482,6 @@ VLIB_REGISTER_NODE (ah6_encrypt_node) = { [AH_ENCRYPT_NEXT_INTERFACE_OUTPUT] = "interface-output", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT diff --git a/src/vnet/ipsec/esp.h b/src/vnet/ipsec/esp.h index 72abb9f0dbd..1c3ce776ad2 100644 --- a/src/vnet/ipsec/esp.h +++ b/src/vnet/ipsec/esp.h @@ -37,27 +37,21 @@ typedef struct u8 next_header; } esp_footer_t; -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip4_header_t ip4; esp_header_t esp; }) ip4_and_esp_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip4_header_t ip4; udp_header_t udp; esp_header_t esp; }) ip4_and_udp_and_esp_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { ip6_header_t ip6; esp_header_t esp; }) ip6_and_esp_header_t; -/* *INDENT-ON* */ /** * AES counter mode nonce diff --git a/src/vnet/ipsec/esp_decrypt.c b/src/vnet/ipsec/esp_decrypt.c index fba4549048d..bbd54cfd7b5 100644 --- a/src/vnet/ipsec/esp_decrypt.c +++ b/src/vnet/ipsec/esp_decrypt.c @@ -1548,7 +1548,6 @@ VLIB_NODE_FN (esp6_decrypt_tun_post_node) (vlib_main_t * vm, return esp_decrypt_post_inline (vm, node, from_frame, 1, 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp4_decrypt_node) = { .name = "esp4-decrypt", .vector_size = sizeof (u32), @@ -1672,7 +1671,6 @@ VLIB_REGISTER_NODE (esp6_decrypt_tun_post_node) = { .sibling_of = "esp6-decrypt-tun", }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c index 46f7fe6cd06..58c4582268e 100644 --- a/src/vnet/ipsec/esp_encrypt.c +++ b/src/vnet/ipsec/esp_encrypt.c @@ -1222,7 +1222,6 @@ VLIB_NODE_FN (esp4_encrypt_node) (vlib_main_t * vm, esp_encrypt_async_next.esp4_post_next); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp4_encrypt_node) = { .name = "esp4-encrypt", .vector_size = sizeof (u32), @@ -1241,7 +1240,6 @@ VLIB_REGISTER_NODE (esp4_encrypt_node) = { [ESP_ENCRYPT_NEXT_HANDOFF_MPLS] = "error-drop", [ESP_ENCRYPT_NEXT_INTERFACE_OUTPUT] = "interface-output" }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (esp4_encrypt_post_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1250,7 +1248,6 @@ VLIB_NODE_FN (esp4_encrypt_post_node) (vlib_main_t * vm, return esp_encrypt_post_inline (vm, node, from_frame); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp4_encrypt_post_node) = { .name = "esp4-encrypt-post", .vector_size = sizeof (u32), @@ -1261,7 +1258,6 @@ VLIB_REGISTER_NODE (esp4_encrypt_post_node) = { .n_errors = ESP_ENCRYPT_N_ERROR, .error_counters = esp_encrypt_error_counters, }; -/* *INDENT-ON* */ VLIB_NODE_FN (esp6_encrypt_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1271,7 +1267,6 @@ VLIB_NODE_FN (esp6_encrypt_node) (vlib_main_t * vm, esp_encrypt_async_next.esp6_post_next); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp6_encrypt_node) = { .name = "esp6-encrypt", .vector_size = sizeof (u32), @@ -1282,7 +1277,6 @@ VLIB_REGISTER_NODE (esp6_encrypt_node) = { .n_errors = ESP_ENCRYPT_N_ERROR, .error_counters = esp_encrypt_error_counters, }; -/* *INDENT-ON* */ VLIB_NODE_FN (esp6_encrypt_post_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1291,7 +1285,6 @@ VLIB_NODE_FN (esp6_encrypt_post_node) (vlib_main_t * vm, return esp_encrypt_post_inline (vm, node, from_frame); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp6_encrypt_post_node) = { .name = "esp6-encrypt-post", .vector_size = sizeof (u32), @@ -1302,7 +1295,6 @@ VLIB_REGISTER_NODE (esp6_encrypt_post_node) = { .n_errors = ESP_ENCRYPT_N_ERROR, .error_counters = esp_encrypt_error_counters, }; -/* *INDENT-ON* */ VLIB_NODE_FN (esp4_encrypt_tun_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1312,7 +1304,6 @@ VLIB_NODE_FN (esp4_encrypt_tun_node) (vlib_main_t * vm, esp_encrypt_async_next.esp4_tun_post_next); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp4_encrypt_tun_node) = { .name = "esp4-encrypt-tun", .vector_size = sizeof (u32), @@ -1341,7 +1332,6 @@ VLIB_NODE_FN (esp4_encrypt_tun_post_node) (vlib_main_t * vm, return esp_encrypt_post_inline (vm, node, from_frame); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp4_encrypt_tun_post_node) = { .name = "esp4-encrypt-tun-post", .vector_size = sizeof (u32), @@ -1352,7 +1342,6 @@ VLIB_REGISTER_NODE (esp4_encrypt_tun_post_node) = { .n_errors = ESP_ENCRYPT_N_ERROR, .error_counters = esp_encrypt_error_counters, }; -/* *INDENT-ON* */ VLIB_NODE_FN (esp6_encrypt_tun_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1362,7 +1351,6 @@ VLIB_NODE_FN (esp6_encrypt_tun_node) (vlib_main_t * vm, esp_encrypt_async_next.esp6_tun_post_next); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp6_encrypt_tun_node) = { .name = "esp6-encrypt-tun", .vector_size = sizeof (u32), @@ -1384,7 +1372,6 @@ VLIB_REGISTER_NODE (esp6_encrypt_tun_node) = { }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (esp6_encrypt_tun_post_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1393,7 +1380,6 @@ VLIB_NODE_FN (esp6_encrypt_tun_post_node) (vlib_main_t * vm, return esp_encrypt_post_inline (vm, node, from_frame); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp6_encrypt_tun_post_node) = { .name = "esp6-encrypt-tun-post", .vector_size = sizeof (u32), @@ -1404,7 +1390,6 @@ VLIB_REGISTER_NODE (esp6_encrypt_tun_post_node) = { .n_errors = ESP_ENCRYPT_N_ERROR, .error_counters = esp_encrypt_error_counters, }; -/* *INDENT-ON* */ VLIB_NODE_FN (esp_mpls_encrypt_tun_node) (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame) diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c index 6e7308ddf75..21216b1a614 100644 --- a/src/vnet/ipsec/ipsec_api.c +++ b/src/vnet/ipsec/ipsec_api.c @@ -150,12 +150,10 @@ send_ipsec_tunnel_protect_details (index_t itpi, void *arg) sa = ipsec_sa_get (itp->itp_out_sa); mp->tun.sa_out = htonl (sa->id); mp->tun.n_sa_in = itp->itp_n_sa_in; - /* *INDENT-OFF* */ FOR_EACH_IPSEC_PROTECT_INPUT_SA(itp, sa, ({ mp->tun.sa_in[ii++] = htonl (sa->id); })); - /* *INDENT-ON* */ vl_api_send_msg (ctx->reg, (u8 *) mp); @@ -264,12 +262,10 @@ static void vl_api_ipsec_spd_entry_add_del_t_handler goto out; out: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_IPSEC_SPD_ENTRY_ADD_DEL_REPLY, ({ rmp->stat_index = ntohl(stat_index); })); - /* *INDENT-ON* */ } static void @@ -388,12 +384,10 @@ static void vl_api_ipsec_sad_entry_add_del_t_handler htons (mp->entry.udp_dst_port), 0, &tun, &sa_index); out: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_IPSEC_SAD_ENTRY_ADD_DEL_REPLY, { rmp->stat_index = htonl (sa_index); }); - /* *INDENT-ON* */ } static void vl_api_ipsec_sad_entry_add_del_v2_t_handler @@ -462,12 +456,10 @@ static void vl_api_ipsec_sad_entry_add_del_v2_t_handler htons (mp->entry.udp_dst_port), 0, &tun, &sa_index); out: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_IPSEC_SAD_ENTRY_ADD_DEL_V2_REPLY, { rmp->stat_index = htonl (sa_index); }); - /* *INDENT-ON* */ } static int @@ -839,12 +831,10 @@ vl_api_ipsec_spd_interface_dump_t_handler (vl_api_ipsec_spd_interface_dump_t * if (mp->spd_index_valid) { spd_index = ntohl (mp->spd_index); - /* *INDENT-OFF* */ hash_foreach(k, v, im->spd_index_by_sw_if_index, ({ if (v == spd_index) send_ipsec_spd_interface_details(reg, v, k, mp->context); })); - /* *INDENT-ON* */ } else { @@ -867,12 +857,10 @@ vl_api_ipsec_itf_create_t_handler (vl_api_ipsec_itf_create_t * mp) if (!rv) rv = ipsec_itf_create (ntohl (mp->itf.user_instance), mode, &sw_if_index); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_IPSEC_ITF_CREATE_REPLY, ({ rmp->sw_if_index = htonl (sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -1406,7 +1394,6 @@ vl_api_ipsec_backend_dump_t_handler (vl_api_ipsec_backend_dump_t *mp) ipsec_ah_backend_t *ab; ipsec_esp_backend_t *eb; - /* *INDENT-OFF* */ pool_foreach (ab, im->ah_backends) { vl_api_ipsec_backend_details_t *mp = vl_msg_api_alloc (sizeof (*mp)); clib_memset (mp, 0, sizeof (*mp)); @@ -1431,7 +1418,6 @@ vl_api_ipsec_backend_dump_t_handler (vl_api_ipsec_backend_dump_t *mp) mp->active = mp->index == im->esp_current_backend ? 1 : 0; vl_api_send_msg (rp, (u8 *)mp); } - /* *INDENT-ON* */ } static void diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c index 5aef630a33f..07d9df8f204 100644 --- a/src/vnet/ipsec/ipsec_cli.c +++ b/src/vnet/ipsec/ipsec_cli.c @@ -71,14 +71,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_spd_command, static) = { .path = "set interface ipsec spd", .short_help = "set interface ipsec spd <int> <id>", .function = set_interface_spd_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * ipsec_sa_add_del_command_fn (vlib_main_t * vm, @@ -208,14 +206,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_sa_add_del_command, static) = { .path = "ipsec sa", .short_help = "ipsec sa [add|del]", .function = ipsec_sa_add_del_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * ipsec_sa_bind_cli (vlib_main_t *vm, unformat_input_t *input, @@ -325,14 +321,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_spd_add_del_command, static) = { .path = "ipsec spd", .short_help = "ipsec spd [add|del] <id>", .function = ipsec_spd_add_del_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * @@ -467,27 +461,23 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_policy_add_del_command, static) = { .path = "ipsec policy", .short_help = "ipsec policy [add|del] spd <id> priority <n> ", .function = ipsec_policy_add_del_command_fn, }; -/* *INDENT-ON* */ static void ipsec_sa_show_all (vlib_main_t * vm, ipsec_main_t * im, u8 detail) { u32 sai; - /* *INDENT-OFF* */ pool_foreach_index (sai, ipsec_sa_pool) { vlib_cli_output (vm, "%U", format_ipsec_sa, sai, (detail ? IPSEC_FORMAT_DETAIL : IPSEC_FORMAT_BRIEF)); } - /* *INDENT-ON* */ } static void @@ -495,7 +485,6 @@ ipsec_spd_show_all (vlib_main_t * vm, ipsec_main_t * im) { u32 spdi; - /* *INDENT-OFF* */ pool_foreach_index (spdi, im->spds) { vlib_cli_output(vm, "%U", format_ipsec_spd, spdi); } @@ -508,7 +497,6 @@ ipsec_spd_show_all (vlib_main_t * vm, ipsec_main_t * im) { vlib_cli_output (vm, "%U", format_ipsec_in_spd_flow_cache); } - /* *INDENT-ON* */ } static void @@ -519,14 +507,12 @@ ipsec_spd_bindings_show_all (vlib_main_t * vm, ipsec_main_t * im) vlib_cli_output (vm, "SPD Bindings:"); - /* *INDENT-OFF* */ hash_foreach(sw_if_index, spd_id, im->spd_index_by_sw_if_index, ({ spd = pool_elt_at_index (im->spds, spd_id); vlib_cli_output (vm, " %d -> %U", spd->id, format_vnet_sw_if_index_name, im->vnet_main, sw_if_index); })); - /* *INDENT-ON* */ } static walk_rc_t @@ -560,13 +546,11 @@ show_ipsec_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ipsec_command, static) = { .path = "show ipsec all", .short_help = "show ipsec all", .function = show_ipsec_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_ipsec_sa_command_fn (vlib_main_t * vm, @@ -611,12 +595,10 @@ clear_ipsec_sa_command_fn (vlib_main_t * vm, if (~0 == sai) { - /* *INDENT-OFF* */ pool_foreach_index (sai, ipsec_sa_pool) { ipsec_sa_clear (sai); } - /* *INDENT-ON* */ } else { @@ -629,7 +611,6 @@ clear_ipsec_sa_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ipsec_sa_command, static) = { .path = "show ipsec sa", .short_help = "show ipsec sa [index]", @@ -641,7 +622,6 @@ VLIB_CLI_COMMAND (clear_ipsec_sa_command, static) = { .short_help = "clear ipsec sa [index]", .function = clear_ipsec_sa_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_ipsec_spd_command_fn (vlib_main_t * vm, @@ -671,13 +651,11 @@ show_ipsec_spd_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ipsec_spd_command, static) = { .path = "show ipsec spd", .short_help = "show ipsec spd [index]", .function = show_ipsec_spd_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_ipsec_tunnel_command_fn (vlib_main_t * vm, @@ -689,13 +667,11 @@ show_ipsec_tunnel_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_ipsec_tunnel_command, static) = { .path = "show ipsec tunnel", .short_help = "show ipsec tunnel", .function = show_ipsec_tunnel_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * ipsec_show_backends_command_fn (vlib_main_t * vm, @@ -710,7 +686,6 @@ ipsec_show_backends_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "IPsec AH backends available:"); u8 *s = format (NULL, "%=25s %=25s %=10s\n", "Name", "Index", "Active"); ipsec_ah_backend_t *ab; - /* *INDENT-OFF* */ pool_foreach (ab, im->ah_backends) { s = format (s, "%=25s %=25u %=10s\n", ab->name, ab - im->ah_backends, ab - im->ah_backends == im->ah_current_backend ? "yes" : "no"); @@ -726,13 +701,11 @@ ipsec_show_backends_command_fn (vlib_main_t * vm, s = format (s, " dec6 %s (next %d)\n", n->name, ab->ah6_decrypt_next_index); } } - /* *INDENT-ON* */ vlib_cli_output (vm, "%v", s); vec_set_len (s, 0); vlib_cli_output (vm, "IPsec ESP backends available:"); s = format (s, "%=25s %=25s %=10s\n", "Name", "Index", "Active"); ipsec_esp_backend_t *eb; - /* *INDENT-OFF* */ pool_foreach (eb, im->esp_backends) { s = format (s, "%=25s %=25u %=10s\n", eb->name, eb - im->esp_backends, eb - im->esp_backends == im->esp_current_backend ? "yes" @@ -749,20 +722,17 @@ ipsec_show_backends_command_fn (vlib_main_t * vm, s = format (s, " dec6 %s (next %d)\n", n->name, eb->esp6_decrypt_next_index); } } - /* *INDENT-ON* */ vlib_cli_output (vm, "%v", s); vec_free (s); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_show_backends_command, static) = { .path = "show ipsec backends", .short_help = "show ipsec backends", .function = ipsec_show_backends_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * ipsec_select_backend_command_fn (vlib_main_t * vm, @@ -824,14 +794,12 @@ ipsec_select_backend_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_select_backend_command, static) = { .path = "ipsec select backend", .short_help = "ipsec select backend <ah|esp> <backend index>", .function = ipsec_select_backend_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * clear_ipsec_counters_command_fn (vlib_main_t * vm, @@ -846,13 +814,11 @@ clear_ipsec_counters_command_fn (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_ipsec_counters_command, static) = { .path = "clear ipsec counters", .short_help = "clear ipsec counters", .function = clear_ipsec_counters_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * ipsec_tun_protect_cmd (vlib_main_t * vm, @@ -902,7 +868,6 @@ ipsec_tun_protect_cmd (vlib_main_t * vm, /** * Protect tunnel with IPSEC */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_tun_protect_cmd_node, static) = { .path = "ipsec tunnel protect", @@ -910,7 +875,6 @@ VLIB_CLI_COMMAND (ipsec_tun_protect_cmd_node, static) = .short_help = "ipsec tunnel protect <interface> input-sa <SA> output-sa <SA> [add|del]", // this is not MP safe }; -/* *INDENT-ON* */ static clib_error_t * @@ -925,14 +889,12 @@ ipsec_tun_protect_show (vlib_main_t * vm, /** * show IPSEC tunnel protection */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_tun_protect_show_node, static) = { .path = "show ipsec protect", .function = ipsec_tun_protect_show, .short_help = "show ipsec protect", }; -/* *INDENT-ON* */ static int ipsec_tun_protect4_hash_show_one (clib_bihash_kv_8_16_t * kv, void *arg) @@ -981,14 +943,12 @@ ipsec_tun_protect_hash_show (vlib_main_t * vm, /** * show IPSEC tunnel protection hash tables */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_tun_protect_hash_show_node, static) = { .path = "show ipsec protect-hash", .function = ipsec_tun_protect_hash_show, .short_help = "show ipsec protect-hash", }; -/* *INDENT-ON* */ clib_error_t * ipsec_cli_init (vlib_main_t * vm) @@ -1025,13 +985,11 @@ set_async_mode_command_fn (vlib_main_t * vm, unformat_input_t * input, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_async_mode_command, static) = { .path = "set ipsec async mode", .short_help = "set ipsec async mode on|off", .function = set_async_mode_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ipsec/ipsec_format.c b/src/vnet/ipsec/ipsec_format.c index 12381ceaa13..e421a0d96b4 100644 --- a/src/vnet/ipsec/ipsec_format.c +++ b/src/vnet/ipsec/ipsec_format.c @@ -549,12 +549,10 @@ format_ipsec_tun_protect (u8 * s, va_list * args) IPSEC_FORMAT_BRIEF); s = format (s, "\n input-sa:"); - /* *INDENT-OFF* */ FOR_EACH_IPSEC_PROTECT_INPUT_SAI(itp, sai, ({ s = format (s, "\n %U", format_ipsec_sa, sai, IPSEC_FORMAT_BRIEF); })); - /* *INDENT-ON* */ return (s); } diff --git a/src/vnet/ipsec/ipsec_handoff.c b/src/vnet/ipsec/ipsec_handoff.c index e8daa1a6a23..68a859cf732 100644 --- a/src/vnet/ipsec/ipsec_handoff.c +++ b/src/vnet/ipsec/ipsec_handoff.c @@ -259,7 +259,6 @@ VLIB_NODE_FN (ah6_decrypt_handoff) (vlib_main_t * vm, return ipsec_handoff (vm, node, from_frame, im->ah6_dec_fq_index); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (esp4_encrypt_handoff) = { .name = "esp4-encrypt-handoff", .vector_size = sizeof (u32), @@ -416,7 +415,6 @@ VLIB_REGISTER_NODE (ah6_decrypt_handoff) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ipsec/ipsec_input.c b/src/vnet/ipsec/ipsec_input.c index 8f9eb204c55..6ccc0be2622 100644 --- a/src/vnet/ipsec/ipsec_input.c +++ b/src/vnet/ipsec/ipsec_input.c @@ -751,7 +751,6 @@ VLIB_NODE_FN (ipsec4_input_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ipsec4_input_node) = { .name = "ipsec4-input-feature", .vector_size = sizeof (u32), @@ -766,7 +765,6 @@ VLIB_REGISTER_NODE (ipsec4_input_node) = { #undef _ }, }; -/* *INDENT-ON* */ extern vlib_node_registration_t ipsec6_input_node; @@ -948,7 +946,6 @@ VLIB_NODE_FN (ipsec6_input_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ipsec6_input_node) = { .name = "ipsec6-input-feature", .vector_size = sizeof (u32), @@ -963,7 +960,6 @@ VLIB_REGISTER_NODE (ipsec6_input_node) = { #undef _ }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ipsec/ipsec_itf.c b/src/vnet/ipsec/ipsec_itf.c index f9c1d77a37d..6e66d10660b 100644 --- a/src/vnet/ipsec/ipsec_itf.c +++ b/src/vnet/ipsec/ipsec_itf.c @@ -188,7 +188,6 @@ ipsec_itf_update_adj (vnet_main_t * vnm, u32 sw_if_index, adj_index_t ai) (ai, NULL, NULL, ADJ_FLAG_MIDCHAIN_IP_STACK, ipsec_itf_build_rewrite ()); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (ipsec_itf_device_class) = { .name = "IPSEC Tunnel", .format_device_name = format_ipsec_itf_name, @@ -208,7 +207,6 @@ VNET_HW_INTERFACE_CLASS(ipsec_p2mp_hw_interface_class) = { .update_adjacency = ipsec_itf_update_adj, .flags = VNET_HW_INTERFACE_CLASS_FLAG_NBMA, }; -/* *INDENT-ON* */ /* * Maintain a bitmap of allocated ipsec_itf instance numbers. @@ -431,13 +429,11 @@ ipsec_itf_create_cli (vlib_main_t * vm, * Example of how to create a ipsec interface: * @cliexcmd{ipsec itf create} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_itf_create_command, static) = { .path = "ipsec itf create", .short_help = "ipsec itf create [instance <instance>]", .function = ipsec_itf_create_cli, }; -/* *INDENT-ON* */ static clib_error_t * ipsec_itf_delete_cli (vlib_main_t * vm, @@ -482,13 +478,11 @@ ipsec_itf_delete_cli (vlib_main_t * vm, * Example of how to create a ipsec_itf interface: * @cliexcmd{ipsec itf delete ipsec0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_itf_delete_command, static) = { .path = "ipsec itf delete", .short_help = "ipsec itf delete <interface>", .function = ipsec_itf_delete_cli, }; -/* *INDENT-ON* */ static clib_error_t * ipsec_interface_show (vlib_main_t * vm, @@ -496,12 +490,10 @@ ipsec_interface_show (vlib_main_t * vm, { index_t ii; - /* *INDENT-OFF* */ pool_foreach_index (ii, ipsec_itf_pool) { vlib_cli_output (vm, "%U", format_ipsec_itf, ii); } - /* *INDENT-ON* */ return NULL; } @@ -509,14 +501,12 @@ ipsec_interface_show (vlib_main_t * vm, /** * show IPSEC tunnel protection hash tables */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipsec_interface_show_node, static) = { .path = "show ipsec interface", .function = ipsec_interface_show, .short_help = "show ipsec interface", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/ipsec/ipsec_output.c b/src/vnet/ipsec/ipsec_output.c index 028d9761c07..787da9359e0 100644 --- a/src/vnet/ipsec/ipsec_output.c +++ b/src/vnet/ipsec/ipsec_output.c @@ -335,7 +335,6 @@ VLIB_NODE_FN (ipsec4_output_node) (vlib_main_t * vm, return ipsec_output_inline (vm, node, frame, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ipsec4_output_node) = { .name = "ipsec4-output-feature", .vector_size = sizeof (u32), @@ -352,7 +351,6 @@ VLIB_REGISTER_NODE (ipsec4_output_node) = { #undef _ }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ipsec6_output_node) (vlib_main_t * vm, vlib_node_runtime_t * node, diff --git a/src/vnet/ipsec/ipsec_sa.c b/src/vnet/ipsec/ipsec_sa.c index 1656b9aa0cc..1d5195ec793 100644 --- a/src/vnet/ipsec/ipsec_sa.c +++ b/src/vnet/ipsec/ipsec_sa.c @@ -159,7 +159,6 @@ ipsec_sa_set_integ_alg (ipsec_sa_t * sa, ipsec_integ_alg_t integ_alg) void ipsec_sa_set_async_op_ids (ipsec_sa_t * sa) { - /* *INDENT-OFF* */ if (ipsec_sa_is_set_USE_ESN (sa)) { #define _(n, s, k) \ @@ -190,7 +189,6 @@ ipsec_sa_set_async_op_ids (ipsec_sa_t * sa) sa->crypto_async_dec_op_id = VNET_CRYPTO_OP_##c##_##h##_TAG##d##_DEC; foreach_crypto_link_async_alg #undef _ - /* *INDENT-ON* */ } int @@ -646,13 +644,11 @@ ipsec_sa_walk (ipsec_sa_walk_cb_t cb, void *ctx) { ipsec_sa_t *sa; - /* *INDENT-OFF* */ pool_foreach (sa, ipsec_sa_pool) { if (WALK_CONTINUE != cb (sa, ctx)) break; } - /* *INDENT-ON* */ } /** diff --git a/src/vnet/ipsec/ipsec_spd.c b/src/vnet/ipsec/ipsec_spd.c index 080497ae888..7b9a0aea8ed 100644 --- a/src/vnet/ipsec/ipsec_spd.c +++ b/src/vnet/ipsec/ipsec_spd.c @@ -38,12 +38,10 @@ ipsec_add_del_spd (vlib_main_t * vm, u32 spd_id, int is_add) if (!spd) return VNET_API_ERROR_INVALID_VALUE; - /* *INDENT-OFF* */ hash_foreach (k, v, im->spd_index_by_sw_if_index, ({ if (v == spd_index) ipsec_set_interface_spd(vm, k, spd_id, 0); })); - /* *INDENT-ON* */ hash_unset (im->spd_index_by_spd_id, spd_id); #define _(s,v) vec_free(spd->policies[IPSEC_SPD_POLICY_##s]); foreach_ipsec_spd_policy_type diff --git a/src/vnet/ipsec/ipsec_tun.c b/src/vnet/ipsec/ipsec_tun.c index 82f5a11d26f..ecda291e985 100644 --- a/src/vnet/ipsec/ipsec_tun.c +++ b/src/vnet/ipsec/ipsec_tun.c @@ -236,7 +236,6 @@ ipsec_tun_protect_rx_db_add (ipsec_main_t * im, if (ip46_address_is_zero (&itp->itp_crypto.dst)) return; - /* *INDENT-OFF* */ FOR_EACH_IPSEC_PROTECT_INPUT_SAI(itp, sai, ({ sa = ipsec_sa_get (sai); @@ -291,7 +290,6 @@ ipsec_tun_protect_rx_db_add (ipsec_main_t * im, ipsec_tun_register_nodes (AF_IP6); } })) - /* *INDENT-ON* */ } static adj_walk_rc_t @@ -371,7 +369,6 @@ ipsec_tun_protect_rx_db_remove (ipsec_main_t * im, { const ipsec_sa_t *sa; - /* *INDENT-OFF* */ FOR_EACH_IPSEC_PROTECT_INPUT_SA(itp, sa, ({ if (ip46_address_is_ip4 (&itp->itp_crypto.dst)) @@ -405,7 +402,6 @@ ipsec_tun_protect_rx_db_remove (ipsec_main_t * im, } } })); - /* *INDENT-ON* */ } static adj_walk_rc_t @@ -464,7 +460,6 @@ ipsec_tun_protect_set_crypto_addr (ipsec_tun_protect_t * itp) { ipsec_sa_t *sa; - /* *INDENT-OFF* */ FOR_EACH_IPSEC_PROTECT_INPUT_SA(itp, sa, ({ if (ipsec_sa_is_set_IS_TUNNEL (sa)) @@ -484,7 +479,6 @@ ipsec_tun_protect_set_crypto_addr (ipsec_tun_protect_t * itp) itp->itp_flags &= ~IPSEC_PROTECT_ENCAPED; } })); - /* *INDENT-ON* */ } static void @@ -504,13 +498,11 @@ ipsec_tun_protect_config (ipsec_main_t * im, if (itp->itp_flags & IPSEC_PROTECT_ITF) ipsec_sa_set_NO_ALGO_NO_DROP (ipsec_sa_get (itp->itp_out_sa)); - /* *INDENT-OFF* */ FOR_EACH_IPSEC_PROTECT_INPUT_SAI(itp, sai, ({ ipsec_sa_lock(sai); })); ipsec_tun_protect_set_crypto_addr(itp); - /* *INDENT-ON* */ /* * add to the DB against each SA @@ -527,7 +519,6 @@ ipsec_tun_protect_unconfig (ipsec_main_t * im, ipsec_tun_protect_t * itp) ipsec_sa_t *sa; index_t sai; - /* *INDENT-OFF* */ FOR_EACH_IPSEC_PROTECT_INPUT_SA(itp, sa, ({ ipsec_sa_unset_IS_PROTECT (sa); @@ -543,7 +534,6 @@ ipsec_tun_protect_unconfig (ipsec_main_t * im, ipsec_tun_protect_t * itp) ({ ipsec_sa_unlock(sai); })); - /* *INDENT-ON* */ ITP_DBG (itp, "unconfigured"); } @@ -751,12 +741,10 @@ ipsec_tun_protect_walk (ipsec_tun_protect_walk_cb_t fn, void *ctx) { index_t itpi; - /* *INDENT-OFF* */ pool_foreach_index (itpi, ipsec_tun_protect_pool) { fn (itpi, ctx); } - /* *INDENT-ON* */ } void @@ -772,12 +760,10 @@ ipsec_tun_protect_walk_itf (u32 sw_if_index, idi = &itp_db.id_itf[sw_if_index]; - /* *INDENT-OFF* */ hash_foreach(key, itpi, idi->id_hash, ({ fn (itpi, ctx); })); - /* *INDENT-ON* */ if (INDEX_INVALID != idi->id_itp) fn (idi->id_itp, ctx); } diff --git a/src/vnet/ipsec/ipsec_tun_in.c b/src/vnet/ipsec/ipsec_tun_in.c index a419d8c4fe8..c82de3ebaff 100644 --- a/src/vnet/ipsec/ipsec_tun_in.c +++ b/src/vnet/ipsec/ipsec_tun_in.c @@ -411,7 +411,6 @@ VLIB_NODE_FN (ipsec4_tun_input_node) (vlib_main_t * vm, return ipsec_tun_protect_input_inline (vm, node, from_frame, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ipsec4_tun_input_node) = { .name = "ipsec4-tun-input", .vector_size = sizeof (u32), @@ -421,7 +420,6 @@ VLIB_REGISTER_NODE (ipsec4_tun_input_node) = { .error_counters = ipsec_tun_error_counters, .sibling_of = "device-input", }; -/* *INDENT-ON* */ VLIB_NODE_FN (ipsec6_tun_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -430,7 +428,6 @@ VLIB_NODE_FN (ipsec6_tun_input_node) (vlib_main_t * vm, return ipsec_tun_protect_input_inline (vm, node, from_frame, 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ipsec6_tun_input_node) = { .name = "ipsec6-tun-input", .vector_size = sizeof (u32), @@ -440,7 +437,6 @@ VLIB_REGISTER_NODE (ipsec6_tun_input_node) = { .error_counters = ipsec_tun_error_counters, .sibling_of = "device-input", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/l2/feat_bitmap.c b/src/vnet/l2/feat_bitmap.c index 349ec67462b..507fe365f07 100644 --- a/src/vnet/l2/feat_bitmap.c +++ b/src/vnet/l2/feat_bitmap.c @@ -155,7 +155,6 @@ feat_bitmap_drop_init (vlib_main_t * vm) VLIB_INIT_FUNCTION (feat_bitmap_drop_init); -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (feat_bitmap_drop_node,static) = { .function = feat_bitmap_drop_node_fn, .name = "feature-bitmap-drop", @@ -173,7 +172,6 @@ VLIB_REGISTER_NODE (feat_bitmap_drop_node,static) = { [FEAT_BITMAP_DROP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c index a06f7ff1088..035542d298d 100644 --- a/src/vnet/l2/l2_api.c +++ b/src/vnet/l2/l2_api.c @@ -68,7 +68,6 @@ vl_api_l2_xconnect_dump_t_handler (vl_api_l2_xconnect_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ vec_foreach_index (sw_if_index, l2im->configs) { config = vec_elt_at_index (l2im->configs, sw_if_index); @@ -76,7 +75,6 @@ vl_api_l2_xconnect_dump_t_handler (vl_api_l2_xconnect_dump_t * mp) send_l2_xconnect_details (reg, mp->context, sw_if_index, config->output_sw_if_index); } - /* *INDENT-ON* */ } static void @@ -414,12 +412,10 @@ vl_api_l2_flags_t_handler (vl_api_l2_flags_t * mp) BAD_SW_IF_INDEX_LABEL; - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_L2_FLAGS_REPLY, ({ rmp->resulting_feature_bitmap = ntohl(rbm); })); - /* *INDENT-ON* */ } static void @@ -683,12 +679,10 @@ vl_api_bridge_flags_t_handler (vl_api_bridge_flags_t * mp) bitmap = bd_set_flags (vm, bd_index, flags, mp->is_set); out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_BRIDGE_FLAGS_REPLY, ({ rmp->resulting_feature_bitmap = ntohl(bitmap); })); - /* *INDENT-ON* */ } static void @@ -950,7 +944,6 @@ vl_api_bd_ip_mac_dump_t_handler (vl_api_bd_ip_mac_dump_t * mp) u64 mac64; bd_id = bd_config->bd_id; - /* *INDENT-OFF* */ hash_foreach (ip4_addr.as_u32, mac64, bd_config->mac_by_ip4, ({ ip46_address_t ip = { @@ -972,7 +965,6 @@ vl_api_bd_ip_mac_dump_t_handler (vl_api_bd_ip_mac_dump_t * mp) send_bd_ip_mac_entry (am, reg, bd_id, &ip, IP46_TYPE_IP6, &mac, mp->context); })); - /* *INDENT-ON* */ } } } @@ -1126,12 +1118,10 @@ vl_api_bvi_create_t_handler (vl_api_bvi_create_t * mp) rv = l2_bvi_create (ntohl (mp->user_instance), &mac, &sw_if_index); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_BVI_CREATE_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -1225,13 +1215,11 @@ l2_arp_term_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_arp_term_process_node) = { .function = l2_arp_term_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "l2-arp-term-publisher", }; -/* *INDENT-ON* */ static void vl_api_want_l2_arp_term_events_t_handler (vl_api_want_l2_arp_term_events_t * diff --git a/src/vnet/l2/l2_arp_term.c b/src/vnet/l2/l2_arp_term.c index 594ee8e3622..eed9b7af7c3 100644 --- a/src/vnet/l2/l2_arp_term.c +++ b/src/vnet/l2/l2_arp_term.c @@ -449,7 +449,6 @@ arp_term_l2bd (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (arp_term_l2bd_node, static) = { .function = arp_term_l2bd, .name = "arp-term-l2bd", @@ -464,7 +463,6 @@ VLIB_REGISTER_NODE (arp_term_l2bd_node, static) = { .format_buffer = format_ethernet_arp_header, .format_trace = format_arp_term_input_trace, }; -/* *INDENT-ON* */ clib_error_t * arp_term_init (vlib_main_t * vm) diff --git a/src/vnet/l2/l2_bd.c b/src/vnet/l2/l2_bd.c index 9c81b0f81a0..c7392c03b58 100644 --- a/src/vnet/l2/l2_bd.c +++ b/src/vnet/l2/l2_bd.c @@ -102,12 +102,10 @@ bd_free_ip_mac_tables (l2_bridge_domain_t * bd) ip6_address_t *ip6_addr_key; hash_free (bd->mac_by_ip4); - /* *INDENT-OFF* */ hash_foreach_mem (ip6_addr_key, mac_addr, bd->mac_by_ip6, ({ clib_mem_free (ip6_addr_key); /* free memory used for ip6 addr key */ })); - /* *INDENT-ON* */ hash_free (bd->mac_by_ip6); } @@ -454,13 +452,11 @@ done: * Example of how to disable learning (where 200 is the bridge-domain-id): * @cliexcmd{set bridge-domain learn 200 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_learn_cli, static) = { .path = "set bridge-domain learn", .short_help = "set bridge-domain learn <bridge-domain-id> [disable]", .function = bd_learn, }; -/* *INDENT-ON* */ static clib_error_t * bd_default_learn_limit (vlib_main_t *vm, unformat_input_t *input, @@ -547,13 +543,11 @@ done: * Example of how to disable forwarding (where 200 is the bridge-domain-id): * @cliexcmd{set bridge-domain forward 200 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_fwd_cli, static) = { .path = "set bridge-domain forward", .short_help = "set bridge-domain forward <bridge-domain-id> [disable]", .function = bd_fwd, }; -/* *INDENT-ON* */ /** Set bridge-domain flood enable/disable. @@ -612,13 +606,11 @@ done: * Example of how to disable flooding (where 200 is the bridge-domain-id): * @cliexcmd{set bridge-domain flood 200 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_flood_cli, static) = { .path = "set bridge-domain flood", .short_help = "set bridge-domain flood <bridge-domain-id> [disable]", .function = bd_flood, }; -/* *INDENT-ON* */ /** Set bridge-domain unknown-unicast flood enable/disable. @@ -677,13 +669,11 @@ done: * Example of how to disable unknown-unicast flooding (where 200 is the bridge-domain-id): * @cliexcmd{set bridge-domain uu-flood 200 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_uu_flood_cli, static) = { .path = "set bridge-domain uu-flood", .short_help = "set bridge-domain uu-flood <bridge-domain-id> [disable]", .function = bd_uu_flood, }; -/* *INDENT-ON* */ /** Set bridge-domain arp-unicast forward enable/disable. @@ -742,13 +732,11 @@ done: * Example of how to disable arp-unicast forwarding (where 200 is the bridge-domain-id): * @cliexcmd{set bridge-domain arp-ufwd 200 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_arp_ufwd_cli, static) = { .path = "set bridge-domain arp-ufwd", .short_help = "set bridge-domain arp-ufwd <bridge-domain-id> [disable]", .function = bd_arp_ufwd, }; -/* *INDENT-ON* */ /** Set bridge-domain arp term enable/disable. @@ -854,13 +842,11 @@ done: * Example of how to disable mac aging (where 200 is the bridge-domain-id): * @cliexcmd{set bridge-domain flood 200 0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_mac_age_cli, static) = { .path = "set bridge-domain mac-age", .short_help = "set bridge-domain mac-age <bridge-domain-id> <mins>", .function = bd_mac_age, }; -/* *INDENT-ON* */ static clib_error_t * bd_learn_limit (vlib_main_t *vm, unformat_input_t *input, @@ -921,13 +907,11 @@ VLIB_CLI_COMMAND (bd_learn_limit_cli, static) = { * Example of how to disable ARP termination (where 200 is the bridge-domain-id): * @cliexcmd{set bridge-domain arp term 200 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_arp_term_cli, static) = { .path = "set bridge-domain arp term", .short_help = "set bridge-domain arp term <bridge-domain-id> [disable]", .function = bd_arp_term, }; -/* *INDENT-ON* */ /** @@ -1119,13 +1103,11 @@ done: * Example of how to delete an ARP entry (where 200 is the bridge-domain-id): * @cliexcmd{set bridge-domain arp entry 200 192.168.72.45 52:54:00:3b:83:1a del} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_arp_entry_cli, static) = { .path = "set bridge-domain arp entry", .short_help = "set bridge-domain arp entry <bridge-domain-id> [<ip-addr> <mac-addr> [del] | del-all]", .function = bd_arp_entry, }; -/* *INDENT-ON* */ static u8 * format_uu_cfg (u8 * s, va_list * args) @@ -1289,7 +1271,6 @@ bd_show (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) vlib_cli_output (vm, "\n IP4/IP6 to MAC table for ARP Termination"); - /* *INDENT-OFF* */ hash_foreach (ip4_addr, mac_addr, bd_config->mac_by_ip4, ({ vlib_cli_output (vm, "%=40U => %=20U", @@ -1303,7 +1284,6 @@ bd_show (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) format_ip6_address, ip6_addr, format_ethernet_address, &mac_addr); })); - /* *INDENT-ON* */ } if ((detail || bd_tag) && (bd_config->bd_tag)) @@ -1349,13 +1329,11 @@ done: * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_show_cli, static) = { .path = "show bridge-domain", .short_help = "show bridge-domain [bridge-domain-id [detail|int|arp|bd-tag]]", .function = bd_show, }; -/* *INDENT-ON* */ int bd_add_del (l2_bridge_domain_add_del_args_t * a) @@ -1594,7 +1572,6 @@ done: * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (bd_create_cli, static) = { .path = "create bridge-domain", .short_help = "create bridge-domain <bridge-domain-id>" @@ -1602,7 +1579,6 @@ VLIB_CLI_COMMAND (bd_create_cli, static) = { " [arp-ufwd <0|1>] [mac-age <nn>] [bd-tag <tag>] [del]", .function = bd_add_del_command_fn, }; -/* *INDENT-ON* */ /* * Returns an unused bridge domain id, and ~0 if it can't find one. diff --git a/src/vnet/l2/l2_bvi.c b/src/vnet/l2/l2_bvi.c index 9cfff55fb45..e39c4aae39d 100644 --- a/src/vnet/l2/l2_bvi.c +++ b/src/vnet/l2/l2_bvi.c @@ -58,14 +58,12 @@ bvi_mac_change (vnet_hw_interface_t * hi, return (NULL); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (bvi_device_class) = { .name = "BVI", .format_device_name = format_bvi_name, .admin_up_down_function = bvi_admin_up_down, .mac_addr_change_function = bvi_mac_change, }; -/* *INDENT-ON* */ /* * Maintain a bitmap of allocated bvi instance numbers. @@ -273,13 +271,11 @@ l2_bvi_create_cli (vlib_main_t * vm, * Example of how to create a bvi interface: * @cliexcmd{bvi create} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2_bvi_create_command, static) = { .path = "bvi create", .short_help = "bvi create [mac <mac-addr>] [instance <instance>]", .function = l2_bvi_create_cli, }; -/* *INDENT-ON* */ static clib_error_t * l2_bvi_delete_cli (vlib_main_t * vm, @@ -324,13 +320,11 @@ l2_bvi_delete_cli (vlib_main_t * vm, * Example of how to create a bvi interface: * @cliexcmd{bvi delete bvi0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2_bvi_delete_command, static) = { .path = "bvi delete", .short_help = "bvi delete <interface>", .function = l2_bvi_delete_cli, }; -/* *INDENT-ON* */ /* diff --git a/src/vnet/l2/l2_efp_filter.c b/src/vnet/l2/l2_efp_filter.c index ad325b83df2..47256ffa5d3 100644 --- a/src/vnet/l2/l2_efp_filter.c +++ b/src/vnet/l2/l2_efp_filter.c @@ -461,7 +461,6 @@ VLIB_NODE_FN (l2_efp_filter_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_efp_filter_node) = { .name = "l2-efp-filter", .vector_size = sizeof (u32), @@ -478,7 +477,6 @@ VLIB_REGISTER_NODE (l2_efp_filter_node) = { [L2_EFP_FILTER_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT clib_error_t * @@ -559,13 +557,11 @@ done: * Example of how to disable a Layer 2 efp-filter on a sub-interface: * @cliexcmd{set interface l2 efp-filter GigabitEthernet0/8/0.200 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_l2_efp_filter_cli, static) = { .path = "set interface l2 efp-filter", .short_help = "set interface l2 efp-filter <interface> [disable]", .function = int_l2_efp_filter, }; -/* *INDENT-ON* */ #endif /* CLIB_MARCH_VARIANT */ diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c index efcc640d5ea..3dcd1e7ae26 100644 --- a/src/vnet/l2/l2_fib.c +++ b/src/vnet/l2/l2_fib.c @@ -352,13 +352,11 @@ show_l2fib (vlib_main_t * vm, * 3 l2fib entries * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_l2fib_cli, static) = { .path = "show l2fib", .short_help = "show l2fib [all] | [bd_id <nn> | bd_index <nn>] [learn | add] | [raw]", .function = show_l2fib, }; -/* *INDENT-ON* */ void l2fib_table_init (void) @@ -415,13 +413,11 @@ clear_l2fib (vlib_main_t * vm, * no l2fib entries * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_l2fib_cli, static) = { .path = "clear l2fib", .short_help = "clear l2fib", .function = clear_l2fib, }; -/* *INDENT-ON* */ static l2fib_seq_num_t l2fib_cur_seq_num (u32 bd_index, u32 sw_if_index) @@ -592,13 +588,11 @@ done: * 3 l2fib entries * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2fib_add_cli, static) = { .path = "l2fib add", .short_help = "l2fib add <mac> <bridge-domain-id> filter | <intf> [static | bvi]", .function = l2fib_add, }; -/* *INDENT-ON* */ static clib_error_t * @@ -723,13 +717,11 @@ l2fib_test_command_fn (vlib_main_t * vm, * @cliexcmd{test l2fib del mac 52:54:00:53:00:00 count 4} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2fib_test_command, static) = { .path = "test l2fib", .short_help = "test l2fib [add|del|check] mac <base-addr> count <nn>", .function = l2fib_test_command_fn, }; -/* *INDENT-ON* */ /** @@ -832,13 +824,11 @@ done: * Example of how to delete a MAC Address entry from the L2 FIB table of a bridge-domain (where 200 is the bridge-domain-id): * @cliexcmd{l2fib del 52:54:00:53:18:33 200} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2fib_del_cli, static) = { .path = "l2fib del", .short_help = "l2fib del <mac> <bridge-domain-id> []", .function = l2fib_del, }; -/* *INDENT-ON* */ static clib_error_t * l2fib_set_scan_delay (vlib_main_t *vm, unformat_input_t *input, @@ -976,13 +966,11 @@ l2fib_flush_mac_all (vlib_main_t * vm, * Example of how to flush MAC Address entries learned on an interface from the L2 FIB table: * @cliexcmd{l2fib flush-mac interface GigabitEthernet2/1/0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2fib_flush_mac_all_cli, static) = { .path = "l2fib flush-mac all", .short_help = "l2fib flush-mac all", .function = l2fib_flush_mac_all, }; -/* *INDENT-ON* */ /*? * This command kick off ager to delete all existing MAC Address entries, @@ -992,13 +980,11 @@ VLIB_CLI_COMMAND (l2fib_flush_mac_all_cli, static) = { * Example of how to flush MAC Address entries learned on an interface from the L2 FIB table: * @cliexcmd{l2fib flush-mac interface GigabitEthernet2/1/0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2fib_flush_mac_int_cli, static) = { .path = "l2fib flush-mac interface", .short_help = "l2fib flush-mac interface <if-name>", .function = l2fib_flush_mac_int, }; -/* *INDENT-ON* */ /** Flush bridge-domain MACs except static ones. @@ -1041,13 +1027,11 @@ done: * Example of how to flush MAC Address entries learned in a bridge domain from the L2 FIB table: * @cliexcmd{l2fib flush-mac bridge-domain 1000} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2fib_flush_mac_bd_cli, static) = { .path = "l2fib flush-mac bridge-domain", .short_help = "l2fib flush-mac bridge-domain <bd-id>", .function = l2fib_flush_mac_bd, }; -/* *INDENT-ON* */ clib_error_t * l2fib_sw_interface_up_down (vnet_main_t * vnm, u32 sw_if_index, u32 flags) @@ -1365,13 +1349,11 @@ l2fib_mac_age_scanner_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2fib_mac_age_scanner_process_node) = { .function = l2fib_mac_age_scanner_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "l2fib-mac-age-scanner-process", }; -/* *INDENT-ON* */ clib_error_t * l2fib_init (vlib_main_t * vm) diff --git a/src/vnet/l2/l2_flood.c b/src/vnet/l2/l2_flood.c index c0d7bf8dfab..f8cb3cb5687 100644 --- a/src/vnet/l2/l2_flood.c +++ b/src/vnet/l2/l2_flood.c @@ -362,7 +362,6 @@ VLIB_NODE_FN (l2flood_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2flood_node) = { .name = "l2-flood", .vector_size = sizeof (u32), @@ -380,7 +379,6 @@ VLIB_REGISTER_NODE (l2flood_node) = { [L2FLOOD_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT clib_error_t * @@ -468,13 +466,11 @@ done: * Example of how to disable flooding: * @cliexcmd{set interface l2 flood GigabitEthernet0/8/0 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_flood_cli, static) = { .path = "set interface l2 flood", .short_help = "set interface l2 flood <interface> [disable]", .function = int_flood, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/l2/l2_fwd.c b/src/vnet/l2/l2_fwd.c index 1ee3a534cd7..503dfc27957 100644 --- a/src/vnet/l2/l2_fwd.c +++ b/src/vnet/l2/l2_fwd.c @@ -288,7 +288,6 @@ l2fwd_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node, #ifdef COUNTERS em->counters[node_counter_base_index + L2FWD_ERROR_L2FWD] += 4; #endif - /* *INDENT-OFF* */ l2fib_lookup_4 (msm->mac_table, &cached_key, &cached_result, h0->dst_address, h1->dst_address, h2->dst_address, h3->dst_address, @@ -304,7 +303,6 @@ l2fwd_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node, &result1, &result2, &result3); - /* *INDENT-ON* */ l2fwd_process (vm, node, msm, em, b[0], sw_if_index0, &result0, next); l2fwd_process (vm, node, msm, em, b[1], sw_if_index1, &result1, next + 1); @@ -414,7 +412,6 @@ VLIB_NODE_FN (l2fwd_node) (vlib_main_t * vm, return l2fwd_node_inline (vm, node, frame, 0 /* do_trace */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2fwd_node) = { .name = "l2-fwd", .vector_size = sizeof (u32), @@ -432,7 +429,6 @@ VLIB_REGISTER_NODE (l2fwd_node) = { [L2FWD_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT clib_error_t * @@ -527,13 +523,11 @@ done: * Example of how to disable forwarding: * @cliexcmd{set interface l2 forward GigabitEthernet0/8/0 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_fwd_cli, static) = { .path = "set interface l2 forward", .short_help = "set interface l2 forward <interface> [disable]", .function = int_fwd, }; -/* *INDENT-ON* */ #endif diff --git a/src/vnet/l2/l2_in_out_acl.c b/src/vnet/l2/l2_in_out_acl.c index 7307a6802a2..2e2cb1e7f36 100644 --- a/src/vnet/l2/l2_in_out_acl.c +++ b/src/vnet/l2/l2_in_out_acl.c @@ -464,7 +464,6 @@ VLIB_NODE_FN (l2_outacl_node) (vlib_main_t * vm, IN_OUT_ACL_OUTPUT_TABLE_GROUP); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_inacl_node) = { .name = "l2-input-acl", .vector_size = sizeof (u32), @@ -498,7 +497,6 @@ VLIB_REGISTER_NODE (l2_outacl_node) = { [ACL_NEXT_INDEX_DENY] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT diff --git a/src/vnet/l2/l2_in_out_feat_arc.c b/src/vnet/l2/l2_in_out_feat_arc.c index 94c4c1bb713..26fbd3eb776 100644 --- a/src/vnet/l2/l2_in_out_feat_arc.c +++ b/src/vnet/l2/l2_in_out_feat_arc.c @@ -396,7 +396,6 @@ vnet_l2_in_out_feat_arc_enable_disable (u32 sw_if_index, int is_output, } #endif /* CLIB_MARCH_VARIANT */ -/* *INDENT-OFF* */ VNET_FEATURE_ARC_INIT (l2_in_ip4_arc, static) = { .arc_name = "l2-input-ip4", @@ -438,10 +437,8 @@ VNET_FEATURE_ARC_INIT (l2_in_nonip_arc, static) = }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_in_feat_arc_node) = { .name = "l2-input-feat-arc", .vector_size = sizeof (u32), @@ -521,7 +518,6 @@ VNET_FEATURE_INIT (l2_out_nonip_arc_end, static) = .node_name = "l2-output-feat-arc-end", .runs_before = 0, /* not before any other features */ }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c index b09555aa6ed..23bd5cc9958 100644 --- a/src/vnet/l2/l2_input.c +++ b/src/vnet/l2/l2_input.c @@ -646,13 +646,11 @@ done: * Example of how to remove an interface from a Layer2 bridge-domain: * @cliexcmd{set interface l3 GigabitEthernet0/a/0.200} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_l2_bridge_cli, static) = { .path = "set interface l2 bridge", .short_help = "set interface l2 bridge <interface> <bridge-domain-id> [bvi|uu-fwd] [shg]", .function = int_l2_bridge, }; -/* *INDENT-ON* */ /** * Set subinterface in xconnect mode with another interface. @@ -712,13 +710,11 @@ done: * @cliexcmd{set interface l3 GigabitEthernet0/8/0.300} * @cliexcmd{set interface l3 GigabitEthernet0/9/0.300} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_l2_xc_cli, static) = { .path = "set interface l2 xconnect", .short_help = "set interface l2 xconnect <interface> <peer interface>", .function = int_l2_xc, }; -/* *INDENT-ON* */ /** * Set subinterface in L3 mode. @@ -762,13 +758,11 @@ done: * Example of how to set the mode of an interface to Layer 3: * @cliexcmd{set interface l3 GigabitEthernet0/8/0.200} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_l3_cli, static) = { .path = "set interface l3", .short_help = "set interface l3 <interface>", .function = int_l3, }; -/* *INDENT-ON* */ /** * Show interface mode. @@ -810,9 +804,7 @@ show_int_mode (vlib_main_t * vm, /* Gather interfaces. */ sis = vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces)); vec_set_len (sis, 0); - /* *INDENT-OFF* */ pool_foreach (si, im->sw_interfaces) { vec_add1 (sis, si[0]); } - /* *INDENT-ON* */ } vec_foreach (si, sis) @@ -878,13 +870,11 @@ done: * l2 bridge GigabitEthernet0/8/0.200 bd_id 200 shg 0 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_l2_mode, static) = { .path = "show mode", .short_help = "show mode [<if-name1> <if-name2> ...]", .function = show_int_mode, }; -/* *INDENT-ON* */ #define foreach_l2_init_function \ _(feat_bitmap_drop_init) \ diff --git a/src/vnet/l2/l2_input_classify.c b/src/vnet/l2/l2_input_classify.c index d33a0810d28..248158310a1 100644 --- a/src/vnet/l2/l2_input_classify.c +++ b/src/vnet/l2/l2_input_classify.c @@ -442,7 +442,6 @@ VLIB_NODE_FN (l2_input_classify_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_input_classify_node) = { .name = "l2-input-classify", .vector_size = sizeof (u32), @@ -465,7 +464,6 @@ VLIB_REGISTER_NODE (l2_input_classify_node) = { [L2_INPUT_CLASSIFY_NEXT_LI] = "li-hit", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT /** l2 input classsifier feature initialization. */ @@ -642,7 +640,6 @@ int_l2_input_classify_command_fn (vlib_main_t * vm, * @todo This is incomplete. This needs a detailed description and a * practical example. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_l2_input_classify_cli, static) = { .path = "set interface l2 input classify", .short_help = @@ -650,7 +647,6 @@ VLIB_CLI_COMMAND (int_l2_input_classify_cli, static) = { " [ip6-table <n>] [other-table <n>]", .function = int_l2_input_classify_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/l2/l2_input_node.c b/src/vnet/l2/l2_input_node.c index 07e8c7473ae..76b94809eb3 100644 --- a/src/vnet/l2/l2_input_node.c +++ b/src/vnet/l2/l2_input_node.c @@ -365,7 +365,6 @@ VLIB_NODE_FN (l2input_node) (vlib_main_t * vm, return l2input_node_inline (vm, node, frame, 0 /* do_trace */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2input_node) = { .name = "l2-input", .vector_size = sizeof (u32), @@ -385,7 +384,6 @@ VLIB_REGISTER_NODE (l2input_node) = { [L2INPUT_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/l2/l2_input_vtr.c b/src/vnet/l2/l2_input_vtr.c index 3c1235bfa32..ccf3efa2390 100644 --- a/src/vnet/l2/l2_input_vtr.c +++ b/src/vnet/l2/l2_input_vtr.c @@ -319,7 +319,6 @@ VLIB_NODE_FN (l2_invtr_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_invtr_node) = { .name = "l2-input-vtr", .vector_size = sizeof (u32), @@ -336,7 +335,6 @@ VLIB_REGISTER_NODE (l2_invtr_node) = { [L2_INVTR_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT clib_error_t * diff --git a/src/vnet/l2/l2_learn.c b/src/vnet/l2/l2_learn.c index 6d90cee62a7..24b5389e55a 100644 --- a/src/vnet/l2/l2_learn.c +++ b/src/vnet/l2/l2_learn.c @@ -439,7 +439,6 @@ VLIB_NODE_FN (l2learn_node) (vlib_main_t * vm, return l2learn_node_inline (vm, node, frame, 0 /* do_trace */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2learn_node) = { .name = "l2-learn", .vector_size = sizeof (u32), @@ -457,7 +456,6 @@ VLIB_REGISTER_NODE (l2learn_node) = { [L2LEARN_NEXT_L2FWD] = "l2-fwd", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT clib_error_t * @@ -540,13 +538,11 @@ done: * Example of how to disable learning: * @cliexcmd{set interface l2 learn GigabitEthernet0/8/0 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_learn_cli, static) = { .path = "set interface l2 learn", .short_help = "set interface l2 learn <interface> [disable]", .function = int_learn, }; -/* *INDENT-ON* */ static clib_error_t * diff --git a/src/vnet/l2/l2_output.c b/src/vnet/l2/l2_output.c index 74ca868e535..7c70cf9f4c7 100644 --- a/src/vnet/l2/l2_output.c +++ b/src/vnet/l2/l2_output.c @@ -443,7 +443,6 @@ VLIB_NODE_FN (l2output_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2output_node) = { .name = "l2-output", .vector_size = sizeof (u32), @@ -461,7 +460,6 @@ VLIB_REGISTER_NODE (l2output_node) = { [L2OUTPUT_NEXT_BAD_INTF] = "l2-output-bad-intf", }, }; -/* *INDENT-ON* */ #define foreach_l2output_bad_intf_error \ @@ -549,7 +547,6 @@ VLIB_NODE_FN (l2output_bad_intf_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2output_bad_intf_node) = { .name = "l2-output-bad-intf", .vector_size = sizeof (u32), @@ -565,7 +562,6 @@ VLIB_REGISTER_NODE (l2output_bad_intf_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ static clib_error_t * l2output_init (vlib_main_t * vm) diff --git a/src/vnet/l2/l2_output_classify.c b/src/vnet/l2/l2_output_classify.c index 97beb37f351..33a7c927386 100644 --- a/src/vnet/l2/l2_output_classify.c +++ b/src/vnet/l2/l2_output_classify.c @@ -435,7 +435,6 @@ VLIB_NODE_FN (l2_output_classify_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_output_classify_node) = { .name = "l2-output-classify", .vector_size = sizeof (u32), @@ -454,7 +453,6 @@ VLIB_REGISTER_NODE (l2_output_classify_node) = { [L2_OUTPUT_CLASSIFY_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT /** l2 output classsifier feature initialization. */ @@ -634,7 +632,6 @@ int_l2_output_classify_command_fn (vlib_main_t * vm, * @todo This is incomplete. This needs a detailed description and a * practical example. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_l2_output_classify_cli, static) = { .path = "set interface l2 output classify", .short_help = @@ -642,7 +639,6 @@ VLIB_CLI_COMMAND (int_l2_output_classify_cli, static) = { " [ip6-table <n>] [other-table <n>]", .function = int_l2_output_classify_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/l2/l2_patch.c b/src/vnet/l2/l2_patch.c index 5697fb6a8ae..f85938ed799 100644 --- a/src/vnet/l2/l2_patch.c +++ b/src/vnet/l2/l2_patch.c @@ -206,7 +206,6 @@ VLIB_NODE_FN (l2_patch_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_patch_node) = { .name = "l2-patch", .vector_size = sizeof (u32), @@ -223,7 +222,6 @@ VLIB_REGISTER_NODE (l2_patch_node) = { [L2_PATCH_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ extern int vnet_l2_patch_add_del (u32 rx_sw_if_index, u32 tx_sw_if_index, int is_add); @@ -373,13 +371,11 @@ done: * @todo This is incomplete. This needs a detailed description and a * practical example. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_patch_command, static) = { .path = "test l2patch", .short_help = "test l2patch rx <intfc> tx <intfc> [del]", .function = test_patch_command_fn, }; -/* *INDENT-ON* */ /** Display the contents of the l2patch table. */ static clib_error_t * @@ -425,13 +421,11 @@ show_l2patch (vlib_main_t * vm, * @todo This is incomplete. This needs a detailed description and a * practical example. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_l2patch_cli, static) = { .path = "show l2patch", .short_help = "Show l2 interface cross-connect entries", .function = show_l2patch, }; -/* *INDENT-ON* */ static clib_error_t * l2_patch_init (vlib_main_t * vm) diff --git a/src/vnet/l2/l2_rw.c b/src/vnet/l2/l2_rw.c index 7921d0e4884..c0e8ec489fc 100644 --- a/src/vnet/l2/l2_rw.c +++ b/src/vnet/l2/l2_rw.c @@ -407,14 +407,12 @@ mask, * @cliexcmd{l2 rewrite entry mask ffffffffffff00000000000000000000 value 008a000d0e0200000000000000000000} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2_rw_entry_cli, static) = { .path = "l2 rewrite entry", .short_help = "l2 rewrite entry [index <index>] [mask <hex-mask>] [value <hex-value>] [skip <n_bytes>] [del]", .function = l2_rw_entry_cli_fn, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT int @@ -498,14 +496,12 @@ that matches index 0): * @cliexcmd{set interface l2 rewrite YusurK2Eth6/0/1/3 table 0 miss-index 0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2_rw_interface_cli, static) = { .path = "set interface l2 rewrite", .short_help = "set interface l2 rewrite <interface> [table <table index>] [miss-index <entry-index>]", .function = l2_rw_interface_cli_fn, }; -/* *INDENT-ON* */ static clib_error_t * l2_rw_show_interfaces_cli_fn (vlib_main_t * vm, @@ -517,11 +513,9 @@ l2_rw_show_interfaces_cli_fn (vlib_main_t * vm, vlib_cli_output (vm, "No interface is currently using l2 rewrite\n"); uword i; - /* *INDENT-OFF* */ clib_bitmap_foreach (i, rw->configs_bitmap) { vlib_cli_output (vm, "sw_if_index:%d %U\n", i, format_l2_rw_config, &rw->configs[i]); } - /* *INDENT-ON* */ return 0; } @@ -534,14 +528,12 @@ l2_rw_show_interfaces_cli_fn (vlib_main_t * vm, * sw_if_index:4 table-index:0 miss-index:0 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2_rw_show_interfaces_cli, static) = { .path = "show l2 rewrite interfaces", .short_help = "show l2 rewrite interfaces", .function = l2_rw_show_interfaces_cli_fn, }; -/* *INDENT-ON* */ static clib_error_t * l2_rw_show_entries_cli_fn (vlib_main_t * vm, @@ -552,11 +544,9 @@ l2_rw_show_entries_cli_fn (vlib_main_t * vm, if (pool_elts (rw->entries) == 0) vlib_cli_output (vm, "No entries\n"); - /* *INDENT-OFF* */ pool_foreach (e, rw->entries) { vlib_cli_output (vm, "%U\n", format_l2_rw_entry, e); } - /* *INDENT-ON* */ return 0; } @@ -571,14 +561,12 @@ value:aabbccddeeff00000000000000000000 * hits:0 skip_bytes:0 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2_rw_show_entries_cli, static) = { .path = "show l2 rewrite entries", .short_help = "show l2 rewrite entries", .function = l2_rw_show_entries_cli_fn, }; -/* *INDENT-ON* */ static int l2_rw_enable_disable (u32 bridge_domain, u8 disable) @@ -624,14 +612,12 @@ bridge-domain. * Example of how to disable rewrite (where 100 is the bridge-domain-id): * @cliexcmd{set bridge-domain rewrite 100 disable} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (l2_rw_set_cli, static) = { .path = "set bridge-domain rewrite", .short_help = "set bridge-domain rewrite <bridge-domain> [disable]", .function = l2_rw_set_cli_fn, }; -/* *INDENT-ON* */ static clib_error_t * l2_rw_init (vlib_main_t * vm) @@ -673,7 +659,6 @@ static char *l2_rw_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_rw_node) = { .name = "l2-rw", .vector_size = sizeof (u32), @@ -685,7 +670,6 @@ VLIB_REGISTER_NODE (l2_rw_node) = { .n_next_nodes = L2_RW_N_NEXT, .next_nodes = { [L2_RW_NEXT_DROP] = "error-drop"}, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/l2/l2_rw.h b/src/vnet/l2/l2_rw.h index f9b10333f43..6d12a21fe55 100644 --- a/src/vnet/l2/l2_rw.h +++ b/src/vnet/l2/l2_rw.h @@ -27,7 +27,6 @@ #include <vnet/l2/l2_input.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct _l2_rw_entry { u16 skip_n_vectors; u16 rewrite_n_vectors; @@ -35,15 +34,12 @@ typedef CLIB_PACKED(struct _l2_rw_entry { u32x4 *mask; u32x4 *value; }) l2_rw_entry_t; -/* *INDENT-ON* */ /* l2_rw configuration for one interface */ -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct _l2_rw_config { u32 table_index; /* Which classify table to use */ u32 miss_index; /* Rewrite entry to use if table does not match */ }) l2_rw_config_t; -/* *INDENT-ON* */ typedef struct { diff --git a/src/vnet/l2/l2_uu_fwd.c b/src/vnet/l2/l2_uu_fwd.c index fb3571d159c..4a510b658d7 100644 --- a/src/vnet/l2/l2_uu_fwd.c +++ b/src/vnet/l2/l2_uu_fwd.c @@ -211,7 +211,6 @@ VLIB_NODE_FN (l2_uu_fwd_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_uu_fwd_node) = { .name = "l2-uu-fwd", .vector_size = sizeof (u32), @@ -228,7 +227,6 @@ VLIB_REGISTER_NODE (l2_uu_fwd_node) = { [L2_UU_FWD_NEXT_L2_OUTPUT] = "l2-output", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/l2/l2_vtr.c b/src/vnet/l2/l2_vtr.c index bfd1dcb9280..4053c0fc1cb 100644 --- a/src/vnet/l2/l2_vtr.c +++ b/src/vnet/l2/l2_vtr.c @@ -670,13 +670,11 @@ done: * @cliexend * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_l2_vtr_cli, static) = { .path = "set interface l2 tag-rewrite", .short_help = "set interface l2 tag-rewrite <interface> [disable | pop {1|2} | push {dot1q|dot1ad} <tag> <tag>]", .function = int_l2_vtr, }; -/* *INDENT-ON* */ /** * Get pbb tag rewrite on the given interface. @@ -816,13 +814,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (int_l2_pbb_vtr_cli, static) = { .path = "set interface l2 pbb-tag-rewrite", .short_help = "set interface l2 pbb-tag-rewrite <interface> [disable | pop | push | translate_pbb_stag <outer_tag> dmac <address> smac <address> s_id <nn> [b_vlanid <nn>]]", .function = int_l2_pbb_vtr, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/l2/l2_xcrw.c b/src/vnet/l2/l2_xcrw.c index d848fac6b72..9edd8b6ba57 100644 --- a/src/vnet/l2/l2_xcrw.c +++ b/src/vnet/l2/l2_xcrw.c @@ -238,7 +238,6 @@ VLIB_NODE_FN (l2_xcrw_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_xcrw_node) = { .name = "l2-xcrw", .vector_size = sizeof (u32), @@ -255,7 +254,6 @@ VLIB_REGISTER_NODE (l2_xcrw_node) = { [L2_XCRW_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT clib_error_t * @@ -279,12 +277,10 @@ format_xcrw_name (u8 * s, va_list * args) return format (s, "xcrw%d", dev_instance); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (xcrw_device_class,static) = { .name = "Xcrw", .format_device_name = format_xcrw_name, }; -/* *INDENT-ON* */ /* Create a sham tunnel interface and return its sw_if_index */ static u32 @@ -496,7 +492,6 @@ done: * @todo This is incomplete. This needs a detailed description and a * practical example. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_l2_xcrw_command, static) = { .path = "set interface l2 xcrw", .short_help = @@ -504,7 +499,6 @@ VLIB_CLI_COMMAND (set_l2_xcrw_command, static) = { " [del] [tx-fib-id <id>] [ipv6] rw <hex-bytes>", .function = set_l2_xcrw_command_fn, }; -/* *INDENT-ON* */ #endif /* CLIB_MARCH_VARIANT */ @@ -568,12 +562,10 @@ show_l2xcrw_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "%U", format_l2xcrw, 0, 0); - /* *INDENT-OFF* */ pool_foreach (t, xcm->tunnels) { vlib_cli_output (vm, "%U", format_l2xcrw, vnm, t); } - /* *INDENT-ON* */ return 0; } @@ -585,13 +577,11 @@ show_l2xcrw_command_fn (vlib_main_t * vm, * @todo This is incomplete. This needs a detailed description and a * practical example. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_l2xcrw_command, static) = { .path = "show l2xcrw", .short_help = "show l2xcrw", .function = show_l2xcrw_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/lawful-intercept/lawful_intercept.c b/src/vnet/lawful-intercept/lawful_intercept.c index fff44fc3a67..61b1a6165f4 100644 --- a/src/vnet/lawful-intercept/lawful_intercept.c +++ b/src/vnet/lawful-intercept/lawful_intercept.c @@ -92,14 +92,12 @@ set_li_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_li_command, static) = { .path = "set li", .short_help = "set li src <ip4-address> collector <ip4-address> udp-port <nnnn>", .function = set_li_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * li_init (vlib_main_t * vm) diff --git a/src/vnet/lawful-intercept/lawful_intercept.h b/src/vnet/lawful-intercept/lawful_intercept.h index e39fa0d0752..ba74204fb9e 100644 --- a/src/vnet/lawful-intercept/lawful_intercept.h +++ b/src/vnet/lawful-intercept/lawful_intercept.h @@ -36,12 +36,10 @@ typedef struct extern li_main_t li_main; -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { ip4_header_t ip4; udp_header_t udp; }) ip4_udp_header_t; -/* *INDENT-ON* */ extern vlib_node_registration_t li_hit_node; diff --git a/src/vnet/lawful-intercept/node.c b/src/vnet/lawful-intercept/node.c index c5328e672d0..86f135b9ea1 100644 --- a/src/vnet/lawful-intercept/node.c +++ b/src/vnet/lawful-intercept/node.c @@ -260,7 +260,6 @@ VLIB_NODE_FN (li_hit_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (li_hit_node) = { .name = "li-hit", .vector_size = sizeof (u32), @@ -277,7 +276,6 @@ VLIB_REGISTER_NODE (li_hit_node) = { [LI_HIT_NEXT_ETHERNET] = "ethernet-input-not-l2", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/llc/llc.c b/src/vnet/llc/llc.c index 4a7fdf9d9ba..4cbf17d48df 100644 --- a/src/vnet/llc/llc.c +++ b/src/vnet/llc/llc.c @@ -181,14 +181,12 @@ llc_build_rewrite (vnet_main_t * vnm, return (rewrite); } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (llc_hw_interface_class) = { .name = "LLC", .format_header = format_llc_header_with_length, .unformat_header = unformat_llc_header, .build_rewrite = llc_build_rewrite, }; -/* *INDENT-ON* */ static void add_protocol (llc_main_t * pm, llc_protocol_t protocol, char *protocol_name) diff --git a/src/vnet/llc/node.c b/src/vnet/llc/node.c index 086925bd305..d1ee6948269 100644 --- a/src/vnet/llc/node.c +++ b/src/vnet/llc/node.c @@ -246,7 +246,6 @@ static char *llc_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (llc_input_node) = { .function = llc_input, .name = "llc-input", @@ -267,7 +266,6 @@ VLIB_REGISTER_NODE (llc_input_node) = { .format_trace = format_llc_input_trace, .unformat_buffer = unformat_llc_header, }; -/* *INDENT-ON* */ static void llc_setup_node (vlib_main_t *vm, u32 node_index) diff --git a/src/vnet/mfib/mfib_types.c b/src/vnet/mfib/mfib_types.c index 19583ea18f4..755f656a7b2 100644 --- a/src/vnet/mfib/mfib_types.c +++ b/src/vnet/mfib/mfib_types.c @@ -253,7 +253,6 @@ mfib_show_route_flags (vlib_main_t * vm, /*? * This command displays the set of supported flags applicable to an MFIB route */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (mfib_route_flags_command, static) = { .path = "show mfib route flags", @@ -261,7 +260,6 @@ VLIB_CLI_COMMAND (mfib_route_flags_command, static) = .function = mfib_show_route_flags, .is_mp_safe = 1, }; -/* *INDENT-ON* */ clib_error_t * mfib_show_itf_flags (vlib_main_t * vm, @@ -282,7 +280,6 @@ mfib_show_itf_flags (vlib_main_t * vm, /*? * This command displays the set of supported flags applicable to an MFIB interface */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (mfib_itf_flags_command, static) = { .path = "show mfib itf flags", @@ -290,4 +287,3 @@ VLIB_CLI_COMMAND (mfib_itf_flags_command, static) = .function = mfib_show_itf_flags, .is_mp_safe = 1, }; -/* *INDENT-ON* */ diff --git a/src/vnet/misc.c b/src/vnet/misc.c index d1dcd6ecb23..ea816615a50 100644 --- a/src/vnet/misc.c +++ b/src/vnet/misc.c @@ -56,18 +56,14 @@ vnet_local_interface_tx (vlib_main_t * vm, return f->n_vectors; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (vnet_local_interface_device_class) = { .name = "local", .tx_function = vnet_local_interface_tx, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (vnet_local_interface_hw_class,static) = { .name = "local", }; -/* *INDENT-ON* */ clib_error_t * vnet_main_init (vlib_main_t * vm) @@ -92,7 +88,6 @@ vnet_main_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (vnet_main_init)= { .init_order = VLIB_INITS("vnet_interface_init", @@ -105,7 +100,6 @@ VLIB_INIT_FUNCTION (vnet_main_init)= "mpls_init", "vnet_main_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/mpls/mpls.c b/src/vnet/mpls/mpls.c index a04e1cf6985..7d922b003cc 100644 --- a/src/vnet/mpls/mpls.c +++ b/src/vnet/mpls/mpls.c @@ -436,13 +436,11 @@ vnet_mpls_table_cmd (vlib_main_t * vm, return error; } -/* *INDENT-ON* */ /*? * This command is used to add or delete MPLS Tables. All * Tables must be explicitly added before that can be used, * Including the default table. ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (mpls_table_command, static) = { .path = "mpls table", .short_help = "mpls table [add|del] <table-id>", diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c index dcda0a66310..58998a6576c 100644 --- a/src/vnet/mpls/mpls_api.c +++ b/src/vnet/mpls/mpls_api.c @@ -199,12 +199,10 @@ vl_api_mpls_route_add_del_t_handler (vl_api_mpls_route_add_del_t * mp) rv = mpls_route_add_del_t_handler (vnm, mp, &stats_index); - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_MPLS_ROUTE_ADD_DEL_REPLY, ({ rmp->stats_index = htonl (stats_index); })); - /* *INDENT-ON* */ } void @@ -270,13 +268,11 @@ vl_api_mpls_tunnel_add_del_t_handler (vl_api_mpls_tunnel_add_del_t * mp) vec_free (rpaths); out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_MPLS_TUNNEL_ADD_DEL_REPLY, ({ rmp->sw_if_index = ntohl(tunnel_sw_if_index); rmp->tunnel_index = ntohl(tunnel_index); })); - /* *INDENT-ON* */ } static void @@ -401,12 +397,10 @@ vl_api_mpls_table_dump_t_handler (vl_api_mpls_table_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (fib_table, mm->fibs) { send_mpls_table_details(am, reg, mp->context, fib_table); } - /* *INDENT-ON* */ } static void diff --git a/src/vnet/mpls/mpls_input.c b/src/vnet/mpls/mpls_input.c index c18cbda6315..0505d9a1829 100644 --- a/src/vnet/mpls/mpls_input.c +++ b/src/vnet/mpls/mpls_input.c @@ -278,10 +278,8 @@ static clib_error_t * mpls_input_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (mpls_input_init) = { .runs_after = VLIB_INITS("mpls_init"), }; -/* *INDENT-ON* */ #endif /* CLIB_MARCH_VARIANT */ diff --git a/src/vnet/osi/node.c b/src/vnet/osi/node.c index 4eb3e461139..9edc354cda7 100644 --- a/src/vnet/osi/node.c +++ b/src/vnet/osi/node.c @@ -239,7 +239,6 @@ static char *osi_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (osi_input_node) = { .function = osi_input, .name = "osi-input", @@ -260,7 +259,6 @@ VLIB_REGISTER_NODE (osi_input_node) = { .format_trace = format_osi_input_trace, .unformat_buffer = unformat_osi_header, }; -/* *INDENT-ON* */ static void osi_setup_node (vlib_main_t *vm, u32 node_index) diff --git a/src/vnet/pg/cli.c b/src/vnet/pg/cli.c index f289becebd2..3f2de2604b2 100644 --- a/src/vnet/pg/cli.c +++ b/src/vnet/pg/cli.c @@ -47,12 +47,10 @@ /* Root of all packet generator cli commands. */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_pg_command, static) = { .path = "packet-generator", .short_help = "Packet generator commands", }; -/* *INDENT-ON* */ void pg_enable_disable (u32 stream_index, int is_enable) @@ -63,11 +61,9 @@ pg_enable_disable (u32 stream_index, int is_enable) if (stream_index == ~0) { /* No stream specified: enable/disable all streams. */ - /* *INDENT-OFF* */ pool_foreach (s, pg->streams) { pg_stream_enable_disable (pg, s, is_enable); } - /* *INDENT-ON* */ } else { @@ -138,23 +134,19 @@ doit: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (enable_streams_cli, static) = { .path = "packet-generator enable-stream", .short_help = "Enable packet generator streams", .function = enable_disable_stream, .function_arg = 1, /* is_enable */ }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (disable_streams_cli, static) = { .path = "packet-generator disable-stream", .short_help = "Disable packet generator streams", .function = enable_disable_stream, .function_arg = 0, /* is_enable */ }; -/* *INDENT-ON* */ static u8 * format_pg_edit_group (u8 * s, va_list * va) @@ -210,12 +202,10 @@ format_pg_stream (u8 * s, va_list * va) if (verbose) { pg_edit_group_t *g; - /* *INDENT-OFF* */ vec_foreach (g, t->edit_groups) { s = format (s, "\n%U%U", format_white_space, indent, format_pg_edit_group, g); } - /* *INDENT-ON* */ } return s; @@ -244,23 +234,19 @@ show_streams (vlib_main_t * vm, } vlib_cli_output (vm, "%U", format_pg_stream, 0, 0); - /* *INDENT-OFF* */ pool_foreach (s, pg->streams) { vlib_cli_output (vm, "%U", format_pg_stream, s, verbose); } - /* *INDENT-ON* */ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_streams_cli, static) = { .path = "show packet-generator ", .short_help = "show packet-generator [verbose]", .function = show_streams, }; -/* *INDENT-ON* */ static clib_error_t * pg_pcap_read (pg_stream_t * s, char *file_name) @@ -505,7 +491,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (new_stream_cli, static) = { .path = "packet-generator new", .function = new_stream, @@ -523,7 +508,6 @@ VLIB_CLI_COMMAND (new_stream_cli, static) = { "rate PPS rate to transfer packet data\n" "maxframe NPKTS maximum number of packets per frame\n", }; -/* *INDENT-ON* */ static clib_error_t * del_stream (vlib_main_t * vm, @@ -541,13 +525,11 @@ del_stream (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (del_stream_cli, static) = { .path = "packet-generator delete", .function = del_stream, .short_help = "Delete stream with given name", }; -/* *INDENT-ON* */ static clib_error_t * change_stream_parameters (vlib_main_t * vm, @@ -588,13 +570,11 @@ change_stream_parameters (vlib_main_t * vm, return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (change_stream_parameters_cli, static) = { .path = "packet-generator configure", .short_help = "Change packet generator stream parameters", .function = change_stream_parameters, }; -/* *INDENT-ON* */ static clib_error_t * pg_capture_cmd_fn (vlib_main_t * vm, @@ -671,13 +651,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (pg_capture_cmd, static) = { .path = "packet-generator capture", .short_help = "packet-generator capture <interface name> pcap <filename> [count <n>]", .function = pg_capture_cmd_fn, }; -/* *INDENT-ON* */ static clib_error_t * create_pg_if_cmd_fn (vlib_main_t * vm, @@ -730,7 +708,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_pg_if_cmd, static) = { .path = "create packet-generator", .short_help = "create packet-generator interface <interface name>" @@ -738,7 +715,6 @@ VLIB_CLI_COMMAND (create_pg_if_cmd, static) = { " [mode <ethernet | ip4 | ip6>]", .function = create_pg_if_cmd_fn, }; -/* *INDENT-ON* */ /* Dummy init function so that we can be linked in. */ static clib_error_t * diff --git a/src/vnet/pg/input.c b/src/vnet/pg/input.c index f376c7443e5..f81485de65f 100644 --- a/src/vnet/pg/input.c +++ b/src/vnet/pg/input.c @@ -1816,17 +1816,14 @@ pg_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) if (vlib_num_workers ()) worker_index = vlib_get_current_worker_index (); - /* *INDENT-OFF* */ clib_bitmap_foreach (i, pg->enabled_streams[worker_index]) { pg_stream_t *s = vec_elt_at_index (pg->streams, i); n_packets += pg_input_stream (node, pg, s); } - /* *INDENT-ON* */ return n_packets; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (pg_input_node) = { .function = pg_input, .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, @@ -1839,7 +1836,6 @@ VLIB_REGISTER_NODE (pg_input_node) = { /* Input node will be left disabled until a stream is active. */ .state = VLIB_NODE_STATE_DISABLED, }; -/* *INDENT-ON* */ VLIB_NODE_FN (pg_input_mac_filter) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -1898,7 +1894,6 @@ VLIB_NODE_FN (pg_input_mac_filter) (vlib_main_t * vm, return (frame->n_vectors); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (pg_input_mac_filter) = { .name = "pg-input-mac-filter", .vector_size = sizeof (u32), @@ -1912,7 +1907,6 @@ VNET_FEATURE_INIT (pg_input_mac_filter_feat, static) = { .arc_name = "device-input", .node_name = "pg-input-mac-filter", }; -/* *INDENT-ON* */ static clib_error_t * pg_input_mac_filter_cfg (vlib_main_t * vm, @@ -1950,13 +1944,11 @@ pg_input_mac_filter_cfg (vlib_main_t * vm, return NULL; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (enable_streams_cli, static) = { .path = "packet-generator mac-filter", .short_help = "packet-generator mac-filter <INTERFACE> <on|off>", .function = pg_input_mac_filter_cfg, }; -/* *INDENT-ON* */ /* diff --git a/src/vnet/pg/pg_api.c b/src/vnet/pg/pg_api.c index 468c88ee8bb..e5d0a08a527 100644 --- a/src/vnet/pg/pg_api.c +++ b/src/vnet/pg/pg_api.c @@ -40,12 +40,10 @@ vl_api_pg_create_interface_t_handler (vl_api_pg_create_interface_t * mp) ntohl (mp->gso_size), 0, PG_MODE_ETHERNET); pg_interface_t *pi = pool_elt_at_index (pg->interfaces, pg_if_id); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_PG_CREATE_INTERFACE_REPLY, ({ rmp->sw_if_index = ntohl(pi->sw_if_index); })); - /* *INDENT-ON* */ } static void diff --git a/src/vnet/pg/stream.c b/src/vnet/pg/stream.c index d68551b1371..cf3d37d5e9e 100644 --- a/src/vnet/pg/stream.c +++ b/src/vnet/pg/stream.c @@ -171,7 +171,6 @@ pg_add_del_mac_address (vnet_hw_interface_t * hi, return (NULL); } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (pg_dev_class) = { .name = "pg", .tx_function = pg_output, @@ -180,7 +179,6 @@ VNET_DEVICE_CLASS (pg_dev_class) = { .admin_up_down_function = pg_interface_admin_up_down, .mac_addr_add_del_function = pg_add_del_mac_address, }; -/* *INDENT-ON* */ static u8 * pg_build_rewrite (vnet_main_t * vnm, @@ -197,12 +195,10 @@ pg_build_rewrite (vnet_main_t * vnm, return (rewrite); } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (pg_interface_class,static) = { .name = "Packet generator", .build_rewrite = pg_build_rewrite, }; -/* *INDENT-ON* */ static u32 pg_eth_flag_change (vnet_main_t * vnm, vnet_hw_interface_t * hi, u32 flags) diff --git a/src/vnet/policer/node_funcs.c b/src/vnet/policer/node_funcs.c index efa2f830f8c..2d2252d247a 100644 --- a/src/vnet/policer/node_funcs.c +++ b/src/vnet/policer/node_funcs.c @@ -670,7 +670,6 @@ VLIB_NODE_FN (ip4_policer_classify_node) (vlib_main_t * vm, POLICER_CLASSIFY_TABLE_IP4); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_policer_classify_node) = { .name = "ip4-policer-classify", .vector_size = sizeof (u32), @@ -682,7 +681,6 @@ VLIB_REGISTER_NODE (ip4_policer_classify_node) = { [POLICER_CLASSIFY_NEXT_INDEX_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (ip6_policer_classify_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -692,7 +690,6 @@ VLIB_NODE_FN (ip6_policer_classify_node) (vlib_main_t * vm, POLICER_CLASSIFY_TABLE_IP6); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_policer_classify_node) = { .name = "ip6-policer-classify", .vector_size = sizeof (u32), @@ -704,7 +701,6 @@ VLIB_REGISTER_NODE (ip6_policer_classify_node) = { [POLICER_CLASSIFY_NEXT_INDEX_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ VLIB_NODE_FN (l2_policer_classify_node) (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -713,7 +709,6 @@ VLIB_NODE_FN (l2_policer_classify_node) (vlib_main_t * vm, return policer_classify_inline (vm, node, frame, POLICER_CLASSIFY_TABLE_L2); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_policer_classify_node) = { .name = "l2-policer-classify", .vector_size = sizeof (u32), @@ -725,7 +720,6 @@ VLIB_REGISTER_NODE (l2_policer_classify_node) = { [POLICER_CLASSIFY_NEXT_INDEX_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT static clib_error_t * diff --git a/src/vnet/policer/policer.c b/src/vnet/policer/policer.c index 217a4c96389..eb7d40a340a 100644 --- a/src/vnet/policer/policer.c +++ b/src/vnet/policer/policer.c @@ -1008,13 +1008,11 @@ done: } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_policer_command, static) = { .path = "show policer", .short_help = "show policer [name <name> | index <index>]", .function = show_policer_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_policer_pools_command_fn (vlib_main_t * vm, @@ -1027,13 +1025,11 @@ show_policer_pools_command_fn (vlib_main_t * vm, pool_elts (pm->configs), pool_elts (pm->policers)); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_policer_pools_command, static) = { .path = "show policer pools", .short_help = "show policer pools", .function = show_policer_pools_command_fn, }; -/* *INDENT-ON* */ clib_error_t * policer_init (vlib_main_t * vm) diff --git a/src/vnet/ppp/node.c b/src/vnet/ppp/node.c index eead2b2f0c1..fa056bfb99f 100644 --- a/src/vnet/ppp/node.c +++ b/src/vnet/ppp/node.c @@ -265,7 +265,6 @@ static char *ppp_error_strings[] = { #undef ppp_error }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ppp_input_node) = { .function = ppp_input, .name = "ppp-input", @@ -288,7 +287,6 @@ VLIB_REGISTER_NODE (ppp_input_node) = { .format_trace = format_ppp_input_trace, .unformat_buffer = unformat_ppp_header, }; -/* *INDENT-ON* */ static clib_error_t * ppp_input_runtime_init (vlib_main_t * vm) diff --git a/src/vnet/ppp/ppp.c b/src/vnet/ppp/ppp.c index b1fafa13145..8aa8504fcdd 100644 --- a/src/vnet/ppp/ppp.c +++ b/src/vnet/ppp/ppp.c @@ -197,7 +197,6 @@ ppp_build_rewrite (vnet_main_t * vnm, return (rewrite); } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (ppp_hw_interface_class) = { .name = "PPP", .format_header = format_ppp_header_with_length, @@ -205,7 +204,6 @@ VNET_HW_INTERFACE_CLASS (ppp_hw_interface_class) = { .build_rewrite = ppp_build_rewrite, .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P, }; -/* *INDENT-ON* */ static void add_protocol (ppp_main_t * pm, ppp_protocol_t protocol, char *protocol_name) diff --git a/src/vnet/qos/qos_egress_map.c b/src/vnet/qos/qos_egress_map.c index 7985579d3cf..43c0c55df07 100644 --- a/src/vnet/qos/qos_egress_map.c +++ b/src/vnet/qos/qos_egress_map.c @@ -47,13 +47,11 @@ qos_egress_map_get_id (index_t qemi) qos_egress_map_id_t qid; index_t qmi; - /* *INDENT-OFF* */ hash_foreach(qid, qmi, qem_db, ({ if (qmi == qemi) return (qid); })); - /* *INDENT-OFF* */ return (~0); } @@ -129,12 +127,10 @@ qos_egress_map_walk (qos_egress_map_walk_cb_t fn, void *c) qos_egress_map_id_t qid; index_t qmi; - /* *INDENT-OFF* */ hash_foreach(qid, qmi, qem_db, ({ fn(qid, pool_elt_at_index(qem_pool, qmi), c); })); - /* *INDENT-OFF* */ } static clib_error_t * @@ -181,14 +177,12 @@ qos_egress_map_update_cli (vlib_main_t * vm, * @cliexpar * @cliexcmd{qos egress map id 0 [ip][4]=4} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (qos_egress_map_update_command, static) = { .path = "qos egress map", .short_help = "qos egress map id %d [delete] {[SOURCE][INPUT]=OUTPUT}", .function = qos_egress_map_update_cli, .is_mp_safe = 1, }; -/* *INDENT-ON* */ u8 *format_qos_egress_map (u8 * s, va_list * args) { @@ -239,7 +233,6 @@ VLIB_CLI_COMMAND (qos_egress_map_update_command, static) = { { index_t qemi; - /* *INDENT-OFF* */ hash_foreach(map_id, qemi, qem_db, ({ vlib_cli_output (vm, " Map-ID:%d\n%U", @@ -247,7 +240,6 @@ VLIB_CLI_COMMAND (qos_egress_map_update_command, static) = { format_qos_egress_map, pool_elt_at_index(qem_pool, qemi), 2); })); - /* *INDENT-ON* */ } else { @@ -274,14 +266,12 @@ VLIB_CLI_COMMAND (qos_egress_map_update_command, static) = { * @cliexpar * @cliexcmd{show qos egress map} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (qos_egress_map_show_command, static) = { .path = "show qos egress map", .short_help = "show qos egress map id %d", .function = qos_egress_map_show, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/qos/qos_mark.c b/src/vnet/qos/qos_mark.c index 44bb34bd010..3817c89a009 100644 --- a/src/vnet/qos/qos_mark.c +++ b/src/vnet/qos/qos_mark.c @@ -187,14 +187,12 @@ qos_mark_cli (vlib_main_t * vm, * @cliexpar * @cliexcmd{qos egress interface GigEthernet0/9/0 id 0 output ip} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (qos_egress_map_interface_command, static) = { .path = "qos mark", .short_help = "qos mark <SOURCE> <INTERFACE> id <MAP>", .function = qos_mark_cli, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static void qos_mark_show_one_interface (vlib_main_t * vm, u32 sw_if_index) @@ -271,14 +269,12 @@ qos_mark_show (vlib_main_t * vm, * @cliexpar * @cliexcmd{show qos egress map} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (qos_mark_show_command, static) = { .path = "show qos mark", .short_help = "show qos mark [interface]", .function = qos_mark_show, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/qos/qos_mark_node.c b/src/vnet/qos/qos_mark_node.c index f12e66b4fa0..16a487aede8 100644 --- a/src/vnet/qos/qos_mark_node.c +++ b/src/vnet/qos/qos_mark_node.c @@ -212,7 +212,6 @@ VLIB_NODE_FN (vlan_ip6_qos_mark_node) (vlib_main_t * vm, return (qos_mark_inline (vm, node, frame, QOS_SOURCE_VLAN, 0)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_qos_mark_node) = { .name = "ip4-qos-mark", .vector_size = sizeof (u32), @@ -330,7 +329,6 @@ VNET_FEATURE_INIT (vlan_mpls_qos_mark_node, static) = { .runs_after = VNET_FEATURES ("mpls-qos-mark"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/qos/qos_record.c b/src/vnet/qos/qos_record.c index d52c1442d8d..fdf79766471 100644 --- a/src/vnet/qos/qos_record.c +++ b/src/vnet/qos/qos_record.c @@ -203,14 +203,12 @@ qos_record_cli (vlib_main_t * vm, * @cliexpar * @cliexcmd{qos record ip GigEthernet0/1/0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (qos_record_command, static) = { .path = "qos record", .short_help = "qos record <record-source> <INTERFACE> [disable]", .function = qos_record_cli, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static void qos_record_show_one_interface (vlib_main_t * vm, u32 sw_if_index) @@ -285,14 +283,12 @@ qos_record_show (vlib_main_t * vm, * @cliexpar * @cliexcmd{show qos egress map} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (qos_record_show_command, static) = { .path = "show qos record", .short_help = "show qos record [interface]", .function = qos_record_show, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/qos/qos_record_node.c b/src/vnet/qos/qos_record_node.c index 75e1421dc08..1a34891f85d 100644 --- a/src/vnet/qos/qos_record_node.c +++ b/src/vnet/qos/qos_record_node.c @@ -222,7 +222,6 @@ VLIB_NODE_FN (l2_ip_qos_record_node) (vlib_main_t * vm, return (qos_record_inline (vm, node, frame, QOS_SOURCE_VLAN, 0, 1)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_qos_record_node) = { .name = "ip4-qos-record", .vector_size = sizeof (u32), @@ -372,7 +371,6 @@ VLIB_REGISTER_NODE (l2_ip_qos_record_node) = { [0] = "error-drop", }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/qos/qos_store.c b/src/vnet/qos/qos_store.c index 1e8a53bbdfc..3424a914e35 100644 --- a/src/vnet/qos/qos_store.c +++ b/src/vnet/qos/qos_store.c @@ -211,14 +211,12 @@ qos_store_cli (vlib_main_t * vm, * @cliexpar * @cliexcmd{qos store ip GigEthernet0/1/0} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (qos_store_command, static) = { .path = "qos store", .short_help = "qos store <store-source> <INTERFACE> [disable]", .function = qos_store_cli, .is_mp_safe = 1, }; -/* *INDENT-ON* */ static void qos_store_show_one_interface (vlib_main_t * vm, u32 sw_if_index) @@ -295,14 +293,12 @@ qos_store_show (vlib_main_t * vm, * @cliexpar * @cliexcmd{show qos egress map} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (qos_store_show_command, static) = { .path = "show qos store", .short_help = "show qos store [interface]", .function = qos_store_show, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/qos/qos_store_node.c b/src/vnet/qos/qos_store_node.c index 2273b2eac77..6a5ad24453d 100644 --- a/src/vnet/qos/qos_store_node.c +++ b/src/vnet/qos/qos_store_node.c @@ -121,7 +121,6 @@ VLIB_NODE_FN (ip6_qos_store_node) (vlib_main_t * vm, } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_qos_store_node) = { .name = "ip4-qos-store", .vector_size = sizeof (u32), @@ -168,7 +167,6 @@ VNET_FEATURE_INIT (ip6m_qos_store_node, static) = { .node_name = "ip6-qos-store", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c index 2c69138931d..c66548507e5 100644 --- a/src/vnet/session/application.c +++ b/src/vnet/session/application.c @@ -887,12 +887,10 @@ application_free (application_t * app) * Free workers */ - /* *INDENT-OFF* */ pool_flush (wrk_map, app->worker_maps, ({ app_wrk = app_worker_get (wrk_map->wrk_index); app_worker_free (app_wrk); })); - /* *INDENT-ON* */ pool_free (app->worker_maps); /* @@ -935,13 +933,11 @@ application_detach_process (application_t * app, u32 api_client_index) APP_DBG ("Detaching for app %v index %u api client index %u", app->name, app->app_index, api_client_index); - /* *INDENT-OFF* */ pool_foreach (wrk_map, app->worker_maps) { app_wrk = app_worker_get (wrk_map->wrk_index); if (app_wrk->api_client_index == api_client_index) vec_add1 (wrks, app_wrk->wrk_index); } - /* *INDENT-ON* */ if (!vec_len (wrks)) { @@ -1750,7 +1746,6 @@ application_format_listeners (application_t * app, int verbose) return; } - /* *INDENT-OFF* */ pool_foreach (wrk_map, app->worker_maps) { app_wrk = app_worker_get (wrk_map->wrk_index); if (hash_elts (app_wrk->listeners_table) == 0) @@ -1760,7 +1755,6 @@ application_format_listeners (application_t * app, int verbose) handle, sm_index, verbose); })); } - /* *INDENT-ON* */ } static void @@ -1775,12 +1769,10 @@ application_format_connects (application_t * app, int verbose) return; } - /* *INDENT-OFF* */ pool_foreach (wrk_map, app->worker_maps) { app_wrk = app_worker_get (wrk_map->wrk_index); app_worker_format_connects (app_wrk, verbose); } - /* *INDENT-ON* */ } u8 * @@ -1881,12 +1873,10 @@ format_application (u8 * s, va_list * args) format_memory_size, props->rx_fifo_size, format_memory_size, props->tx_fifo_size); - /* *INDENT-OFF* */ pool_foreach (wrk_map, app->worker_maps) { app_wrk = app_worker_get (wrk_map->wrk_index); s = format (s, "%U", format_app_worker, app_wrk); } - /* *INDENT-ON* */ return s; } @@ -1904,11 +1894,9 @@ application_format_all_listeners (vlib_main_t * vm, int verbose) application_format_listeners (0, verbose); - /* *INDENT-OFF* */ pool_foreach (app, app_main.app_pool) { application_format_listeners (app, verbose); } - /* *INDENT-ON* */ } void @@ -1924,11 +1912,9 @@ application_format_all_clients (vlib_main_t * vm, int verbose) application_format_connects (0, verbose); - /* *INDENT-OFF* */ pool_foreach (app, app_main.app_pool) { application_format_connects (app, verbose); } - /* *INDENT-ON* */ } static clib_error_t * @@ -1938,11 +1924,9 @@ show_certificate_command_fn (vlib_main_t * vm, unformat_input_t * input, app_cert_key_pair_t *ckpair; session_cli_return_if_not_enabled (); - /* *INDENT-OFF* */ pool_foreach (ckpair, app_main.cert_key_pair_store) { vlib_cli_output (vm, "%U", format_cert_key_pair, ckpair); } - /* *INDENT-ON* */ return 0; } @@ -1953,14 +1937,12 @@ appliction_format_app_mq (vlib_main_t * vm, application_t * app) app_worker_t *wrk; int i; - /* *INDENT-OFF* */ pool_foreach (map, app->worker_maps) { wrk = app_worker_get (map->wrk_index); vlib_cli_output (vm, "[A%d][%d]%U", app->app_index, map->wrk_index, format_svm_msg_q, wrk->event_queue); } - /* *INDENT-ON* */ for (i = 0; i < vec_len (app->rx_mqs); i++) vlib_cli_output (vm, "[A%d][R%d]%U", app->app_index, i, format_svm_msg_q, @@ -1981,11 +1963,9 @@ appliction_format_all_app_mq (vlib_main_t * vm) session_main_get_vpp_event_queue (i)); } - /* *INDENT-OFF* */ pool_foreach (app, app_main.app_pool) { appliction_format_app_mq (vm, app); } - /* *INDENT-ON* */ return 0; } diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h index c7ed5285ca4..4eee17eeda8 100644 --- a/src/vnet/session/application_interface.h +++ b/src/vnet/session/application_interface.h @@ -678,9 +678,7 @@ app_send_dgram_raw_gso (svm_fifo_t *f, app_session_transport_t *at, clib_memcpy_fast (&hdr.lcl_ip, &at->lcl_ip, sizeof (ip46_address_t)); hdr.lcl_port = at->lcl_port; hdr.gso_size = gso_size; - /* *INDENT-OFF* */ svm_fifo_seg_t segs[2] = {{ (u8 *) &hdr, sizeof (hdr) }, { data, len }}; - /* *INDENT-ON* */ rv = svm_fifo_enqueue_segments (f, segs, 2, 0 /* allow partial */ ); if (PREDICT_FALSE (rv < 0)) @@ -805,13 +803,11 @@ app_recv (app_session_t * s, u8 * data, u32 len) return app_recv_stream (s, data, len); } -/* *INDENT-OFF* */ static char *session_error_str[] = { #define _(sym, str) str, foreach_session_error #undef _ }; -/* *INDENT-ON* */ static inline u8 * format_session_error (u8 * s, va_list * args) diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c index 5bd1471b6fc..3cb743d10e0 100644 --- a/src/vnet/session/application_local.c +++ b/src/vnet/session/application_local.c @@ -1361,7 +1361,6 @@ ct_enable_disable (vlib_main_t * vm, u8 is_en) return 0; } -/* *INDENT-OFF* */ static const transport_proto_vft_t cut_thru_proto = { .enable = ct_enable_disable, .start_listen = ct_start_listen, @@ -1386,7 +1385,6 @@ static const transport_proto_vft_t cut_thru_proto = { .service_type = TRANSPORT_SERVICE_VC, }, }; -/* *INDENT-ON* */ static inline int ct_session_can_tx (session_t *s) diff --git a/src/vnet/session/application_namespace.c b/src/vnet/session/application_namespace.c index 03e41fdb22d..f547dcfc031 100644 --- a/src/vnet/session/application_namespace.c +++ b/src/vnet/session/application_namespace.c @@ -338,14 +338,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (app_ns_command, static) = { .path = "app ns", .short_help = "app ns [add|del] id <namespace-id> secret <secret> " "sw_if_index <sw_if_index> if <interface>", .function = app_ns_fn, }; -/* *INDENT-ON* */ u8 * format_app_namespace (u8 * s, va_list * args) @@ -386,7 +384,6 @@ app_namespace_show_api (vlib_main_t * vm, app_namespace_t * app_ns) vlib_cli_output (vm, "%12s%12s%5s", "app index", "wrk index", "fd"); - /* *INDENT-OFF* */ pool_foreach (cs, app_ns->app_sockets) { handle = (app_ns_api_handle_t *) &cs->private_data; cf = clib_file_get (&file_main, handle->aah_file_index); @@ -399,7 +396,6 @@ app_namespace_show_api (vlib_main_t * vm, app_namespace_t * app_ns) vlib_cli_output (vm, "%12d%12d%5u", app_wrk->app_index, app_wrk->wrk_map_index, cf->file_descriptor); } - /* *INDENT-ON* */ } static clib_error_t * @@ -493,13 +489,11 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_app_ns_command, static) = { .path = "show app ns", .short_help = "show app ns [id <id> [api-clients]]", .function = show_app_ns_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/session/application_worker.c b/src/vnet/session/application_worker.c index 64345e284e8..c2d0d3b0cf3 100644 --- a/src/vnet/session/application_worker.c +++ b/src/vnet/session/application_worker.c @@ -645,14 +645,12 @@ app_worker_first_listener (app_worker_t * app_wrk, u8 fib_proto, sst = session_type_from_proto_and_ip (transport_proto, fib_proto == FIB_PROTOCOL_IP4); - /* *INDENT-OFF* */ hash_foreach (handle, sm_index, app_wrk->listeners_table, ({ listener = listen_session_get_from_handle (handle); if (listener->session_type == sst && !(listener->flags & SESSION_F_PROXY)) return listener; })); - /* *INDENT-ON* */ return 0; } @@ -669,13 +667,11 @@ app_worker_proxy_listener (app_worker_t * app_wrk, u8 fib_proto, sst = session_type_from_proto_and_ip (transport_proto, fib_proto == FIB_PROTOCOL_IP4); - /* *INDENT-OFF* */ hash_foreach (handle, sm_index, app_wrk->listeners_table, ({ listener = listen_session_get_from_handle (handle); if (listener->session_type == sst && (listener->flags & SESSION_F_PROXY)) return listener; })); - /* *INDENT-ON* */ return 0; } diff --git a/src/vnet/session/mma_template.h b/src/vnet/session/mma_template.h index dc3545a4ffe..2c0230c2869 100644 --- a/src/vnet/session/mma_template.h +++ b/src/vnet/session/mma_template.h @@ -41,11 +41,9 @@ typedef struct { u32 action_index; u32 *next_indices; - /* *INDENT-OFF* */ RTT (mma_mask_or_match) mask; RTT (mma_mask_or_match) match; RTT (mma_mask_or_match) max_match; - /* *INDENT-ON* */ } RTT (mma_rule); typedef int (*RTT (rule_cmp_fn)) (RTT (mma_rule) * rule1, diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c index d459b73650a..80bebdca9b5 100644 --- a/src/vnet/session/segment_manager.c +++ b/src/vnet/session/segment_manager.c @@ -499,11 +499,9 @@ segment_manager_free (segment_manager_t * sm) * the manager is explicitly deleted/detached by the app. */ clib_rwlock_writer_lock (&sm->segments_rwlock); - /* *INDENT-OFF* */ pool_foreach (fifo_segment, sm->segments) { segment_manager_del_segment (sm, fifo_segment); } - /* *INDENT-ON* */ pool_free (sm->segments); clib_rwlock_writer_unlock (&sm->segments_rwlock); @@ -582,7 +580,6 @@ segment_manager_has_fifos (segment_manager_t * sm) fifo_segment_t *seg; u8 first = 1; - /* *INDENT-OFF* */ segment_manager_foreach_segment_w_lock (seg, sm, ({ if (CLIB_DEBUG && !first && !fifo_segment_has_fifos (seg) && !(fifo_segment_flags (seg) & FIFO_SEGMENT_F_IS_PREALLOCATED)) @@ -597,7 +594,6 @@ segment_manager_has_fifos (segment_manager_t * sm) return 1; } })); - /* *INDENT-ON* */ return 0; } @@ -617,7 +613,6 @@ segment_manager_del_sessions (segment_manager_t * sm) ASSERT (pool_elts (sm->segments) != 0); /* Across all fifo segments used by the server */ - /* *INDENT-OFF* */ segment_manager_foreach_segment_w_lock (fs, sm, ({ for (slice_index = 0; slice_index < fs->n_slices; slice_index++) { @@ -642,7 +637,6 @@ segment_manager_del_sessions (segment_manager_t * sm) * sessions if the segment can be removed. */ })); - /* *INDENT-ON* */ vec_foreach (handle, handles) { @@ -961,12 +955,10 @@ segment_manager_alloc_queue (fifo_segment_t * segment, fifo_evt_size = sizeof (session_event_t); notif_q_size = clib_max (16, props->evt_q_size >> 4); - /* *INDENT-OFF* */ svm_msg_q_ring_cfg_t rc[SESSION_MQ_N_RINGS] = { {props->evt_q_size, fifo_evt_size, 0}, {notif_q_size, session_evt_size, 0} }; - /* *INDENT-ON* */ cfg->consumer_pid = 0; cfg->n_rings = 2; cfg->q_nitems = props->evt_q_size; @@ -1125,13 +1117,11 @@ done: return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (segment_manager_show_command, static) = { .path = "show segment-manager", .short_help = "show segment-manager [segments][verbose][index <nn>]", .function = segment_manager_show_fn, }; -/* *INDENT-ON* */ void segment_manager_format_sessions (segment_manager_t * sm, int verbose) @@ -1160,7 +1150,6 @@ segment_manager_format_sessions (segment_manager_t * sm, int verbose) clib_rwlock_reader_lock (&sm->segments_rwlock); - /* *INDENT-OFF* */ pool_foreach (fs, sm->segments) { for (slice_index = 0; slice_index < fs->n_slices; slice_index++) { @@ -1192,7 +1181,6 @@ segment_manager_format_sessions (segment_manager_t * sm, int verbose) vec_free (s); } } - /* *INDENT-ON* */ clib_rwlock_reader_unlock (&sm->segments_rwlock); } diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 79681829e50..e2fd1644fbd 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -1432,13 +1432,11 @@ session_open_app (session_endpoint_cfg_t *rmt, session_handle_t *rsh) typedef int (*session_open_service_fn) (session_endpoint_cfg_t *, session_handle_t *); -/* *INDENT-OFF* */ static session_open_service_fn session_open_srv_fns[TRANSPORT_N_SERVICES] = { session_open_vc, session_open_cl, session_open_app, }; -/* *INDENT-ON* */ /** * Ask transport to open connection to remote transport endpoint. @@ -1771,14 +1769,12 @@ session_get_original_dst (transport_endpoint_t *i2o_src, original_dst_port); } -/* *INDENT-OFF* */ static session_fifo_rx_fn *session_tx_fns[TRANSPORT_TX_N_FNS] = { session_tx_fifo_peek_and_snd, session_tx_fifo_dequeue_and_snd, session_tx_fifo_dequeue_internal, session_tx_fifo_dequeue_and_snd }; -/* *INDENT-ON* */ void session_register_transport (transport_proto_t transport_proto, diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c index 759c6ea86cf..2ecb464e38c 100644 --- a/src/vnet/session/session_api.c +++ b/src/vnet/session/session_api.c @@ -620,7 +620,6 @@ vl_api_app_attach_t_handler (vl_api_app_attach_t * mp) } done: - /* *INDENT-OFF* */ REPLY_MACRO3 ( VL_API_APP_ATTACH_REPLY, ((!rv) ? vec_len (((fifo_segment_t *) a->segment)->ssvm.name) : 0), ({ @@ -643,7 +642,6 @@ done: rmp->segment_handle = clib_host_to_net_u64 (a->segment_handle); } })); - /* *INDENT-ON* */ if (n_fds) session_send_fds (reg, fds, n_fds); @@ -708,7 +706,6 @@ vl_api_app_worker_add_del_t_handler (vl_api_app_worker_add_del_t * mp) n_fds += 1; } - /* *INDENT-OFF* */ done: REPLY_MACRO3 ( VL_API_APP_WORKER_ADD_DEL_REPLY, @@ -729,7 +726,6 @@ done: } } })); - /* *INDENT-ON* */ if (n_fds) session_send_fds (reg, fds, n_fds); @@ -803,13 +799,11 @@ vl_api_app_namespace_add_del_t_handler (vl_api_app_namespace_add_del_t * mp) } vec_free (ns_id); - /* *INDENT-OFF* */ done: REPLY_MACRO2 (VL_API_APP_NAMESPACE_ADD_DEL_REPLY, ({ if (!rv) rmp->appns_index = clib_host_to_net_u32 (appns_index); })); - /* *INDENT-ON* */ } static void @@ -1092,7 +1086,6 @@ send_session_rules_table_details (session_rules_table_t * srt, u8 fib_proto, if (is_local || fib_proto == FIB_PROTOCOL_IP4) { u8 *tag = 0; - /* *INDENT-OFF* */ srt16 = &srt->session_rules_tables_16; pool_foreach (rule16, srt16->rules) { ri = mma_rules_table_rule_index_16 (srt16, rule16); @@ -1100,12 +1093,10 @@ send_session_rules_table_details (session_rules_table_t * srt, u8 fib_proto, send_session_rule_details4 (rule16, is_local, tp, appns_index, tag, reg, context); } - /* *INDENT-ON* */ } if (is_local || fib_proto == FIB_PROTOCOL_IP6) { u8 *tag = 0; - /* *INDENT-OFF* */ srt40 = &srt->session_rules_tables_40; pool_foreach (rule40, srt40->rules) { ri = mma_rules_table_rule_index_40 (srt40, rule40); @@ -1113,7 +1104,6 @@ send_session_rules_table_details (session_rules_table_t * srt, u8 fib_proto, send_session_rule_details6 (rule40, is_local, tp, appns_index, tag, reg, context); } - /* *INDENT-ON* */ } } @@ -1128,7 +1118,6 @@ vl_api_session_rules_dump_t_handler (vl_api_session_rules_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ session_table_foreach (st, ({ for (tp = 0; tp < TRANSPORT_N_PROTOS; tp++) { @@ -1138,7 +1127,6 @@ vl_api_session_rules_dump_t_handler (vl_api_session_rules_dump_t * mp) mp->context); } })); - /* *INDENT-ON* */ } static void @@ -1183,12 +1171,10 @@ vl_api_app_add_cert_key_pair_t_handler (vl_api_app_add_cert_key_pair_t * mp) rv = vnet_app_add_cert_key_pair (a); done: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_APP_ADD_CERT_KEY_PAIR_REPLY, ({ if (!rv) rmp->index = clib_host_to_net_u32 (a->index); })); - /* *INDENT-ON* */ } static void diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c index 5d514e7091c..569a77bccc1 100644 --- a/src/vnet/session/session_cli.c +++ b/src/vnet/session/session_cli.c @@ -342,7 +342,6 @@ session_cli_show_all_sessions (vlib_main_t * vm, int verbose) n_closed = 0; - /* *INDENT-OFF* */ pool_foreach (s, pool) { if (s->session_state >= SESSION_STATE_TRANSPORT_DELETED) { @@ -351,7 +350,6 @@ session_cli_show_all_sessions (vlib_main_t * vm, int verbose) } vlib_cli_output (vm, "%U", format_session, s, verbose); } - /* *INDENT-ON* */ if (!n_closed) vlib_cli_output (vm, "Thread %d: active sessions %u", thread_index, @@ -618,7 +616,6 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "%-" SESSION_CLI_ID_LEN "s%-24s", "Listener", "App"); - /* *INDENT-OFF* */ pool_foreach (s, smm->wrk[0].sessions) { if (s->session_state != SESSION_STATE_LISTENING || s->session_type != sst) @@ -628,7 +625,6 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "%U%-25v%", format_session, s, 0, app_name); } - /* *INDENT-ON* */ goto done; } @@ -658,7 +654,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (vlib_cli_show_session_command) = { .path = "show session", @@ -668,7 +663,6 @@ VLIB_CLI_COMMAND (vlib_cli_show_session_command) = "[protos] [states] ", .function = show_session_command_fn, }; -/* *INDENT-ON* */ static int clear_session (session_t * s) @@ -720,27 +714,23 @@ clear_session_command_fn (vlib_main_t * vm, unformat_input_t * input, if (clear_all) { - /* *INDENT-OFF* */ vec_foreach (wrk, smm->wrk) { pool_foreach (session, wrk->sessions) { clear_session (session); } }; - /* *INDENT-ON* */ } return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_session_command, static) = { .path = "clear session", .short_help = "clear session thread <thread> session <index>", .function = clear_session_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_session_fifo_trace_command_fn (vlib_main_t * vm, @@ -783,14 +773,12 @@ show_session_fifo_trace_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_session_fifo_trace_command, static) = { .path = "show session fifo trace", .short_help = "show session fifo trace <session>", .function = show_session_fifo_trace_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * session_replay_fifo_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -830,14 +818,12 @@ session_replay_fifo_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (session_replay_fifo_trace_command, static) = { .path = "session replay fifo", .short_help = "session replay fifo <session>", .function = session_replay_fifo_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * session_enable_disable_fn (vlib_main_t * vm, unformat_input_t * input, @@ -862,14 +848,12 @@ session_enable_disable_fn (vlib_main_t * vm, unformat_input_t * input, return vnet_session_enable_disable (vm, is_en); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (session_enable_disable_command, static) = { .path = "session", .short_help = "session [enable|disable]", .function = session_enable_disable_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_session_stats_fn (vlib_main_t *vm, unformat_input_t *input, diff --git a/src/vnet/session/session_debug.c b/src/vnet/session/session_debug.c index 39d1752bdc6..2a50adac5dd 100644 --- a/src/vnet/session/session_debug.c +++ b/src/vnet/session/session_debug.c @@ -52,14 +52,12 @@ show_session_dbg_clock_cycles_fn (vlib_main_t * vm, unformat_input_t * input, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_session_dbg_clock_cycles_command, static) = { .path = "show session dbg clock_cycles", .short_help = "show session dbg clock_cycles", .function = show_session_dbg_clock_cycles_fn, }; -/* *INDENT-ON* */ static_always_inline f64 session_dbg_time_now (u32 thread) @@ -92,14 +90,12 @@ clear_session_dbg_clock_cycles_fn (vlib_main_t * vm, unformat_input_t * input, } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_session_clock_cycles_command, static) = { .path = "clear session dbg clock_cycles", .short_help = "clear session dbg clock_cycles", .function = clear_session_dbg_clock_cycles_fn, }; -/* *INDENT-ON* */ void session_debug_init (void) @@ -328,7 +324,6 @@ session_node_lookup_fifo_event (svm_fifo_t * f, session_event_t * e) * Search pending events vector */ - /* *INDENT-OFF* */ clib_llist_foreach (wrk->event_elts, evt_list, pool_elt_at_index (wrk->event_elts, wrk->new_head), elt, ({ @@ -339,9 +334,7 @@ session_node_lookup_fifo_event (svm_fifo_t * f, session_event_t * e) goto done; } })); - /* *INDENT-ON* */ - /* *INDENT-OFF* */ clib_llist_foreach (wrk->event_elts, evt_list, pool_elt_at_index (wrk->event_elts, wrk->old_head), elt, ({ @@ -352,7 +345,6 @@ session_node_lookup_fifo_event (svm_fifo_t * f, session_event_t * e) goto done; } })); - /* *INDENT-ON* */ done: return found; diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c index 354fab53bc3..0755d29f915 100644 --- a/src/vnet/session/session_lookup.c +++ b/src/vnet/session/session_lookup.c @@ -37,7 +37,6 @@ static session_lookup_main_t sl_main; */ static u32 *fib_index_to_table_index[2]; -/* *INDENT-OFF* */ /* 16 octets */ typedef CLIB_PACKED (struct { union @@ -74,7 +73,6 @@ typedef CLIB_PACKED (struct { u64 as_u64[6]; }; }) v6_connection_key_t; -/* *INDENT-ON* */ typedef clib_bihash_kv_16_8_t session_kv4_t; typedef clib_bihash_kv_48_8_t session_kv6_t; @@ -1597,7 +1595,6 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (session_rule_command, static) = { .path = "session rule", @@ -1605,7 +1602,6 @@ VLIB_CLI_COMMAND (session_rule_command, static) = "<lcl-ip/plen> <lcl-port> <rmt-ip/plen> <rmt-port> action <action>", .function = session_rule_command_fn, }; -/* *INDENT-ON* */ void session_lookup_dump_rules_table (u32 fib_index, u8 fib_proto, @@ -1728,7 +1724,6 @@ show_session_rules_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_session_rules_command, static) = { .path = "show session rules", @@ -1736,7 +1731,6 @@ VLIB_CLI_COMMAND (show_session_rules_command, static) = "<lcl-port> <rmt-ip/plen> <rmt-port> scope <scope>]", .function = show_session_rules_command_fn, }; -/* *INDENT-ON* */ u8 * format_session_lookup_tables (u8 *s, va_list *args) diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c index 01dd669c5e5..0b9a5b4c4c0 100644 --- a/src/vnet/session/session_node.c +++ b/src/vnet/session/session_node.c @@ -1823,14 +1823,12 @@ session_event_dispatch_io (session_worker_t * wrk, vlib_node_runtime_t * node, clib_llist_put (wrk->event_elts, elt); } -/* *INDENT-OFF* */ static const u32 session_evt_msg_sizes[] = { #define _(symc, sym) \ [SESSION_CTRL_EVT_ ## symc] = sizeof (session_ ## sym ##_msg_t), foreach_session_ctrl_evt #undef _ }; -/* *INDENT-ON* */ always_inline void session_update_time_subscribers (session_main_t *smm, clib_time_type_t now, @@ -2068,7 +2066,6 @@ session_queue_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return n_tx_packets; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (session_queue_node) = { .function = session_queue_node_fn, .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, @@ -2079,7 +2076,6 @@ VLIB_REGISTER_NODE (session_queue_node) = { .error_counters = session_error_counters, .state = VLIB_NODE_STATE_DISABLED, }; -/* *INDENT-ON* */ static clib_error_t * session_wrk_tfd_read_ready (clib_file_t *cf) @@ -2183,7 +2179,6 @@ session_queue_process (vlib_main_t * vm, vlib_node_runtime_t * rt, return 0; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (session_queue_process_node) = { .function = session_queue_process, @@ -2191,7 +2186,6 @@ VLIB_REGISTER_NODE (session_queue_process_node) = .name = "session-queue-process", .state = VLIB_NODE_STATE_DISABLED, }; -/* *INDENT-ON* */ static_always_inline uword session_queue_pre_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -2204,7 +2198,6 @@ session_queue_pre_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, return session_queue_node_fn (vm, node, frame); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (session_queue_pre_input_node) = { .function = session_queue_pre_input_inline, @@ -2212,7 +2205,6 @@ VLIB_REGISTER_NODE (session_queue_pre_input_node) = .name = "session-queue-main", .state = VLIB_NODE_STATE_DISABLED, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/session/session_rules_table.c b/src/vnet/session/session_rules_table.c index 9b90c2cd9ff..70a702cf55c 100644 --- a/src/vnet/session/session_rules_table.c +++ b/src/vnet/session/session_rules_table.c @@ -605,11 +605,9 @@ session_rules_table_cli_dump (vlib_main_t * vm, session_rules_table_t * srt, srt4 = &srt->session_rules_tables_16; vlib_cli_output (vm, "IP4 rules"); - /* *INDENT-OFF* */ pool_foreach (sr4, srt4->rules) { vlib_cli_output (vm, "%U", format_session_rule4, srt, sr4); } - /* *INDENT-ON* */ } else if (fib_proto == FIB_PROTOCOL_IP6) @@ -619,11 +617,9 @@ session_rules_table_cli_dump (vlib_main_t * vm, session_rules_table_t * srt, srt6 = &srt->session_rules_tables_40; vlib_cli_output (vm, "IP6 rules"); - /* *INDENT-OFF* */ pool_foreach (sr6, srt6->rules) { vlib_cli_output (vm, "%U", format_session_rule6, srt, sr6); } - /* *INDENT-ON* */ } } diff --git a/src/vnet/session/session_rules_table.h b/src/vnet/session/session_rules_table.h index d61f2c60ca9..010d50a6398 100644 --- a/src/vnet/session/session_rules_table.h +++ b/src/vnet/session/session_rules_table.h @@ -23,7 +23,6 @@ #include <vnet/session/mma_16.h> #include <vnet/session/mma_40.h> -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { union @@ -53,7 +52,6 @@ typedef CLIB_PACKED (struct u64 as_u64[5]; }; }) session_mask_or_match_6_t; -/* *INDENT-ON* */ #define SESSION_RULE_TAG_MAX_LEN 64 #define SESSION_RULES_TABLE_INVALID_INDEX MMA_TABLE_INVALID_INDEX diff --git a/src/vnet/session/session_table.c b/src/vnet/session/session_table.c index cbb284d1301..dbbe771979c 100644 --- a/src/vnet/session/session_table.c +++ b/src/vnet/session/session_table.c @@ -245,7 +245,6 @@ format_session_table (u8 *s, va_list *args) return s; } -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON * diff --git a/src/vnet/session/session_table.h b/src/vnet/session/session_table.h index 8e10b2f9cbd..636b8d77bee 100644 --- a/src/vnet/session/session_table.h +++ b/src/vnet/session/session_table.h @@ -79,7 +79,6 @@ session_table_t *_get_session_tables (); pool_foreach (VAR, _get_session_tables ()) BODY #endif /* SRC_VNET_SESSION_SESSION_TABLE_H_ */ -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON * diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h index 3cd64c90995..e6ba1ecbc5f 100644 --- a/src/vnet/session/transport.h +++ b/src/vnet/session/transport.h @@ -66,7 +66,6 @@ typedef struct transport_send_params_ /* * Transport protocol virtual function table */ -/* *INDENT-OFF* */ typedef struct _transport_proto_vft { /* @@ -125,7 +124,6 @@ typedef struct _transport_proto_vft */ transport_options_t transport_options; } transport_proto_vft_t; -/* *INDENT-ON* */ extern transport_proto_vft_t *tp_vfts; diff --git a/src/vnet/snap/node.c b/src/vnet/snap/node.c index 2a42907321c..ad88b2b3a90 100644 --- a/src/vnet/snap/node.c +++ b/src/vnet/snap/node.c @@ -261,7 +261,6 @@ static char *snap_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (snap_input_node) = { .function = snap_input, .name = "snap-input", @@ -282,7 +281,6 @@ VLIB_REGISTER_NODE (snap_input_node) = { .format_trace = format_snap_input_trace, .unformat_buffer = unformat_snap_header, }; -/* *INDENT-ON* */ static void snap_setup_node (vlib_main_t *vm, u32 node_index) diff --git a/src/vnet/snap/snap.h b/src/vnet/snap/snap.h index f6b3be1847f..028df4ede66 100644 --- a/src/vnet/snap/snap.h +++ b/src/vnet/snap/snap.h @@ -75,7 +75,6 @@ typedef enum typedef union { - /* *INDENT-OFF* */ CLIB_PACKED (struct { /* OUI: organization unique identifier. */ u8 oui[3]; @@ -83,7 +82,6 @@ typedef union /* Per-OUI protocol. */ u16 protocol; }); - /* *INDENT-ON* */ u8 as_u8[5]; } snap_header_t; diff --git a/src/vnet/span/node.c b/src/vnet/span/node.c index ca5ea68ae90..56977b58dc2 100644 --- a/src/vnet/span/node.c +++ b/src/vnet/span/node.c @@ -84,7 +84,6 @@ span_mirror (vlib_main_t * vm, vlib_node_runtime_t * node, u32 sw_if_index0, if (PREDICT_FALSE (b0->flags & VNET_BUFFER_F_SPAN_CLONE)) return; - /* *INDENT-OFF* */ clib_bitmap_foreach (i, sm0->mirror_ports) { if (mirror_frames[i] == 0) @@ -122,7 +121,6 @@ span_mirror (vlib_main_t * vm, vlib_node_runtime_t * node, u32 sw_if_index0, } } } - /* *INDENT-ON* */ } static_always_inline uword @@ -304,7 +302,6 @@ VLIB_NODE_FN (span_l2_output_node) (vlib_main_t * vm, [0] = "error-drop" \ } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (span_input_node) = { span_node_defs, .name = "span-input", @@ -349,7 +346,6 @@ clib_error_t *span_init (vlib_main_t * vm) } VLIB_INIT_FUNCTION (span_init); -/* *INDENT-ON* */ #endif /* CLIB_MARCH_VARIANT */ #undef span_node_defs diff --git a/src/vnet/span/span.c b/src/vnet/span/span.c index 85ee0c2e566..bf5e20f4d14 100644 --- a/src/vnet/span/span.c +++ b/src/vnet/span/span.c @@ -166,13 +166,11 @@ set_interface_span_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_span_command, static) = { .path = "set interface span", .short_help = "set interface span <if-name> [l2] {disable | destination <if-name> [both|rx|tx]}", .function = set_interface_span_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_interfaces_span_command_fn (vlib_main_t * vm, @@ -191,7 +189,6 @@ show_interfaces_span_command_fn (vlib_main_t * vm, }; u8 *s = 0; - /* *INDENT-OFF* */ vec_foreach (si, sm->interfaces) { span_mirror_t * drxm = &si->mirror_rxtx[SPAN_FEAT_DEVICE][VLIB_RX]; @@ -232,18 +229,15 @@ show_interfaces_span_command_fn (vlib_main_t * vm, clib_bitmap_free (d); } } - /* *INDENT-ON* */ vec_free (s); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_interfaces_span_command, static) = { .path = "show interface span", .short_help = "Shows SPAN mirror table", .function = show_interfaces_span_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/span/span_api.c b/src/vnet/span/span_api.c index 300f619934e..f5b24bdf214 100644 --- a/src/vnet/span/span_api.c +++ b/src/vnet/span/span_api.c @@ -61,7 +61,6 @@ vl_api_sw_interface_span_dump_t_handler (vl_api_sw_interface_span_dump_t * mp) return; span_feat_t sf = mp->is_l2 ? SPAN_FEAT_L2 : SPAN_FEAT_DEVICE; - /* *INDENT-OFF* */ vec_foreach (si, sm->interfaces) { span_mirror_t * rxm = &si->mirror_rxtx[sf][VLIB_RX]; @@ -90,7 +89,6 @@ vl_api_sw_interface_span_dump_t_handler (vl_api_sw_interface_span_dump_t * mp) clib_bitmap_free (b); } } - /* *INDENT-ON* */ } #include <vnet/span/span.api.c> diff --git a/src/vnet/srmpls/sr_mpls_policy.c b/src/vnet/srmpls/sr_mpls_policy.c index 8f0804850f1..41cb71601e9 100644 --- a/src/vnet/srmpls/sr_mpls_policy.c +++ b/src/vnet/srmpls/sr_mpls_policy.c @@ -108,7 +108,6 @@ create_sl (mpls_sr_policy_t * sr_policy, mpls_label_t * sl, u32 weight) fib_route_path_t *paths = NULL; vec_add1 (paths, path); - /* *INDENT-OFF* */ fib_prefix_t pfx = { .fp_len = 21, .fp_proto = FIB_PROTOCOL_MPLS, @@ -116,7 +115,6 @@ create_sl (mpls_sr_policy_t * sr_policy, mpls_label_t * sl, u32 weight) .fp_eos = eos, .fp_payload_proto = DPO_PROTO_MPLS, }; - /* *INDENT-ON* */ fib_table_entry_path_add2 (0, &pfx, @@ -245,7 +243,6 @@ sr_mpls_policy_del (mpls_label_t bsid) /* remove each of the MPLS routes */ FOR_EACH_MPLS_EOS_BIT (eos) { - /* *INDENT-OFF* */ fib_prefix_t pfx = { .fp_len = 21, .fp_proto = FIB_PROTOCOL_MPLS, @@ -253,7 +250,6 @@ sr_mpls_policy_del (mpls_label_t bsid) .fp_eos = eos, .fp_payload_proto = DPO_PROTO_MPLS, }; - /* *INDENT-ON* */ fib_table_entry_path_remove2 (0, &pfx, FIB_SOURCE_SR, paths); } @@ -359,7 +355,6 @@ sr_mpls_policy_mod (mpls_label_t bsid, u8 operation, FOR_EACH_MPLS_EOS_BIT (eos) { - /* *INDENT-OFF* */ fib_prefix_t pfx = { .fp_len = 21, .fp_proto = FIB_PROTOCOL_MPLS, @@ -367,7 +362,6 @@ sr_mpls_policy_mod (mpls_label_t bsid, u8 operation, .fp_eos = eos, .fp_payload_proto = DPO_PROTO_MPLS, }; - /* *INDENT-ON* */ fib_table_entry_path_remove2 (0, &pfx, FIB_SOURCE_SR, paths); } @@ -411,7 +405,6 @@ sr_mpls_policy_mod (mpls_label_t bsid, u8 operation, FOR_EACH_MPLS_EOS_BIT (eos) { - /* *INDENT-OFF* */ fib_prefix_t pfx = { .fp_len = 21, .fp_proto = FIB_PROTOCOL_MPLS, @@ -419,7 +412,6 @@ sr_mpls_policy_mod (mpls_label_t bsid, u8 operation, .fp_eos = eos, .fp_payload_proto = DPO_PROTO_MPLS, }; - /* *INDENT-ON* */ fib_table_entry_path_remove2 (0, &pfx, FIB_SOURCE_SR, paths); } @@ -434,7 +426,6 @@ sr_mpls_policy_mod (mpls_label_t bsid, u8 operation, FOR_EACH_MPLS_EOS_BIT (eos) { - /* *INDENT-OFF* */ fib_prefix_t pfx = { .fp_len = 21, .fp_proto = FIB_PROTOCOL_MPLS, @@ -442,7 +433,6 @@ sr_mpls_policy_mod (mpls_label_t bsid, u8 operation, .fp_eos = eos, .fp_payload_proto = DPO_PROTO_MPLS, }; - /* *INDENT-ON* */ fib_table_entry_path_add2 (0, &pfx, @@ -568,7 +558,6 @@ sr_mpls_policy_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(sr_mpls_policy_command, static)= { .path = "sr mpls policy", @@ -577,7 +566,6 @@ VLIB_CLI_COMMAND(sr_mpls_policy_command, static)= .long_help = "TBD.\n", .function = sr_mpls_policy_command_fn, }; -/* *INDENT-ON* */ /** * @brief CLI to display onscreen all the SR MPLS policies @@ -597,11 +585,9 @@ show_sr_mpls_policies_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "SR MPLS policies:"); - /* *INDENT-OFF* */ pool_foreach (sr_policy, sm->sr_policies) { vec_add1(vec_policies, sr_policy); } - /* *INDENT-ON* */ vec_foreach_index (i, vec_policies) { @@ -647,14 +633,12 @@ show_sr_mpls_policies_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(show_sr_mpls_policies_command, static)= { .path = "show sr mpls policies", .short_help = "show sr mpls policies", .function = show_sr_mpls_policies_command_fn, }; -/* *INDENT-ON* */ /** * @brief Update the Endpoint,Color tuple of an SR policy @@ -888,14 +872,12 @@ cli_sr_mpls_policy_ec_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(cli_sr_mpls_policy_ec_command, static)= { .path = "sr mpls policy te", .short_help = "sr mpls policy te bsid xxxxx endpoint x.x.x.x color 12341234", .function = cli_sr_mpls_policy_ec_command_fn, }; -/* *INDENT-ON* */ /********************* SR MPLS Policy initialization ***********************/ /** diff --git a/src/vnet/srmpls/sr_mpls_steering.c b/src/vnet/srmpls/sr_mpls_steering.c index b12e78d2755..e8920df542b 100644 --- a/src/vnet/srmpls/sr_mpls_steering.c +++ b/src/vnet/srmpls/sr_mpls_steering.c @@ -770,7 +770,6 @@ sr_mpls_steer_policy_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(sr_mpls_steer_policy_command, static)= { .path = "sr mpls steer", @@ -785,7 +784,6 @@ VLIB_CLI_COMMAND(sr_mpls_steer_policy_command, static)= "\t\tsr steer l3 2001::/64 via next-hop 2001::1 color 1234 co 2 vpn-label 500\n", .function = sr_mpls_steer_policy_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_sr_mpls_steering_policies_command_fn (vlib_main_t * vm, @@ -799,11 +797,9 @@ show_sr_mpls_steering_policies_command_fn (vlib_main_t * vm, int i; vlib_cli_output (vm, "SR MPLS steering policies:"); - /* *INDENT-OFF* */ pool_foreach (steer_pl, sm->steer_policies) { vec_add1(steer_policies, steer_pl); } - /* *INDENT-ON* */ for (i = 0; i < vec_len (steer_policies); i++) { vlib_cli_output (vm, "=========================="); @@ -871,14 +867,12 @@ show_sr_mpls_steering_policies_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND(show_sr_mpls_steering_policies_command, static)= { .path = "show sr mpls steering policies", .short_help = "show sr mpls steering policies", .function = show_sr_mpls_steering_policies_command_fn, }; -/* *INDENT-ON* */ clib_error_t * sr_mpls_steering_init (vlib_main_t * vm) @@ -894,9 +888,7 @@ sr_mpls_steering_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION(sr_mpls_steering_init); -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/srv6/sr.h b/src/vnet/srv6/sr.h index 7d8aa732a65..c2867eb7508 100644 --- a/src/vnet/srv6/sr.h +++ b/src/vnet/srv6/sr.h @@ -56,13 +56,11 @@ #define SR_SEGMENT_LIST_WEIGHT_DEFAULT 1 -/* *INDENT-OFF* */ typedef struct { ip6_header_t ip; ip6_sr_header_t sr; } __attribute__ ((packed)) ip6srv_combo_header_t; -/* *INDENT-ON* */ /** * @brief SR Segment List (SID list) diff --git a/src/vnet/srv6/sr_api.c b/src/vnet/srv6/sr_api.c index 5594fed44f6..da774c4325f 100644 --- a/src/vnet/srv6/sr_api.c +++ b/src/vnet/srv6/sr_api.c @@ -321,12 +321,10 @@ static void vl_api_sr_localsids_dump_t_handler if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (t, sm->localsids) { send_sr_localsid_details(t, reg, mp->context); } - /* *INDENT-ON* */ } static void @@ -453,12 +451,10 @@ vl_api_sr_policies_dump_t_handler (vl_api_sr_policies_dump_t * mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (t, sm->sr_policies) { send_sr_policies_details(t, reg, mp->context); } - /* *INDENT-ON* */ } static void @@ -583,12 +579,10 @@ static void if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (t, sm->sr_policies) { send_sr_policies_details_with_sl_index(t, reg, mp->context); } - /* *INDENT-ON* */ } static void send_sr_steering_pol_details @@ -630,12 +624,10 @@ static void vl_api_sr_steering_pol_dump_t_handler if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (t, sm->steer_policies) { send_sr_steering_pol_details(t, reg, mp->context); } - /* *INDENT-ON* */ } #include <vnet/srv6/sr.api.c> diff --git a/src/vnet/srv6/sr_localsid.c b/src/vnet/srv6/sr_localsid.c index a055c923be9..12349bb95e8 100644 --- a/src/vnet/srv6/sr_localsid.c +++ b/src/vnet/srv6/sr_localsid.c @@ -396,12 +396,10 @@ sr_cli_localsid_command_fn (vlib_main_t * vm, unformat_input_t * input, sr_localsid_fn_registration_t **plugin_it = 0; /* Create a vector out of the plugin pool as recommended */ - /* *INDENT-OFF* */ pool_foreach (plugin, sm->plugin_functions) { vec_add1 (vec_plugins, plugin); } - /* *INDENT-ON* */ vec_foreach (plugin_it, vec_plugins) { @@ -506,7 +504,6 @@ sr_cli_localsid_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (sr_localsid_command, static) = { .path = "sr localsid", .short_help = "sr localsid (del) address XX:XX::YY:YY" @@ -534,7 +531,6 @@ VLIB_CLI_COMMAND (sr_localsid_command, static) = { "\t\tParameters: '<ip4_fib_table>'\n", .function = sr_cli_localsid_command_fn, }; -/* *INDENT-ON* */ /** * @brief CLI function to 'show' all SR LocalSIDs on console. @@ -551,9 +547,7 @@ show_sr_localsid_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "SRv6 - My LocalSID Table:"); vlib_cli_output (vm, "========================="); - /* *INDENT-OFF* */ pool_foreach (ls, sm->localsids) { vec_add1 (localsid_list, ls); } - /* *INDENT-ON* */ for (i = 0; i < vec_len (localsid_list); i++) { ls = localsid_list[i]; @@ -676,13 +670,11 @@ show_sr_localsid_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_sr_localsid_command, static) = { .path = "show sr localsids", .short_help = "show sr localsids", .function = show_sr_localsid_command_fn, }; -/* *INDENT-ON* */ /** * @brief Function to 'clear' ALL SR localsid counters @@ -700,13 +692,11 @@ clear_sr_localsid_counters_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_sr_localsid_counters_command, static) = { .path = "clear sr localsid-counters", .short_help = "clear sr localsid-counters", .function = clear_sr_localsid_counters_command_fn, }; -/* *INDENT-ON* */ /************************ SR LocalSID graphs node ****************************/ /** @@ -1438,7 +1428,6 @@ sr_localsid_d_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_localsid_d_node) = { .function = sr_localsid_d_fn, .name = "sr-localsid-d", @@ -1454,7 +1443,6 @@ VLIB_REGISTER_NODE (sr_localsid_d_node) = { #undef _ }, }; -/* *INDENT-ON* */ /** * @brief SR LocalSID graph node. Supports all default SR Endpoint without decaps @@ -1748,7 +1736,6 @@ sr_localsid_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_localsid_node) = { .function = sr_localsid_fn, .name = "sr-localsid", @@ -1764,7 +1751,6 @@ VLIB_REGISTER_NODE (sr_localsid_node) = { #undef _ }, }; -/* *INDENT-ON* */ /** * @brief SR LocalSID uN graph node. Supports all default SR Endpoint without decaps @@ -2058,7 +2044,6 @@ sr_localsid_un_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_localsid_un_node) = { .function = sr_localsid_un_fn, .name = "sr-localsid-un", @@ -2074,7 +2059,6 @@ VLIB_REGISTER_NODE (sr_localsid_un_node) = { #undef _ }, }; -/* *INDENT-ON* */ static uword sr_localsid_un_perf_fn (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -2270,7 +2254,6 @@ sr_localsid_un_perf_fn (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_localsid_un_perf_node) = { .function = sr_localsid_un_perf_fn, .name = "sr-localsid-un-perf", @@ -2286,7 +2269,6 @@ VLIB_REGISTER_NODE (sr_localsid_un_perf_node) = { #undef _ }, }; -/* *INDENT-ON* */ static u8 * format_sr_dpo (u8 * s, va_list * args) @@ -2406,10 +2388,8 @@ show_sr_localsid_behaviors_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "SR LocalSIDs behaviors:\n-----------------------\n\n"); - /* *INDENT-OFF* */ pool_foreach (plugin, sm->plugin_functions) { vec_add1 (plugins_vec, plugin); } - /* *INDENT-ON* */ /* Print static behaviors */ vlib_cli_output (vm, "Default behaviors:\n" @@ -2439,13 +2419,11 @@ show_sr_localsid_behaviors_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_sr_localsid_behaviors_command, static) = { .path = "show sr localsids behaviors", .short_help = "show sr localsids behaviors", .function = show_sr_localsid_behaviors_command_fn, }; -/* *INDENT-ON* */ /** * @brief SR LocalSID initialization diff --git a/src/vnet/srv6/sr_policy_rewrite.c b/src/vnet/srv6/sr_policy_rewrite.c index 69a4d5e398c..0aa88cc273e 100644 --- a/src/vnet/srv6/sr_policy_rewrite.c +++ b/src/vnet/srv6/sr_policy_rewrite.c @@ -142,13 +142,11 @@ set_sr_src_command_fn (vlib_main_t * vm, unformat_input_t * input, return clib_error_return (0, "No address specified"); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_sr_src_command, static) = { .path = "set sr encaps source", .short_help = "set sr encaps source addr <ip6_addr>", .function = set_sr_src_command_fn, }; -/* *INDENT-ON* */ /******************** SR rewrite set encaps IPv6 hop-limit ********************/ @@ -180,13 +178,11 @@ set_sr_hop_limit_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_sr_hop_limit_command, static) = { .path = "set sr encaps hop-limit", .short_help = "set sr encaps hop-limit <value>", .function = set_sr_hop_limit_command_fn, }; -/* *INDENT-ON* */ /*********************** SR rewrite string computation ************************/ /** @@ -1033,12 +1029,10 @@ sr_policy_command_fn (vlib_main_t * vm, unformat_input_t * input, sr_policy_fn_registration_t *plugin = 0, **vec_plugins = 0; sr_policy_fn_registration_t **plugin_it = 0; - /* *INDENT-OFF* */ pool_foreach (plugin, sm->policy_plugin_functions) { vec_add1 (vec_plugins, plugin); } - /* *INDENT-ON* */ vec_foreach (plugin_it, vec_plugins) { @@ -1133,7 +1127,6 @@ sr_policy_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (sr_policy_command, static) = { .path = "sr policy", .short_help = "sr policy [add||del||mod] [bsid 2001::1||index 5] " @@ -1153,7 +1146,6 @@ VLIB_CLI_COMMAND (sr_policy_command, static) = { "SID lists.\n", .function = sr_policy_command_fn, }; -/* *INDENT-ON* */ /** * @brief CLI to display onscreen all the SR policies @@ -1173,10 +1165,8 @@ show_sr_policies_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_output (vm, "SR policies:"); - /* *INDENT-OFF* */ pool_foreach (sr_policy, sm->sr_policies) {vec_add1 (vec_policies, sr_policy); } - /* *INDENT-ON* */ vec_foreach_index (i, vec_policies) { @@ -1228,13 +1218,11 @@ show_sr_policies_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_sr_policies_command, static) = { .path = "show sr policies", .short_help = "show sr policies", .function = show_sr_policies_command_fn, }; -/* *INDENT-ON* */ /** * @brief CLI to display onscreen the SR encaps source addr @@ -1249,13 +1237,11 @@ show_sr_encaps_source_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_sr_encaps_source_command, static) = { .path = "show sr encaps source addr", .short_help = "show sr encaps source addr", .function = show_sr_encaps_source_command_fn, }; -/* *INDENT-ON* */ /** * @brief CLI to display onscreen the hop-limit value used for SRv6 encapsulation @@ -1270,13 +1256,11 @@ show_sr_encaps_hop_limit_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_sr_encaps_hop_limit_command, static) = { .path = "show sr encaps hop-limit", .short_help = "show sr encaps hop-limit", .function = show_sr_encaps_hop_limit_command_fn, }; -/* *INDENT-ON* */ /*************************** SR rewrite graph node ****************************/ /** @@ -1594,7 +1578,6 @@ sr_policy_rewrite_encaps (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_policy_rewrite_encaps_node) = { .function = sr_policy_rewrite_encaps, .name = "sr-pl-rewrite-encaps", @@ -1610,7 +1593,6 @@ VLIB_REGISTER_NODE (sr_policy_rewrite_encaps_node) = { #undef _ }, }; -/* *INDENT-ON* */ /** * @brief IPv4 encapsulation processing as per RFC2473 @@ -1887,7 +1869,6 @@ sr_policy_rewrite_encaps_v4 (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_policy_rewrite_encaps_v4_node) = { .function = sr_policy_rewrite_encaps_v4, .name = "sr-pl-rewrite-encaps-v4", @@ -1903,7 +1884,6 @@ VLIB_REGISTER_NODE (sr_policy_rewrite_encaps_v4_node) = { #undef _ }, }; -/* *INDENT-ON* */ always_inline u32 ip_flow_hash (void *data) @@ -2329,7 +2309,6 @@ sr_policy_rewrite_encaps_l2 (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_policy_rewrite_encaps_l2_node) = { .function = sr_policy_rewrite_encaps_l2, .name = "sr-pl-rewrite-encaps-l2", @@ -2345,7 +2324,6 @@ VLIB_REGISTER_NODE (sr_policy_rewrite_encaps_l2_node) = { #undef _ }, }; -/* *INDENT-ON* */ /** * @brief Graph node for applying a SR policy into a packet. SRH insertion. @@ -2751,7 +2729,6 @@ sr_policy_rewrite_insert (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_policy_rewrite_insert_node) = { .function = sr_policy_rewrite_insert, .name = "sr-pl-rewrite-insert", @@ -2767,7 +2744,6 @@ VLIB_REGISTER_NODE (sr_policy_rewrite_insert_node) = { #undef _ }, }; -/* *INDENT-ON* */ /** * @brief Graph node for applying a SR policy into a packet. BSID - SRH insertion. @@ -3162,7 +3138,6 @@ sr_policy_rewrite_b_insert (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_policy_rewrite_b_insert_node) = { .function = sr_policy_rewrite_b_insert, .name = "sr-pl-rewrite-b-insert", @@ -3178,7 +3153,6 @@ VLIB_REGISTER_NODE (sr_policy_rewrite_b_insert_node) = { #undef _ }, }; -/* *INDENT-ON* */ /** * @brief Function BSID encapsulation @@ -3473,7 +3447,6 @@ sr_policy_rewrite_b_encaps (vlib_main_t * vm, vlib_node_runtime_t * node, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (sr_policy_rewrite_b_encaps_node) = { .function = sr_policy_rewrite_b_encaps, .name = "sr-pl-rewrite-b-encaps", @@ -3489,7 +3462,6 @@ VLIB_REGISTER_NODE (sr_policy_rewrite_b_encaps_node) = { #undef _ }, }; -/* *INDENT-ON* */ /*************************** SR Policy plugins ******************************/ /** @@ -3557,10 +3529,8 @@ show_sr_policy_behaviors_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "SR Policy behaviors:\n-----------------------\n\n"); - /* *INDENT-OFF* */ pool_foreach (plugin, sm->policy_plugin_functions) { vec_add1 (plugins_vec, plugin); } - /* *INDENT-ON* */ vlib_cli_output (vm, "Plugin behaviors:\n"); for (i = 0; i < vec_len (plugins_vec); i++) @@ -3573,13 +3543,11 @@ show_sr_policy_behaviors_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_sr_policy_behaviors_command, static) = { .path = "show sr policy behaviors", .short_help = "show sr policy behaviors", .function = show_sr_policy_behaviors_command_fn, }; -/* *INDENT-ON* */ /*************************** SR Segment Lists DPOs ****************************/ static u8 * diff --git a/src/vnet/srv6/sr_steering.c b/src/vnet/srv6/sr_steering.c index 6e5c5e0e9f0..94c3d67a27a 100644 --- a/src/vnet/srv6/sr_steering.c +++ b/src/vnet/srv6/sr_steering.c @@ -456,7 +456,6 @@ sr_steer_policy_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (sr_steer_policy_command, static) = { .path = "sr steer", .short_help = "sr steer (del) [l3 <ip_addr/mask>|l2 <sf_if>] " @@ -471,7 +470,6 @@ VLIB_CLI_COMMAND (sr_steer_policy_command, static) = { "\t\tsr steer del l3 2001::/64 via sr_policy index 5\n", .function = sr_steer_policy_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_sr_steering_policies_command_fn (vlib_main_t * vm, @@ -488,9 +486,7 @@ show_sr_steering_policies_command_fn (vlib_main_t * vm, int i; vlib_cli_output (vm, "SR steering policies:"); - /* *INDENT-OFF* */ pool_foreach (steer_pl, sm->steer_policies) {vec_add1(steer_policies, steer_pl);} - /* *INDENT-ON* */ vlib_cli_output (vm, "Traffic\t\tSR policy BSID"); for (i = 0; i < vec_len (steer_policies); i++) { @@ -523,13 +519,11 @@ show_sr_steering_policies_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_sr_steering_policies_command, static) = { .path = "show sr steering-policies", .short_help = "show sr steering-policies", .function = show_sr_steering_policies_command_fn, }; -/* *INDENT-ON* */ clib_error_t * sr_steering_init (vlib_main_t * vm) @@ -547,18 +541,14 @@ sr_steering_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (sr_steering_init); -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (sr_pl_rewrite_encaps_l2, static) = { .arc_name = "device-input", .node_name = "sr-pl-rewrite-encaps-l2", .runs_before = VNET_FEATURES ("ethernet-input"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/syslog/syslog.c b/src/vnet/syslog/syslog.c index 8f3313950e8..caa55830eb3 100644 --- a/src/vnet/syslog/syslog.c +++ b/src/vnet/syslog/syslog.c @@ -506,7 +506,6 @@ show_syslog_filter_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ /*? * Set syslog sender configuration. * @@ -599,7 +598,6 @@ VLIB_CLI_COMMAND (show_syslog_filter_command, static) = { .short_help = "show syslog filter", .function = show_syslog_filter_command_fn, }; -/* *INDENT-ON* */ static clib_error_t * syslog_init (vlib_main_t * vm) diff --git a/src/vnet/syslog/syslog_api.c b/src/vnet/syslog/syslog_api.c index 21e79c6e2bd..195a6e52eef 100644 --- a/src/vnet/syslog/syslog_api.c +++ b/src/vnet/syslog/syslog_api.c @@ -128,7 +128,6 @@ vl_api_syslog_get_sender_t_handler (vl_api_syslog_get_sender_t * mp) syslog_main_t *sm = &syslog_main; u32 vrf_id; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SYSLOG_GET_SENDER_REPLY, ({ clib_memcpy (&rmp->collector_address, &(sm->collector), @@ -143,7 +142,6 @@ vl_api_syslog_get_sender_t_handler (vl_api_syslog_get_sender_t * mp) rmp->vrf_id = vrf_id; rmp->max_msg_size = htonl (sm->max_msg_size); })) - /* *INDENT-ON* */ } static void @@ -171,12 +169,10 @@ vl_api_syslog_get_filter_t_handler (vl_api_syslog_get_filter_t * mp) vl_api_syslog_get_filter_reply_t *rmp; syslog_main_t *sm = &syslog_main; - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_SYSLOG_GET_FILTER_REPLY, ({ rv = syslog_severity_encode (sm->severity_filter, &rmp->severity); })) - /* *INDENT-ON* */ } #include <vnet/syslog/syslog.api.c> diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index c00685dba0c..efc72a227e8 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -1223,7 +1223,6 @@ tcp_timer_waitclose_handler (tcp_connection_t * tc) } } -/* *INDENT-OFF* */ static timer_expiration_handler *timer_expiration_handlers[TCP_N_TIMERS] = { tcp_timer_retransmit_handler, @@ -1231,7 +1230,6 @@ static timer_expiration_handler *timer_expiration_handlers[TCP_N_TIMERS] = tcp_timer_waitclose_handler, tcp_timer_retransmit_syn_handler, }; -/* *INDENT-ON* */ static void tcp_dispatch_pending_timers (tcp_worker_ctx_t * wrk) @@ -1339,7 +1337,6 @@ tcp_session_app_rx_evt (transport_connection_t *conn) return 0; } -/* *INDENT-OFF* */ const static transport_proto_vft_t tcp_proto = { .enable = vnet_tcp_enable_disable, .start_listen = tcp_session_bind, @@ -1370,7 +1367,6 @@ const static transport_proto_vft_t tcp_proto = { .service_type = TRANSPORT_SERVICE_VC, }, }; -/* *INDENT-ON* */ void tcp_connection_tx_pacer_update (tcp_connection_t * tc) diff --git a/src/vnet/tcp/tcp_bt.c b/src/vnet/tcp/tcp_bt.c index 67e9a14ceda..3cb57a550de 100644 --- a/src/vnet/tcp/tcp_bt.c +++ b/src/vnet/tcp/tcp_bt.c @@ -638,11 +638,9 @@ tcp_bt_flush_samples (tcp_connection_t * tc) vec_validate (samples, pool_elts (bt->samples) - 1); vec_reset_length (samples); - /* *INDENT-OFF* */ pool_foreach (bts, bt->samples) { vec_add1 (samples, bts - bt->samples); } - /* *INDENT-ON* */ vec_foreach (si, samples) { diff --git a/src/vnet/tcp/tcp_cli.c b/src/vnet/tcp/tcp_cli.c index f7d26ff79d0..b04c0bdc0cf 100644 --- a/src/vnet/tcp/tcp_cli.c +++ b/src/vnet/tcp/tcp_cli.c @@ -613,14 +613,12 @@ tcp_src_address_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tcp_src_address_command, static) = { .path = "tcp src-address", .short_help = "tcp src-address <ip-addr> [- <ip-addr>] add src address range", .function = tcp_src_address_fn, }; -/* *INDENT-ON* */ static u8 * tcp_scoreboard_dump_trace (u8 * s, sack_scoreboard_t * sb) @@ -676,14 +674,12 @@ tcp_show_scoreboard_trace_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tcp_show_scoreboard_trace_command, static) = { .path = "show tcp scoreboard trace", .short_help = "show tcp scoreboard trace <connection>", .function = tcp_show_scoreboard_trace_fn, }; -/* *INDENT-ON* */ u8 * tcp_scoreboard_replay (u8 * s, tcp_connection_t * tc, u8 verbose) @@ -801,14 +797,12 @@ tcp_scoreboard_trace_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tcp_replay_scoreboard_command, static) = { .path = "tcp replay scoreboard", .short_help = "tcp replay scoreboard <connection>", .function = tcp_scoreboard_trace_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_tcp_punt_fn (vlib_main_t * vm, unformat_input_t * input, @@ -824,14 +818,12 @@ show_tcp_punt_fn (vlib_main_t * vm, unformat_input_t * input, tm->punt_unknown6 ? "enabled" : "disabled"); return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_tcp_punt_command, static) = { .path = "show tcp punt", .short_help = "show tcp punt", .function = show_tcp_punt_fn, }; -/* *INDENT-ON* */ static clib_error_t * show_tcp_stats_fn (vlib_main_t * vm, unformat_input_t * input, @@ -863,14 +855,12 @@ show_tcp_stats_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_tcp_stats_command, static) = { .path = "show tcp stats", .short_help = "show tcp stats", .function = show_tcp_stats_fn, }; -/* *INDENT-ON* */ static clib_error_t * clear_tcp_stats_fn (vlib_main_t * vm, unformat_input_t * input, @@ -893,14 +883,12 @@ clear_tcp_stats_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (clear_tcp_stats_command, static) = { .path = "clear tcp stats", .short_help = "clear tcp stats", .function = clear_tcp_stats_fn, }; -/* *INDENT-ON* */ uword unformat_tcp_cc_algo (unformat_input_t * input, va_list * va) diff --git a/src/vnet/tcp/tcp_debug.c b/src/vnet/tcp/tcp_debug.c index 309b6951559..ab466f30efb 100644 --- a/src/vnet/tcp/tcp_debug.c +++ b/src/vnet/tcp/tcp_debug.c @@ -134,14 +134,12 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (tcp_debug_command, static) = { .path = "tcp debug", .short_help = "tcp [show] [debug group <N> level <N>]", .function = tcp_debug_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 914295ab064..70b5d28e0cc 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -1466,7 +1466,6 @@ VLIB_NODE_FN (tcp6_established_node) (vlib_main_t * vm, return tcp46_established_inline (vm, node, from_frame, 0 /* is_ip4 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp4_established_node) = { .name = "tcp4-established", /* Takes a vector of packets. */ @@ -1475,9 +1474,7 @@ VLIB_REGISTER_NODE (tcp4_established_node) = { .error_counters = tcp_input_error_counters, .format_trace = format_tcp_rx_trace_short, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp6_established_node) = { .name = "tcp6-established", /* Takes a vector of packets. */ @@ -1486,7 +1483,6 @@ VLIB_REGISTER_NODE (tcp6_established_node) = { .error_counters = tcp_input_error_counters, .format_trace = format_tcp_rx_trace_short, }; -/* *INDENT-ON* */ static u8 @@ -1985,7 +1981,6 @@ VLIB_NODE_FN (tcp6_syn_sent_node) (vlib_main_t * vm, return tcp46_syn_sent_inline (vm, node, from_frame, 0 /* is_ip4 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp4_syn_sent_node) = { .name = "tcp4-syn-sent", @@ -1995,9 +1990,7 @@ VLIB_REGISTER_NODE (tcp4_syn_sent_node) = .error_counters = tcp_input_error_counters, .format_trace = format_tcp_rx_trace_short, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp6_syn_sent_node) = { .name = "tcp6-syn-sent", @@ -2007,7 +2000,6 @@ VLIB_REGISTER_NODE (tcp6_syn_sent_node) = .error_counters = tcp_input_error_counters, .format_trace = format_tcp_rx_trace_short, }; -/* *INDENT-ON* */ static void tcp46_rcv_process_trace_frame (vlib_main_t *vm, vlib_node_runtime_t *node, @@ -2429,7 +2421,6 @@ VLIB_NODE_FN (tcp6_rcv_process_node) (vlib_main_t * vm, return tcp46_rcv_process_inline (vm, node, from_frame, 0 /* is_ip4 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp4_rcv_process_node) = { .name = "tcp4-rcv-process", /* Takes a vector of packets. */ @@ -2438,9 +2429,7 @@ VLIB_REGISTER_NODE (tcp4_rcv_process_node) = { .error_counters = tcp_input_error_counters, .format_trace = format_tcp_rx_trace_short, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp6_rcv_process_node) = { .name = "tcp6-rcv-process", /* Takes a vector of packets. */ @@ -2449,7 +2438,6 @@ VLIB_REGISTER_NODE (tcp6_rcv_process_node) = { .error_counters = tcp_input_error_counters, .format_trace = format_tcp_rx_trace_short, }; -/* *INDENT-ON* */ static void tcp46_listen_trace_frame (vlib_main_t *vm, vlib_node_runtime_t *node, @@ -2672,7 +2660,6 @@ VLIB_NODE_FN (tcp6_listen_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return tcp46_listen_inline (vm, node, from_frame, 0 /* is_ip4 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp4_listen_node) = { .name = "tcp4-listen", /* Takes a vector of packets. */ @@ -2681,9 +2668,7 @@ VLIB_REGISTER_NODE (tcp4_listen_node) = { .error_counters = tcp_input_error_counters, .format_trace = format_tcp_rx_trace_short, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp6_listen_node) = { .name = "tcp6-listen", /* Takes a vector of packets. */ @@ -2692,7 +2677,6 @@ VLIB_REGISTER_NODE (tcp6_listen_node) = { .error_counters = tcp_input_error_counters, .format_trace = format_tcp_rx_trace_short, }; -/* *INDENT-ON* */ always_inline uword tcp46_drop_inline (vlib_main_t *vm, vlib_node_runtime_t *node, @@ -2941,7 +2925,6 @@ VLIB_NODE_FN (tcp6_input_nolookup_node) (vlib_main_t * vm, 1 /* is_nolookup */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp4_input_nolookup_node) = { .name = "tcp4-input-nolookup", @@ -2959,9 +2942,7 @@ VLIB_REGISTER_NODE (tcp4_input_nolookup_node) = .format_buffer = format_tcp_header, .format_trace = format_tcp_rx_trace, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp6_input_nolookup_node) = { .name = "tcp6-input-nolookup", @@ -2979,7 +2960,6 @@ VLIB_REGISTER_NODE (tcp6_input_nolookup_node) = .format_buffer = format_tcp_header, .format_trace = format_tcp_rx_trace, }; -/* *INDENT-ON* */ VLIB_NODE_FN (tcp4_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) @@ -2995,7 +2975,6 @@ VLIB_NODE_FN (tcp6_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, 0 /* is_nolookup */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp4_input_node) = { .name = "tcp4-input", @@ -3013,9 +2992,7 @@ VLIB_REGISTER_NODE (tcp4_input_node) = .format_buffer = format_tcp_header, .format_trace = format_tcp_rx_trace, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp6_input_node) = { .name = "tcp6-input", @@ -3033,7 +3010,6 @@ VLIB_REGISTER_NODE (tcp6_input_node) = .format_buffer = format_tcp_header, .format_trace = format_tcp_rx_trace, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT void diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index f157b78ff75..e232ed43b69 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -2295,7 +2295,6 @@ VLIB_NODE_FN (tcp6_output_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return tcp46_output_inline (vm, node, from_frame, 0 /* is_ip4 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp4_output_node) = { .name = "tcp4-output", @@ -2313,9 +2312,7 @@ VLIB_REGISTER_NODE (tcp4_output_node) = .format_buffer = format_tcp_header, .format_trace = format_tcp_tx_trace, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp6_output_node) = { .name = "tcp6-output", @@ -2333,7 +2330,6 @@ VLIB_REGISTER_NODE (tcp6_output_node) = .format_buffer = format_tcp_header, .format_trace = format_tcp_tx_trace, }; -/* *INDENT-ON* */ typedef enum _tcp_reset_next { @@ -2444,7 +2440,6 @@ VLIB_NODE_FN (tcp6_reset_node) (vlib_main_t * vm, vlib_node_runtime_t * node, return tcp46_reset_inline (vm, node, from_frame, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp4_reset_node) = { .name = "tcp4-reset", .vector_size = sizeof (u32), @@ -2458,9 +2453,7 @@ VLIB_REGISTER_NODE (tcp4_reset_node) = { }, .format_trace = format_tcp_tx_trace, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tcp6_reset_node) = { .name = "tcp6-reset", .vector_size = sizeof (u32), @@ -2474,7 +2467,6 @@ VLIB_REGISTER_NODE (tcp6_reset_node) = { }, .format_trace = format_tcp_tx_trace, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/tcp/tcp_syn_filter4.c b/src/vnet/tcp/tcp_syn_filter4.c index 1b003e04e51..6e867240ad6 100644 --- a/src/vnet/tcp/tcp_syn_filter4.c +++ b/src/vnet/tcp/tcp_syn_filter4.c @@ -399,7 +399,6 @@ VLIB_NODE_FN (syn_filter4_node) (vlib_main_t * vm, return frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (syn_filter4_node) = { .name = "syn-filter-4", @@ -418,16 +417,13 @@ VLIB_REGISTER_NODE (syn_filter4_node) = [SYN_FILTER_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (syn_filter_4, static) = { .arc_name = "ip4-local", .node_name = "syn-filter-4", .runs_before = VNET_FEATURES("ip4-local-end-of-arc"), }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT int @@ -525,14 +521,12 @@ syn_filter_enable_disable_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (sr_content_command, static) = { .path = "ip syn filter", .short_help = "ip syn filter <interface-name> [disable]", .function = syn_filter_enable_disable_command_fn, }; -/* *INDENT-ON* */ #endif /* CLIB_MARCH_VARIANT */ /* diff --git a/src/vnet/tcp/tcp_types.h b/src/vnet/tcp/tcp_types.h index aacfd8f2fd4..f9a9ff9a4da 100644 --- a/src/vnet/tcp/tcp_types.h +++ b/src/vnet/tcp/tcp_types.h @@ -389,7 +389,6 @@ typedef struct _tcp_connection #define rst_state snd_wl1 } tcp_connection_t; -/* *INDENT-OFF* */ struct _tcp_cc_algorithm { const char *name; @@ -406,7 +405,6 @@ struct _tcp_cc_algorithm void (*event) (tcp_connection_t *tc, tcp_cc_event_t evt); u64 (*get_pacing_rate) (tcp_connection_t *tc); }; -/* *INDENT-ON* */ #define tcp_fastrecovery_on(tc) (tc)->flags |= TCP_CONN_FAST_RECOVERY #define tcp_fastrecovery_off(tc) (tc)->flags &= ~TCP_CONN_FAST_RECOVERY diff --git a/src/vnet/teib/teib.c b/src/vnet/teib/teib.c index eb554b39658..a9234bbeb5e 100644 --- a/src/vnet/teib/teib.c +++ b/src/vnet/teib/teib.c @@ -308,12 +308,10 @@ teib_walk (teib_walk_cb_t fn, void *ctx) { index_t tei; - /* *INDENT-OFF* */ pool_foreach_index (tei, teib_pool) { fn(tei, ctx); } - /* *INDENT-ON* */ } void @@ -321,13 +319,11 @@ teib_walk_itf (u32 sw_if_index, teib_walk_cb_t fn, void *ctx) { index_t tei; - /* *INDENT-OFF* */ pool_foreach_index (tei, teib_pool) { if (sw_if_index == teib_entry_get_sw_if_index(teib_entry_get(tei))) fn(tei, ctx); } - /* *INDENT-ON* */ } static void @@ -336,14 +332,12 @@ teib_walk_itf_proto (u32 sw_if_index, { index_t tei; - /* *INDENT-OFF* */ pool_foreach_index (tei, teib_pool) { if (sw_if_index == teib_entry_get_sw_if_index(teib_entry_get(tei)) && af == teib_entry_get_af(teib_entry_get(tei))) fn(tei, ctx); } - /* *INDENT-ON* */ } typedef struct teib_table_bind_ctx_t_ diff --git a/src/vnet/teib/teib_cli.c b/src/vnet/teib/teib_cli.c index a23902e0f60..03cec15c7a1 100644 --- a/src/vnet/teib/teib_cli.c +++ b/src/vnet/teib/teib_cli.c @@ -85,13 +85,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (teib_create_command, static) = { .path = "create teib", .short_help = "create teib <interface> peer <addr> nh <addr> [nh-table-id <ID>]", .function = teib_add, }; -/* *INDENT-ON* */ static clib_error_t * teib_del (vlib_main_t * vm, @@ -150,13 +148,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (teib_delete_command, static) = { .path = "delete teib", .short_help = "delete teib <interface> peer <addr>", .function = teib_del, }; -/* *INDENT-ON* */ static walk_rc_t teib_show_one (index_t nei, void *ctx) @@ -175,13 +171,11 @@ teib_show (vlib_main_t * vm, return (NULL); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (teib_show_command, static) = { .path = "show teib", .short_help = "show teib", .function = teib_show, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/tls/tls.h b/src/vnet/tls/tls.h index f7a3ad02e30..528cdad703b 100644 --- a/src/vnet/tls/tls.h +++ b/src/vnet/tls/tls.h @@ -36,7 +36,6 @@ #define TLS_DBG(_lvl, _fmt, _args...) #endif -/* *INDENT-OFF* */ typedef struct tls_cxt_id_ { session_handle_t app_session_handle; @@ -52,7 +51,6 @@ typedef struct tls_cxt_id_ u8 tcp_is_ip4; u8 tls_engine_id; } tls_ctx_id_t; -/* *INDENT-ON* */ STATIC_ASSERT (sizeof (tls_ctx_id_t) <= TRANSPORT_CONN_ID_LEN, "ctx id must be less than TRANSPORT_CONN_ID_LEN"); diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c index 669dd03b34e..b3c02510232 100644 --- a/src/vnet/udp/udp.c +++ b/src/vnet/udp/udp.c @@ -653,13 +653,11 @@ udp_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (udp_init) = { .runs_after = VLIB_INITS("ip_main_init", "ip4_lookup_init", "ip6_lookup_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/udp/udp_api.c b/src/vnet/udp/udp_api.c index ae6b5bb5807..1f952aa36ea 100644 --- a/src/vnet/udp/udp_api.c +++ b/src/vnet/udp/udp_api.c @@ -86,12 +86,10 @@ vl_api_udp_encap_dump_t_handler (vl_api_udp_encap_dump_t *mp) if (!reg) return; - /* *INDENT-OFF* */ pool_foreach (ue, udp_encap_pool) { send_udp_encap_details(ue, reg, mp->context); } - /* *INDENT-ON* */ } static void @@ -129,12 +127,10 @@ vl_api_udp_encap_add_t_handler (vl_api_udp_encap_add_t *mp) ntohs (mp->udp_encap.dst_port), flags); done: - /* *INDENT-OFF* */ REPLY_MACRO2 (VL_API_UDP_ENCAP_ADD_REPLY, ({ rmp->id = ntohl (uei); })); - /* *INDENT-ON* */ } diff --git a/src/vnet/udp/udp_cli.c b/src/vnet/udp/udp_cli.c index f5a536cefe4..6c8992cd0de 100644 --- a/src/vnet/udp/udp_cli.c +++ b/src/vnet/udp/udp_cli.c @@ -198,14 +198,12 @@ show_udp_punt_fn (vlib_main_t * vm, unformat_input_t * input, return (error); } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_tcp_punt_command, static) = { .path = "show udp punt", .short_help = "show udp punt [ipv4|ipv6]", .function = show_udp_punt_fn, }; -/* *INDENT-ON* */ static void table_format_udp_port_ (vlib_main_t *vm, udp_main_t *um, table_t *t, int *c, diff --git a/src/vnet/udp/udp_encap.c b/src/vnet/udp/udp_encap.c index ac1f855b4a0..e4e5271da63 100644 --- a/src/vnet/udp/udp_encap.c +++ b/src/vnet/udp/udp_encap.c @@ -518,13 +518,11 @@ udp_encap_walk (udp_encap_walk_cb_t cb, void *ctx) { index_t uei; - /* *INDENT-OFF* */ pool_foreach_index (uei, udp_encap_pool) { if (WALK_STOP == cb(uei, ctx)) break; } - /* *INDENT-ON* */ } clib_error_t * @@ -547,12 +545,10 @@ udp_encap_show (vlib_main_t * vm, if (INDEX_INVALID == uei) { - /* *INDENT-OFF* */ pool_foreach_index (uei, udp_encap_pool) { vlib_cli_output(vm, "%U", format_udp_encap, uei, 0); } - /* *INDENT-ON* */ } else { @@ -562,7 +558,6 @@ udp_encap_show (vlib_main_t * vm, return NULL; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (udp_encap_add_command, static) = { .path = "udp encap", .short_help = "udp encap [add|del] <id ID> <src-ip> <dst-ip> [<src-port>] " @@ -577,7 +572,6 @@ VLIB_CLI_COMMAND (udp_encap_show_command, static) = { .function = udp_encap_show, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/udp/udp_encap_node.c b/src/vnet/udp/udp_encap_node.c index de281f6ca64..a86614f5475 100644 --- a/src/vnet/udp/udp_encap_node.c +++ b/src/vnet/udp/udp_encap_node.c @@ -308,7 +308,6 @@ VLIB_NODE_FN (udp6_encap_node) return udp_encap_inline (vm, node, frame, AF_IP6, N_AF); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (udp4o4_encap_node) = { .name = "udp4o4-encap", .vector_size = sizeof (u32), @@ -354,7 +353,6 @@ VLIB_REGISTER_NODE (udp6_encap_node) = { .n_next_nodes = 0, .sibling_of = "udp6o6-encap", }; -/* *INDENT-ON* */ /* diff --git a/src/vnet/udp/udp_input.c b/src/vnet/udp/udp_input.c index 3a7de623270..a90461186c1 100644 --- a/src/vnet/udp/udp_input.c +++ b/src/vnet/udp/udp_input.c @@ -348,7 +348,6 @@ udp4_input (vlib_main_t * vm, vlib_node_runtime_t * node, return udp46_input_inline (vm, node, frame, 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (udp4_input_node) = { .function = udp4_input, @@ -365,7 +364,6 @@ VLIB_REGISTER_NODE (udp4_input_node) = #undef _ }, }; -/* *INDENT-ON* */ static uword udp6_input (vlib_main_t * vm, vlib_node_runtime_t * node, @@ -374,7 +372,6 @@ udp6_input (vlib_main_t * vm, vlib_node_runtime_t * node, return udp46_input_inline (vm, node, frame, 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (udp6_input_node) = { .function = udp6_input, @@ -391,7 +388,6 @@ VLIB_REGISTER_NODE (udp6_input_node) = #undef _ }, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/udp/udp_local.c b/src/vnet/udp/udp_local.c index 88378ae04bc..6531b73cd11 100644 --- a/src/vnet/udp/udp_local.c +++ b/src/vnet/udp/udp_local.c @@ -393,7 +393,6 @@ VLIB_NODE_FN (udp6_local_node) (vlib_main_t * vm, return udp46_local_inline (vm, node, from_frame, 0 /* is_ip4 */ ); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (udp4_local_node) = { .name = "ip4-udp-lookup", /* Takes a vector of packets. */ @@ -413,9 +412,7 @@ VLIB_REGISTER_NODE (udp4_local_node) = { .format_trace = format_udp_rx_trace, .unformat_buffer = unformat_udp_header, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (udp6_local_node) = { .name = "ip6-udp-lookup", /* Takes a vector of packets. */ @@ -435,7 +432,6 @@ VLIB_REGISTER_NODE (udp6_local_node) = { .format_trace = format_udp_rx_trace, .unformat_buffer = unformat_udp_header, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT void diff --git a/src/vnet/unix/gdb_funcs.c b/src/vnet/unix/gdb_funcs.c index 91dabe394ba..d6fdc985bd9 100644 --- a/src/vnet/unix/gdb_funcs.c +++ b/src/vnet/unix/gdb_funcs.c @@ -318,13 +318,11 @@ show_gdb_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_gdb_funcs_command, static) = { .path = "show gdb", .short_help = "Describe functions which can be called from gdb", .function = show_gdb_command_fn, }; -/* *INDENT-ON* */ vlib_buffer_t * vgb (u32 bi) diff --git a/src/vnet/unix/tuntap.c b/src/vnet/unix/tuntap.c index 6bb1d802574..f1102dc321e 100644 --- a/src/vnet/unix/tuntap.c +++ b/src/vnet/unix/tuntap.c @@ -217,14 +217,12 @@ tuntap_tx (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) return n_packets; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tuntap_tx_node,static) = { .function = tuntap_tx, .name = "tuntap-tx", .type = VLIB_NODE_TYPE_INTERNAL, .vector_size = 4, }; -/* *INDENT-ON* */ /** * @brief TUNTAP receive node @@ -385,7 +383,6 @@ static char *tuntap_rx_error_strings[] = { "unknown packet type", }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (tuntap_rx_node,static) = { .function = tuntap_rx, .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED, @@ -397,7 +394,6 @@ VLIB_REGISTER_NODE (tuntap_rx_node,static) = { .n_errors = 1, .error_strings = tuntap_rx_error_strings, }; -/* *INDENT-ON* */ /** * @brief Gets called when file descriptor is ready from epoll. @@ -933,12 +929,10 @@ tuntap_nopunt_frame (vlib_main_t * vm, vlib_frame_free (vm, frame); } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (tuntap_interface_class,static) = { .name = "tuntap", .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P, }; -/* *INDENT-ON* */ /** * @brief Format tun/tap interface name @@ -984,13 +978,11 @@ tuntap_intfc_tx (vlib_main_t * vm, return n_buffers; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (tuntap_dev_class,static) = { .name = "tuntap", .tx_function = tuntap_intfc_tx, .format_device_name = format_tuntap_interface_name, }; -/* *INDENT-ON* */ /** * @brief tun/tap node init @@ -1025,12 +1017,10 @@ tuntap_init (vlib_main_t * vm) return 0; } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (tuntap_init) = { .runs_after = VLIB_INITS("ip4_init"), }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vnet/vxlan-gpe/decap.c b/src/vnet/vxlan-gpe/decap.c index 62513614389..d4c7424630d 100644 --- a/src/vnet/vxlan-gpe/decap.c +++ b/src/vnet/vxlan-gpe/decap.c @@ -622,7 +622,6 @@ static char *vxlan_gpe_error_strings[] = { #undef _ }; -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan4_gpe_input_node) = { .name = "vxlan4-gpe-input", /* Takes a vector of packets. */ @@ -642,9 +641,7 @@ VLIB_REGISTER_NODE (vxlan4_gpe_input_node) = { .format_trace = format_vxlan_gpe_rx_trace, // $$$$ .unformat_buffer = unformat_vxlan_gpe_header, }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan6_gpe_input_node) = { .name = "vxlan6-gpe-input", /* Takes a vector of packets. */ @@ -664,7 +661,6 @@ VLIB_REGISTER_NODE (vxlan6_gpe_input_node) = { .format_trace = format_vxlan_gpe_rx_trace, // $$$$ .unformat_buffer = unformat_vxlan_gpe_header, }; -/* *INDENT-ON* */ typedef enum { @@ -1105,7 +1101,6 @@ VLIB_NODE_FN (ip4_vxlan_gpe_bypass_node) (vlib_main_t * vm, return ip_vxlan_gpe_bypass_inline (vm, node, frame, /* is_ip4 */ 1); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip4_vxlan_gpe_bypass_node) = { .name = "ip4-vxlan-gpe-bypass", .vector_size = sizeof (u32), @@ -1119,7 +1114,6 @@ VLIB_REGISTER_NODE (ip4_vxlan_gpe_bypass_node) = { .format_buffer = format_ip4_header, .format_trace = format_ip4_forward_next_trace, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT /* Dummy init function to get us linked in. */ @@ -1139,7 +1133,6 @@ VLIB_NODE_FN (ip6_vxlan_gpe_bypass_node) (vlib_main_t * vm, return ip_vxlan_gpe_bypass_inline (vm, node, frame, /* is_ip4 */ 0); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_vxlan_gpe_bypass_node) = { .name = "ip6-vxlan-gpe-bypass", .vector_size = sizeof (u32), @@ -1153,7 +1146,6 @@ VLIB_REGISTER_NODE (ip6_vxlan_gpe_bypass_node) = { .format_buffer = format_ip6_header, .format_trace = format_ip6_forward_next_trace, }; -/* *INDENT-ON* */ #ifndef CLIB_MARCH_VARIANT /* Dummy init function to get us linked in. */ diff --git a/src/vnet/vxlan-gpe/encap.c b/src/vnet/vxlan-gpe/encap.c index 824f10f4fb7..a769861577d 100644 --- a/src/vnet/vxlan-gpe/encap.c +++ b/src/vnet/vxlan-gpe/encap.c @@ -404,7 +404,6 @@ vxlan_gpe_encap (vlib_main_t * vm, return from_frame->n_vectors; } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (vxlan_gpe_encap_node) = { .function = vxlan_gpe_encap, .name = "vxlan-gpe-encap", @@ -423,7 +422,6 @@ VLIB_REGISTER_NODE (vxlan_gpe_encap_node) = { [VXLAN_GPE_ENCAP_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ /* diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.c b/src/vnet/vxlan-gpe/vxlan_gpe.c index 5919e0f0dfd..5a5262ea9db 100644 --- a/src/vnet/vxlan-gpe/vxlan_gpe.c +++ b/src/vnet/vxlan-gpe/vxlan_gpe.c @@ -144,14 +144,12 @@ vxlan_gpe_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, return 0; } -/* *INDENT-OFF* */ VNET_DEVICE_CLASS (vxlan_gpe_device_class,static) = { .name = "VXLAN_GPE", .format_device_name = format_vxlan_gpe_name, .format_tx_trace = format_vxlan_gpe_encap_trace, .admin_up_down_function = vxlan_gpe_interface_admin_up_down, }; -/* *INDENT-ON* */ /** @@ -171,13 +169,11 @@ format_vxlan_gpe_header_with_length (u8 * s, va_list * args) return s; } -/* *INDENT-OFF* */ VNET_HW_INTERFACE_CLASS (vxlan_gpe_hw_class) = { .name = "VXLAN_GPE", .format_header = format_vxlan_gpe_header_with_length, .build_rewrite = default_build_rewrite, }; -/* *INDENT-ON* */ static void vxlan_gpe_tunnel_restack_dpo (vxlan_gpe_tunnel_t * t) @@ -388,7 +384,6 @@ vxlan6_gpe_rewrite (vxlan_gpe_tunnel_t * t, u32 extension_size, return (0); } -/* *INDENT-OFF* */ typedef CLIB_PACKED(union { struct { fib_node_index_t mfib_entry_index; @@ -396,7 +391,6 @@ typedef CLIB_PACKED(union { }; u64 as_u64; }) mcast_shared_t; -/* *INDENT-ON* */ static inline mcast_shared_t mcast_shared_get (ip46_address_t * ip) @@ -496,7 +490,6 @@ int vnet_vxlan_gpe_add_del_tunnel clib_memset (t, 0, sizeof (*t)); /* copy from arg structure */ -/* *INDENT-OFF* */ #define _(x) t->x = a->x; foreach_gpe_copy_field; if (!a->is_ip6) @@ -504,7 +497,6 @@ int vnet_vxlan_gpe_add_del_tunnel else foreach_copy_ipv6 #undef _ -/* *INDENT-ON* */ if (!a->is_ip6) t->flags |= VXLAN_GPE_TUNNEL_IS_IPV4; @@ -918,7 +910,6 @@ vxlan_gpe_add_del_tunnel_command_fn (vlib_main_t * vm, a->is_add = is_add; a->is_ip6 = ipv6_set; -/* *INDENT-OFF* */ #define _(x) a->x = x; foreach_gpe_copy_field; if (ipv4_set) @@ -926,7 +917,6 @@ vxlan_gpe_add_del_tunnel_command_fn (vlib_main_t * vm, else foreach_copy_ipv6 #undef _ -/* *INDENT-ON* */ rv = vnet_vxlan_gpe_add_del_tunnel (a, &sw_if_index); @@ -979,7 +969,6 @@ done: * Example of how to delete a VXLAN-GPE Tunnel: * @cliexcmd{create vxlan-gpe tunnel local 10.0.3.1 remote 10.0.3.3 vni 13 del} ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (create_vxlan_gpe_tunnel_command, static) = { .path = "create vxlan-gpe tunnel", .short_help = @@ -989,7 +978,6 @@ VLIB_CLI_COMMAND (create_vxlan_gpe_tunnel_command, static) = { " [encap-vrf-id <nn>] [decap-vrf-id <nn>] [del]\n", .function = vxlan_gpe_add_del_tunnel_command_fn, }; -/* *INDENT-ON* */ /** * @brief CLI function for showing VXLAN GPE tunnels @@ -1012,12 +1000,10 @@ show_vxlan_gpe_tunnel_command_fn (vlib_main_t * vm, if (pool_elts (ngm->tunnels) == 0) vlib_cli_output (vm, "No vxlan-gpe tunnels configured."); - /* *INDENT-OFF* */ pool_foreach (t, ngm->tunnels) { vlib_cli_output (vm, "%U", format_vxlan_gpe_tunnel, t); } - /* *INDENT-ON* */ return 0; } @@ -1031,12 +1017,10 @@ show_vxlan_gpe_tunnel_command_fn (vlib_main_t * vm, * [0] local 10.0.3.1 remote 10.0.3.3 vni 13 encap_fib_index 0 sw_if_index 5 decap_next l2 * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_vxlan_gpe_tunnel_command, static) = { .path = "show vxlan-gpe", .function = show_vxlan_gpe_tunnel_command_fn, }; -/* *INDENT-ON* */ void vnet_int_vxlan_gpe_bypass_mode (u32 sw_if_index, u8 is_ip6, u8 is_enable) @@ -1144,13 +1128,11 @@ set_ip4_vxlan_gpe_bypass (vlib_main_t * vm, * @cliexcmd{set interface ip vxlan-gpe-bypass GigabitEthernet2/0/0 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip_vxlan_gpe_bypass_command, static) = { .path = "set interface ip vxlan-gpe-bypass", .function = set_ip4_vxlan_gpe_bypass, .short_help = "set interface ip vxlan-gpe-bypass <interface> [del]", }; -/* *INDENT-ON* */ static clib_error_t * set_ip6_vxlan_gpe_bypass (vlib_main_t * vm, @@ -1202,15 +1184,12 @@ set_ip6_vxlan_gpe_bypass (vlib_main_t * vm, * @cliexcmd{set interface ip6 vxlan-gpe-bypass GigabitEthernet2/0/0 del} * @endparblock ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_interface_ip6_vxlan_gpe_bypass_command, static) = { .path = "set interface ip6 vxlan-gpe-bypass", .function = set_ip6_vxlan_gpe_bypass, .short_help = "set interface ip6 vxlan-gpe-bypass <interface> [del]", }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ VNET_FEATURE_INIT (ip4_vxlan_gpe_bypass, static) = { .arc_name = "ip4-unicast", @@ -1224,7 +1203,6 @@ VNET_FEATURE_INIT (ip6_vxlan_gpe_bypass, static) = .node_name = "ip6-vxlan-gpe-bypass", .runs_before = VNET_FEATURES ("ip6-lookup"), }; -/* *INDENT-ON* */ /** * @brief Feature init function for VXLAN GPE diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.h b/src/vnet/vxlan-gpe/vxlan_gpe.h index 2cbbb6c5f36..aabaafeee6f 100644 --- a/src/vnet/vxlan-gpe/vxlan_gpe.h +++ b/src/vnet/vxlan-gpe/vxlan_gpe.h @@ -40,7 +40,6 @@ * @brief VXLAN GPE header struct * */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /** 20 bytes */ ip4_header_t ip4; @@ -49,9 +48,7 @@ typedef CLIB_PACKED (struct { /** 8 bytes */ vxlan_gpe_header_t vxlan; }) ip4_vxlan_gpe_header_t; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /** 40 bytes */ ip6_header_t ip6; @@ -60,7 +57,6 @@ typedef CLIB_PACKED (struct { /** 8 bytes */ vxlan_gpe_header_t vxlan; }) ip6_vxlan_gpe_header_t; -/* *INDENT-ON* */ /** * @brief Key struct for IPv4 VXLAN GPE tunnel. @@ -68,7 +64,6 @@ typedef CLIB_PACKED (struct { * all fields in NET byte order * VNI shifted 8 bits */ -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { union { struct { @@ -81,7 +76,6 @@ typedef CLIB_PACKED(struct { u64 as_u64[2]; }; }) vxlan4_gpe_tunnel_key_t; -/* *INDENT-ON* */ /** * @brief Key struct for IPv6 VXLAN GPE tunnel. @@ -89,14 +83,12 @@ typedef CLIB_PACKED(struct { * all fields in NET byte order * VNI shifted 8 bits */ -/* *INDENT-OFF* */ typedef CLIB_PACKED(struct { ip6_address_t local; ip6_address_t remote; u32 vni; u32 port; }) vxlan6_gpe_tunnel_key_t; -/* *INDENT-ON* */ typedef union { diff --git a/src/vnet/vxlan-gpe/vxlan_gpe_api.c b/src/vnet/vxlan-gpe/vxlan_gpe_api.c index e9cf17f270b..cc74e1f58d4 100644 --- a/src/vnet/vxlan-gpe/vxlan_gpe_api.c +++ b/src/vnet/vxlan-gpe/vxlan_gpe_api.c @@ -114,12 +114,10 @@ static void rv = vnet_vxlan_gpe_add_del_tunnel (a, &sw_if_index); out: - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_VXLAN_GPE_ADD_DEL_TUNNEL_REPLY, ({ rmp->sw_if_index = ntohl (sw_if_index); })); - /* *INDENT-ON* */ } static void @@ -242,12 +240,10 @@ static void vl_api_vxlan_gpe_tunnel_dump_t_handler if (~0 == sw_if_index) { - /* *INDENT-OFF* */ pool_foreach (t, vgm->tunnels) { send_vxlan_gpe_tunnel_details (t, reg, mp->context); } - /* *INDENT-ON* */ } else { diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c index d14906aff2f..6041b066578 100644 --- a/src/vpp/api/api.c +++ b/src/vpp/api/api.c @@ -109,7 +109,6 @@ vl_api_show_version_t_handler (vl_api_show_version_t * mp) char *vpe_api_get_version (void); char *vpe_api_get_build_date (void); - /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_SHOW_VERSION_REPLY, ({ strncpy ((char *) rmp->program, "vpe", ARRAY_LEN(rmp->program)-1); @@ -120,7 +119,6 @@ vl_api_show_version_t_handler (vl_api_show_version_t * mp) strncpy ((char *) rmp->build_date, vpe_api_get_build_date(), ARRAY_LEN(rmp->build_date)-1); })); - /* *INDENT-ON* */ } static void @@ -128,11 +126,9 @@ vl_api_show_vpe_system_time_t_handler (vl_api_show_vpe_system_time_t *mp) { int rv = 0; vl_api_show_vpe_system_time_reply_t *rmp; - /* *INDENT-OFF* */ REPLY_MACRO2 ( VL_API_SHOW_VPE_SYSTEM_TIME_REPLY, ({ rmp->vpe_system_time = clib_host_to_net_f64 (unix_time_now ()); })); - /* *INDENT-ON* */ } static void diff --git a/src/vpp/api/api_main.c b/src/vpp/api/api_main.c index 47d974877e1..f2516752b9d 100644 --- a/src/vpp/api/api_main.c +++ b/src/vpp/api/api_main.c @@ -267,7 +267,6 @@ api_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (api_command, static) = { .path = "binary-api", @@ -275,7 +274,6 @@ VLIB_CLI_COMMAND (api_command, static) = .function = api_command_fn, .is_mp_safe = 1, }; -/* *INDENT-ON* */ void api_cli_output (void *notused, const char *fmt, ...) diff --git a/src/vpp/api/gmon.c b/src/vpp/api/gmon.c index ff561efbc07..e4ac1543cfc 100644 --- a/src/vpp/api/gmon.c +++ b/src/vpp/api/gmon.c @@ -73,7 +73,6 @@ get_significant_errors (gmon_main_t * gm) int vm_index; u64 significant_errors = 0; - /* *INDENT-OFF* */ clib_bitmap_foreach (code, gm->sig_error_bitmap) { for (vm_index = 0; vm_index < vec_len (gm->my_vlib_mains); vm_index++) @@ -85,7 +84,6 @@ get_significant_errors (gmon_main_t * gm) em->counters_last_clear[code] : 0); } } - /* *INDENT-ON* */ return (significant_errors); } @@ -145,13 +143,11 @@ gmon_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) return 0; /* not so much */ } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (gmon_process_node,static) = { .function = gmon_process, .type = VLIB_NODE_TYPE_PROCESS, .name = "gmon-process", }; -/* *INDENT-ON* */ static clib_error_t * gmon_init (vlib_main_t * vm) @@ -288,13 +284,11 @@ set_significant_error_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (set_significant_error_command, static) = { .path = "set significant error", .short_help = "set significant error <counter-index-nnn> [disable]", .function = set_significant_error_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vpp/app/version.c b/src/vpp/app/version.c index e6a73283ab2..1446777b74f 100644 --- a/src/vpp/app/version.c +++ b/src/vpp/app/version.c @@ -134,14 +134,12 @@ show_vpe_version_command_fn (vlib_main_t * vm, * @cliexend ?*/ -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_vpe_version_command, static) = { .path = "show version", .short_help = "show version [verbose] [cmdline]", .function = show_vpe_version_command_fn, .is_mp_safe = 1, }; -/* *INDENT-ON* */ /** Return the image build directory name */ char * diff --git a/src/vpp/app/vpe_cli.c b/src/vpp/app/vpe_cli.c index fc623b101f0..6ad194992e9 100644 --- a/src/vpp/app/vpe_cli.c +++ b/src/vpp/app/vpe_cli.c @@ -119,13 +119,11 @@ done: return error; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (virtual_ip_cmd_fn_command, static) = { .path = "ip virtual", .short_help = "ip virtual <addr> <interface> [mac <Mi>]+ [next-hop <ip4_address>]+", .function = virtual_ip_cmd_fn_command_fn, }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vpp/app/vppctl.c b/src/vpp/app/vppctl.c index 8c3495b3304..7c9651784e6 100644 --- a/src/vpp/app/vppctl.c +++ b/src/vpp/app/vppctl.c @@ -477,7 +477,6 @@ done: return 0; } -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c index 192df8f2fe1..71434a9c065 100644 --- a/src/vpp/vnet/main.c +++ b/src/vpp/vnet/main.c @@ -512,14 +512,12 @@ show_bihash_command_fn (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_bihash_command, static) = { .path = "show bihash", .short_help = "show bihash", .function = show_bihash_command_fn, }; -/* *INDENT-ON* */ #ifdef CLIB_SANITIZE_ADDR /* default options for Address Sanitizer */ diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c index 8094321bc89..d488b1a659c 100644 --- a/src/vppinfra/bihash_template.c +++ b/src/vppinfra/bihash_template.c @@ -700,12 +700,10 @@ static_always_inline int BV (clib_bihash_add_del_inline_with_hash) ( int mark_bucket_linear; int resplit_once; - /* *INDENT-OFF* */ static const BVT (clib_bihash_bucket) mask = { .linear_search = 1, .log2_pages = -1 }; - /* *INDENT-ON* */ #if BIHASH_LAZY_INSTANTIATE /* diff --git a/src/vppinfra/bihash_template.h b/src/vppinfra/bihash_template.h index e8a2c01cece..8f5879b4634 100644 --- a/src/vppinfra/bihash_template.h +++ b/src/vppinfra/bihash_template.h @@ -99,7 +99,6 @@ typedef struct STATIC_ASSERT_SIZEOF (BVT (clib_bihash_bucket), sizeof (u64)); -/* *INDENT-OFF* */ typedef CLIB_PACKED (struct { /* * Backing store allocation. Since bihash manages its own @@ -118,7 +117,6 @@ typedef CLIB_PACKED (struct { volatile u32 ready; u64 pad[1]; }) BVT (clib_bihash_shared_header); -/* *INDENT-ON* */ STATIC_ASSERT_SIZEOF (BVT (clib_bihash_shared_header), 8 * sizeof (u64)); @@ -282,9 +280,7 @@ static inline void BV (clib_bihash_alloc_unlock) (BVT (clib_bihash) * h) static inline void BV (clib_bihash_lock_bucket) (BVT (clib_bihash_bucket) * b) { - /* *INDENT-OFF* */ BVT (clib_bihash_bucket) mask = { .lock = 1 }; - /* *INDENT-ON* */ u64 old; try_again: @@ -415,12 +411,10 @@ static inline int BV (clib_bihash_search_inline_with_hash) BVT (clib_bihash_bucket) * b; int i, limit; - /* *INDENT-OFF* */ static const BVT (clib_bihash_bucket) mask = { .linear_search = 1, .log2_pages = -1 }; - /* *INDENT-ON* */ #if BIHASH_LAZY_INSTANTIATE if (PREDICT_FALSE (h->instantiated == 0)) @@ -518,12 +512,10 @@ static inline int BV (clib_bihash_search_inline_2_with_hash) BVT (clib_bihash_bucket) * b; int i, limit; -/* *INDENT-OFF* */ static const BVT (clib_bihash_bucket) mask = { .linear_search = 1, .log2_pages = -1 }; -/* *INDENT-ON* */ ASSERT (valuep); diff --git a/src/vppinfra/bitmap.h b/src/vppinfra/bitmap.h index 99d65954d09..4ab7bcf7a7c 100644 --- a/src/vppinfra/bitmap.h +++ b/src/vppinfra/bitmap.h @@ -546,12 +546,10 @@ always_inline uword *clib_bitmap_xor (uword * ai, uword * bi); } /* ALU functions: */ -/* *INDENT-OFF* */ _(and, a = a & b, 1) _(andnot, a = a & ~b, 1) _(or, a = a | b, 0) _(xor, a = a ^ b, 1) -/* *INDENT-ON* */ #undef _ /** Logical operator across two bitmaps which duplicates the first bitmap @@ -590,12 +588,10 @@ always_inline uword *clib_bitmap_dup_xor (uword * ai, uword * bi); clib_bitmap_dup_##name (uword * ai, uword * bi) \ { return clib_bitmap_##name (clib_bitmap_dup (ai), bi); } -/* *INDENT-OFF* */ _(and); _(andnot); _(or); _(xor); -/* *INDENT-ON* */ #undef _ /* ALU function definition macro for functions taking one bitmap and an @@ -618,12 +614,10 @@ clib_bitmap_##name (uword * ai, uword i) \ } /* ALU functions immediate: */ -/* *INDENT-OFF* */ _(andi, a = a & b, 1) _(andnoti, a = a & ~b, 1) _(ori, a = a | b, 0) _(xori, a = a ^ b, 1) -/* *INDENT-ON* */ #undef _ /* ALU function definition macro for functions taking one bitmap and an @@ -644,13 +638,11 @@ clib_bitmap_##name##_notrim (uword * ai, uword i) \ } /* ALU functions immediate: */ -/* *INDENT-OFF* */ _(andi, a = a & b) _(andnoti, a = a & ~b) _(ori, a = a | b) _(xori, a = a ^ b) #undef _ -/* *INDENT-ON* */ /** Return a random bitmap of the requested length @param ai - pointer to the destination bitmap diff --git a/src/vppinfra/byte_order.h b/src/vppinfra/byte_order.h index 9beb4470634..7bc26002a2f 100644 --- a/src/vppinfra/byte_order.h +++ b/src/vppinfra/byte_order.h @@ -173,12 +173,10 @@ _(i64); #undef _ /* Dummy endian swap functions for IEEE floating-point numbers */ -/* *INDENT-OFF* */ always_inline f64 clib_net_to_host_f64 (f64 x) { return x; } always_inline f64 clib_host_to_net_f64 (f64 x) { return x; } always_inline f32 clib_net_to_host_f32 (f32 x) { return x; } always_inline f32 clib_host_to_net_f32 (f32 x) { return x; } -/* *INDENT-ON* */ #endif /* included_clib_byte_order_h */ diff --git a/src/vppinfra/crypto/aes.h b/src/vppinfra/crypto/aes.h index 0aa154187a8..9e80e3b0318 100644 --- a/src/vppinfra/crypto/aes.h +++ b/src/vppinfra/crypto/aes.h @@ -199,9 +199,7 @@ aes192_key_expand (u8x16 * rk, u8x16u const *k) u8x16 r1, r2; rk[0] = r1 = k[0]; - /* *INDENT-OFF* */ rk[1] = r2 = (u8x16) (u64x2) { *(u64 *) (k + 1), 0 }; - /* *INDENT-ON* */ aes192_key_assist (&r1, &r2, aes_keygen_assist (r2, 0x1)); rk[1] = (u8x16) _mm_shuffle_pd ((__m128d) rk[1], (__m128d) r1, 0); diff --git a/src/vppinfra/elf.c b/src/vppinfra/elf.c index af0b2b8cb6f..f660195e101 100644 --- a/src/vppinfra/elf.c +++ b/src/vppinfra/elf.c @@ -1702,7 +1702,6 @@ layout_sections (elf_main_t * em) continue; s_lo = s_hi = 0; - /* *INDENT-OFF* */ clib_bitmap_foreach (si, g->section_index_bitmap) { u64 lo, hi; @@ -1727,7 +1726,6 @@ layout_sections (elf_main_t * em) s_hi = hi; } } - /* *INDENT-ON* */ if (n_sections == 0) continue; diff --git a/src/vppinfra/hash.c b/src/vppinfra/hash.c index 76f71d37d19..0e650e67a90 100644 --- a/src/vppinfra/hash.c +++ b/src/vppinfra/hash.c @@ -628,11 +628,9 @@ hash_resize_internal (void *old, uword new_size, uword free_old) { hash_t *h = old ? hash_header (old) : 0; new = _hash_create (new_size, h); - /* *INDENT-OFF* */ hash_foreach_pair (p, old, { new = _hash_set3 (new, p->key, &p->value[0], 0); }); - /* *INDENT-ON* */ } if (free_old) @@ -884,11 +882,9 @@ format_hash (u8 *s, va_list *va) if (verbose) { - /* *INDENT-OFF* */ hash_foreach_pair (p, v, { s = format (s, " %U\n", h->format_pair, h->format_pair_arg, v, p); }); - /* *INDENT-ON* */ } return s; diff --git a/src/vppinfra/macros.c b/src/vppinfra/macros.c index 27a92a8abe2..b8644b2738e 100644 --- a/src/vppinfra/macros.c +++ b/src/vppinfra/macros.c @@ -251,13 +251,11 @@ clib_macro_free (clib_macro_main_t * mm) hash_free (mm->the_builtin_eval_hash); - /* *INDENT-OFF* */ hash_foreach_pair (p, mm->the_value_table_hash, ({ vec_add1 (strings_to_free, (u8 *) (p->key)); vec_add1 (strings_to_free, (u8 *) (p->value[0])); })); - /* *INDENT-ON* */ for (i = 0; i < vec_len (strings_to_free); i++) vec_free (strings_to_free[i]); @@ -290,14 +288,12 @@ format_clib_macro_main (u8 * s, va_list * args) name_sort_t *nses = 0, *ns; int i; - /* *INDENT-OFF* */ hash_foreach_pair (p, mm->the_value_table_hash, ({ vec_add2 (nses, ns, 1); ns->name = (u8 *)(p->key); ns->value = (u8 *)(p->value[0]); })); - /* *INDENT-ON* */ if (vec_len (nses) == 0) return s; diff --git a/src/vppinfra/mem_dlmalloc.c b/src/vppinfra/mem_dlmalloc.c index de7591139ca..a188164a7ba 100644 --- a/src/vppinfra/mem_dlmalloc.c +++ b/src/vppinfra/mem_dlmalloc.c @@ -117,14 +117,12 @@ mheap_get_trace_internal (const clib_mem_heap_t *heap, uword offset, { hash_pair_t *p; mheap_trace_t *q; - /* *INDENT-OFF* */ hash_foreach_pair (p, tm->trace_by_callers, ({ q = uword_to_pointer (p->key, mheap_trace_t *); ASSERT (q >= old_start && q < old_end); p->key = pointer_to_uword (tm->traces + (q - old_start)); })); - /* *INDENT-ON* */ } trace_index = t - tm->traces; } diff --git a/src/vppinfra/pmalloc.c b/src/vppinfra/pmalloc.c index 9fb8ac4dcfe..ff392a1bf22 100644 --- a/src/vppinfra/pmalloc.c +++ b/src/vppinfra/pmalloc.c @@ -631,7 +631,6 @@ format_pmalloc (u8 * s, va_list * va) format_clib_error, pm->error); - /* *INDENT-OFF* */ pool_foreach (a, pm->arenas) { u32 *page_index; @@ -649,7 +648,6 @@ format_pmalloc (u8 * s, va_list * va) format_pmalloc_page, pp, verbose); } } - /* *INDENT-ON* */ return s; } diff --git a/src/vppinfra/random_buffer.h b/src/vppinfra/random_buffer.h index 83e6bcef479..12343c10535 100644 --- a/src/vppinfra/random_buffer.h +++ b/src/vppinfra/random_buffer.h @@ -42,9 +42,7 @@ #include <vppinfra/random_isaac.h> #include <vppinfra/warnings.h> -/* *INDENT-OFF* */ WARN_OFF(array-bounds) -/* *INDENT-ON* */ typedef struct { @@ -120,9 +118,7 @@ clib_random_buffer_get_data (clib_random_buffer_t * b, uword n_bytes) return b->buffer + i; } -/* *INDENT-OFF* */ WARN_ON(array-bounds) -/* *INDENT-ON* */ #endif /* included_clib_random_buffer_h */ diff --git a/src/vppinfra/test_fifo.c b/src/vppinfra/test_fifo.c index 45392bc35eb..2d3cad33119 100644 --- a/src/vppinfra/test_fifo.c +++ b/src/vppinfra/test_fifo.c @@ -105,12 +105,10 @@ test_fifo_main (unformat_input_t * input) ASSERT (clib_fifo_elts (as) == n_added - n_removed); j = 0; - /* *INDENT-OFF* */ clib_fifo_foreach (a, as, { ASSERT (A_is_valid (a, n_removed + j)); j++; }); - /* *INDENT-ON* */ ASSERT (j == clib_fifo_elts (as)); } diff --git a/src/vppinfra/test_hash.c b/src/vppinfra/test_hash.c index 95ced448c13..25adff3443b 100644 --- a/src/vppinfra/test_hash.c +++ b/src/vppinfra/test_hash.c @@ -86,14 +86,12 @@ hash_next_test (word * h) hash_pair_t *p0, *p1; clib_error_t *error = 0; - /* *INDENT-OFF* */ hash_foreach_pair (p0, h, { p1 = hash_next (h, &hn); error = CLIB_ERROR_ASSERT (p0 == p1); if (error) break; }); - /* *INDENT-ON* */ if (!error) error = CLIB_ERROR_ASSERT (!hash_next (h, &hn)); @@ -176,12 +174,10 @@ test_word_key (hash_test_t * ht) hash_pair_t *p; uword ki; - /* *INDENT-OFF* */ hash_foreach_pair (p, h, { ki = p->value[0]; ASSERT (keys[ki] == p->key); }); - /* *INDENT-ON* */ } if ((error = hash_validate (h))) diff --git a/src/vppinfra/test_pool_iterate.c b/src/vppinfra/test_pool_iterate.c index bcbd235ba71..fc4be6d6fe1 100644 --- a/src/vppinfra/test_pool_iterate.c +++ b/src/vppinfra/test_pool_iterate.c @@ -77,7 +77,6 @@ main (int argc, char *argv[]) } while (next != ~0); - /* *INDENT-OFF* */ pool_foreach (junk, tp) { int is_free; @@ -94,7 +93,6 @@ main (int argc, char *argv[]) clib_warning ("oops, busy index %d reported free", i); } } - /* *INDENT-ON* */ return 0; } diff --git a/src/vppinfra/test_tw_timer.c b/src/vppinfra/test_tw_timer.c index 47e5e49bf1f..e9f4251a7b1 100644 --- a/src/vppinfra/test_tw_timer.c +++ b/src/vppinfra/test_tw_timer.c @@ -316,7 +316,6 @@ test2_single (tw_timer_test_main_t * tm) j = 0; vec_reset_length (deleted_indices); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { tw_timer_stop_2t_1w_2048sl (&tm->single_wheel, e->stop_timer_handle); @@ -324,7 +323,6 @@ test2_single (tw_timer_test_main_t * tm) if (++j >= tm->ntimers / 4) goto del_and_re_add; } - /* *INDENT-ON* */ del_and_re_add: for (j = 0; j < vec_len (deleted_indices); j++) @@ -374,14 +372,12 @@ test2_single (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat (stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ pool_free (tm->test_elts); tw_timer_wheel_free_2t_1w_2048sl (&tm->single_wheel); @@ -455,7 +451,6 @@ test2_double (tw_timer_test_main_t * tm) j = 0; vec_reset_length (deleted_indices); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { tw_timer_stop_16t_2w_512sl (&tm->double_wheel, e->stop_timer_handle); @@ -463,7 +458,6 @@ test2_double (tw_timer_test_main_t * tm) if (++j >= tm->ntimers / 4) goto del_and_re_add; } - /* *INDENT-ON* */ del_and_re_add: for (j = 0; j < vec_len (deleted_indices); j++) @@ -512,14 +506,12 @@ test2_double (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat (stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ pool_free (tm->test_elts); tw_timer_wheel_free_16t_2w_512sl (&tm->double_wheel); @@ -590,7 +582,6 @@ test2_double_updates (tw_timer_test_main_t * tm) j = 0; - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { expiration_time = get_expiration_time (tm); @@ -602,7 +593,6 @@ test2_double_updates (tw_timer_test_main_t * tm) if (++j >= tm->ntimers / 4) goto done; } - /* *INDENT-ON* */ done: updates += j; @@ -623,14 +613,12 @@ test2_double_updates (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat (stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ pool_free (tm->test_elts); tw_timer_wheel_free_16t_2w_512sl (&tm->double_wheel); @@ -706,7 +694,6 @@ test2_triple (tw_timer_test_main_t * tm) j = 0; vec_reset_length (deleted_indices); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { tw_timer_stop_4t_3w_256sl (&tm->triple_wheel, e->stop_timer_handle); @@ -714,7 +701,6 @@ test2_triple (tw_timer_test_main_t * tm) if (++j >= tm->ntimers / 4) goto del_and_re_add; } - /* *INDENT-ON* */ del_and_re_add: for (j = 0; j < vec_len (deleted_indices); j++) @@ -763,14 +749,12 @@ test2_triple (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat (stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ pool_free (tm->test_elts); tw_timer_wheel_free_4t_3w_256sl (&tm->triple_wheel); @@ -846,7 +830,6 @@ test2_triple_ov (tw_timer_test_main_t * tm) j = 0; vec_reset_length (deleted_indices); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { tw_timer_stop_1t_3w_1024sl_ov (&tm->triple_ov_wheel, @@ -855,7 +838,6 @@ test2_triple_ov (tw_timer_test_main_t * tm) if (++j >= tm->ntimers / 4) goto del_and_re_add; } - /* *INDENT-ON* */ del_and_re_add: for (j = 0; j < vec_len (deleted_indices); j++) @@ -904,7 +886,6 @@ test2_triple_ov (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { TWT (tw_timer) * t; @@ -915,7 +896,6 @@ test2_triple_ov (tw_timer_test_main_t * tm) t = pool_elt_at_index (tm->triple_ov_wheel.timers, e->stop_timer_handle); fformat (stdout, " expiration_time %lld\n", t->expiration_time); } - /* *INDENT-ON* */ pool_free (tm->test_elts); tw_timer_wheel_free_1t_3w_1024sl_ov (&tm->triple_ov_wheel); @@ -972,14 +952,12 @@ test1_single (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat(stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ fformat (stdout, "final wheel time %d, fast index %d\n", @@ -1030,14 +1008,12 @@ test1_double (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat(stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ fformat (stdout, "final wheel time %d, fast index %d\n", @@ -1088,14 +1064,12 @@ test1_two_timer_double (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat(stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ fformat (stdout, "final wheel time %d, fast index %d\n", @@ -1168,14 +1142,12 @@ test3_triple_double (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat (stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ pool_free (tm->test_elts); tw_timer_wheel_free_4t_3w_256sl (&tm->triple_wheel); @@ -1252,14 +1224,12 @@ test4_double_double (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat (stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ pool_free (tm->test_elts); tw_timer_wheel_free_16t_2w_512sl (&tm->double_wheel); @@ -1336,14 +1306,12 @@ test5_double (tw_timer_test_main_t * tm) fformat (stdout, "Note: %d elements remain in pool\n", pool_elts (tm->test_elts)); - /* *INDENT-OFF* */ pool_foreach (e, tm->test_elts) { fformat (stdout, "[%d] expected to expire %d\n", e - tm->test_elts, e->expected_to_expire); } - /* *INDENT-ON* */ pool_free (tm->test_elts); tw_timer_wheel_free_16t_2w_512sl (&tm->double_wheel); diff --git a/src/vppinfra/timing_wheel.c b/src/vppinfra/timing_wheel.c index edd878239cf..830888a19c1 100644 --- a/src/vppinfra/timing_wheel.c +++ b/src/vppinfra/timing_wheel.c @@ -302,23 +302,19 @@ timing_wheel_insert (timing_wheel_t * w, u64 insert_cpu_time, u32 user_data) /* Delete elts with given user data so that stale events don't expire. */ vec_foreach (l, w->levels) { - /* *INDENT-OFF* */ clib_bitmap_foreach (wi, l->occupancy_bitmap) { l->elts[wi] = delete_user_data (l->elts[wi], user_data); if (vec_len (l->elts[wi]) == 0) l->occupancy_bitmap = clib_bitmap_andnoti (l->occupancy_bitmap, wi); } - /* *INDENT-ON* */ } { timing_wheel_overflow_elt_t *oe; - /* *INDENT-OFF* */ pool_foreach (oe, w->overflow_pool) { if (oe->user_data == user_data) pool_put (w->overflow_pool, oe); } - /* *INDENT-ON* */ } hash_unset (w->deleted_user_data_hash, user_data); @@ -397,10 +393,8 @@ timing_wheel_next_expiring_elt_time (timing_wheel_t * w) if (min_dt != ~0) min_t = w->cpu_time_base + min_dt; - /* *INDENT-OFF* */ pool_foreach (oe, w->overflow_pool) { min_t = clib_min (min_t, oe->cpu_time); } - /* *INDENT-ON* */ done: return min_t; @@ -485,7 +479,6 @@ advance_cpu_time_base (timing_wheel_t * w, u32 * expired_user_data) vec_foreach (l, w->levels) { uword wi; - /* *INDENT-OFF* */ clib_bitmap_foreach (wi, l->occupancy_bitmap) { vec_foreach (e, l->elts[wi]) { @@ -496,13 +489,11 @@ advance_cpu_time_base (timing_wheel_t * w, u32 * expired_user_data) e->cpu_time_relative_to_base -= delta; } } - /* *INDENT-ON* */ } /* See which overflow elements fit now. */ { timing_wheel_overflow_elt_t *oe; - /* *INDENT-OFF* */ pool_foreach (oe, w->overflow_pool) { /* It fits now into 32 bits. */ if (0 == ((oe->cpu_time - w->cpu_time_base) >> BITS (e->cpu_time_relative_to_base))) @@ -521,7 +512,6 @@ advance_cpu_time_base (timing_wheel_t * w, u32 * expired_user_data) pool_put (w->overflow_pool, oe); } } - /* *INDENT-ON* */ } return expired_user_data; } @@ -647,12 +637,10 @@ timing_wheel_advance (timing_wheel_t * w, u64 advance_cpu_time, break; level = vec_elt_at_index (w->levels, level_index); - /* *INDENT-OFF* */ clib_bitmap_foreach (wi, level->occupancy_bitmap) { expired_user_data = expire_bin (w, level_index, wi, advance_cpu_time, expired_user_data); } - /* *INDENT-ON* */ } if (PREDICT_TRUE (level_index < vec_len (w->levels))) diff --git a/src/vppinfra/vector_avx2.h b/src/vppinfra/vector_avx2.h index b832681632c..866c82fcec3 100644 --- a/src/vppinfra/vector_avx2.h +++ b/src/vppinfra/vector_avx2.h @@ -19,7 +19,6 @@ #include <vppinfra/clib.h> #include <x86intrin.h> -/* *INDENT-OFF* */ #define foreach_avx2_vec256i \ _(i,8,32,epi8) _(i,16,16,epi16) _(i,32,8,epi32) _(i,64,4,epi64) #define foreach_avx2_vec256u \ @@ -67,7 +66,6 @@ t##s##x##c##_interleave_hi (t##s##x##c a, t##s##x##c b) \ foreach_avx2_vec256i foreach_avx2_vec256u #undef _ -/* *INDENT-ON* */ always_inline u32x8 u32x8_permute (u32x8 v, u32x8 idx) @@ -80,7 +78,6 @@ u32x8_permute (u32x8 v, u32x8 idx) (__m256i) v, ((m0) | (m1) << 2 | (m2) << 4 | (m3) << 6)) /* _extract_lo, _extract_hi */ -/* *INDENT-OFF* */ #define _(t1,t2) \ always_inline t1 \ t2##_extract_lo (t2 v) \ @@ -103,7 +100,6 @@ _(u16x8, u16x16) _(u32x4, u32x8) _(u64x2, u64x4) #undef _ -/* *INDENT-ON* */ /* 256 bit packs. */ #define _(f, t, fn) \ @@ -132,7 +128,6 @@ i8x32_msb_mask (i8x32 v) } /* _from_ */ -/* *INDENT-OFF* */ #define _(f,t,i) \ static_always_inline t \ t##_from_##f (f x) \ @@ -151,7 +146,6 @@ _ (i8x16, i16x16, epi8_epi16) _(i8x16, i32x8, epi8_epi32) _(i8x16, i64x4, epi8_epi64) #undef _ -/* *INDENT-ON* */ static_always_inline u64x4 u64x4_byte_swap (u64x4 v) diff --git a/src/vppinfra/vector_avx512.h b/src/vppinfra/vector_avx512.h index f15a04ec128..699afec1212 100644 --- a/src/vppinfra/vector_avx512.h +++ b/src/vppinfra/vector_avx512.h @@ -19,7 +19,6 @@ #include <vppinfra/clib.h> #include <x86intrin.h> -/* *INDENT-OFF* */ #define foreach_avx512_vec512i \ _(i,8,64,epi8) _(i,16,32,epi16) _(i,32,16,epi32) _(i,64,8,epi64) #define foreach_avx512_vec512u \ @@ -91,7 +90,6 @@ foreach_avx512_vec512i foreach_avx512_vec512u #undef _ -/* *INDENT-ON* */ static_always_inline u32 u16x32_msb_mask (u16x32 v) @@ -479,12 +477,10 @@ u32x16_transpose (u32x16 m[16]) { __m512i r[16], a, b, c, d, x, y; - /* *INDENT-OFF* */ __m512i pm1 = (__m512i) (u64x8) { 0, 1, 8, 9, 4, 5, 12, 13}; __m512i pm2 = (__m512i) (u64x8) { 2, 3, 10, 11, 6, 7, 14, 15}; __m512i pm3 = (__m512i) (u64x8) { 0, 1, 2, 3, 8, 9, 10, 11}; __m512i pm4 = (__m512i) (u64x8) { 4, 5, 6, 7, 12, 13, 14, 15}; - /* *INDENT-ON* */ r[0] = _mm512_unpacklo_epi32 ((__m512i) m[0], (__m512i) m[1]); r[1] = _mm512_unpacklo_epi32 ((__m512i) m[2], (__m512i) m[3]); @@ -564,12 +560,10 @@ u64x8_transpose (u64x8 m[8]) { __m512i r[8], x, y; - /* *INDENT-OFF* */ __m512i pm1 = (__m512i) (u64x8) { 0, 1, 8, 9, 4, 5, 12, 13}; __m512i pm2 = (__m512i) (u64x8) { 2, 3, 10, 11, 6, 7, 14, 15}; __m512i pm3 = (__m512i) (u64x8) { 0, 1, 2, 3, 8, 9, 10, 11}; __m512i pm4 = (__m512i) (u64x8) { 4, 5, 6, 7, 12, 13, 14, 15}; - /* *INDENT-ON* */ r[0] = _mm512_unpacklo_epi64 ((__m512i) m[0], (__m512i) m[1]); r[1] = _mm512_unpacklo_epi64 ((__m512i) m[2], (__m512i) m[3]); diff --git a/src/vppinfra/vector_neon.h b/src/vppinfra/vector_neon.h index 70a7bc0f11e..48644ddbd98 100644 --- a/src/vppinfra/vector_neon.h +++ b/src/vppinfra/vector_neon.h @@ -43,7 +43,6 @@ u8x16_compare_byte_mask (u8x16 v) return (u32) (vgetq_lane_u64 (x64, 0) + (vgetq_lane_u64 (x64, 1) << 8)); } -/* *INDENT-OFF* */ #define foreach_neon_vec128i \ _(i,8,16,s8) _(i,16,8,s16) _(i,32,4,s32) _(i,64,2,s64) #define foreach_neon_vec128u \ @@ -109,7 +108,6 @@ u8x16_compare_byte_mask (u8x16 v) foreach_neon_vec128i foreach_neon_vec128u #undef _ -/* *INDENT-ON* */ static_always_inline u16x8 u16x8_byte_swap (u16x8 v) diff --git a/src/vppinfra/vector_sse42.h b/src/vppinfra/vector_sse42.h index 7c8e6255385..58d5da90125 100644 --- a/src/vppinfra/vector_sse42.h +++ b/src/vppinfra/vector_sse42.h @@ -41,7 +41,6 @@ #include <vppinfra/error_bootstrap.h> /* for ASSERT */ #include <x86intrin.h> -/* *INDENT-OFF* */ #define foreach_sse42_vec128i \ _(i,8,16,epi8) _(i,16,8,epi16) _(i,32,4,epi32) _(i,64,2,epi64x) #define foreach_sse42_vec128u \ @@ -92,7 +91,6 @@ t##s##x##c##_max (t##s##x##c a, t##s##x##c b) \ _(i,8,16,epi8) _(i,16,8,epi16) _(i,32,4,epi32) _(i,64,2,epi64) _(u,8,16,epu8) _(u,16,8,epu16) _(u,32,4,epu32) _(u,64,2,epu64) #undef _ -/* *INDENT-ON* */ #define CLIB_VEC128_SPLAT_DEFINED #define CLIB_HAVE_VEC128_UNALIGNED_LOAD_STORE @@ -412,7 +410,6 @@ u32x4_sum_elts (u32x4 sum4) } /* _from_ */ -/* *INDENT-OFF* */ #define _(f,t,i) \ static_always_inline t \ t##_from_##f (f x) \ @@ -432,7 +429,6 @@ _(i16x8, i32x4, epi16_epi32) _(i16x8, i64x2, epi16_epi64) _(i32x4, i64x2, epi32_epi64) #undef _ -/* *INDENT-ON* */ static_always_inline u64x2 u64x2_gather (void *p0, void *p1) |