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 /src/vnet/bfd | |
parent | e2ed59933153d665ee43add2de03a581627b73fa (diff) |
misc: remove GNU Indent directives
Type: refactor
Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/bfd')
-rw-r--r-- | src/vnet/bfd/bfd_api.c | 8 | ||||
-rw-r--r-- | src/vnet/bfd/bfd_cli.c | 25 | ||||
-rw-r--r-- | src/vnet/bfd/bfd_main.h | 2 | ||||
-rw-r--r-- | src/vnet/bfd/bfd_protocol.h | 10 | ||||
-rw-r--r-- | src/vnet/bfd/bfd_udp.c | 16 |
5 files changed, 0 insertions, 61 deletions
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, |