aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/bfd')
-rw-r--r--src/vnet/bfd/bfd_api.c12
-rw-r--r--src/vnet/bfd/bfd_cli.c8
-rw-r--r--src/vnet/bfd/bfd_udp.c24
3 files changed, 23 insertions, 21 deletions
diff --git a/src/vnet/bfd/bfd_api.c b/src/vnet/bfd/bfd_api.c
index cc28b0b6b55..ba7783fd54f 100644
--- a/src/vnet/bfd/bfd_api.c
+++ b/src/vnet/bfd/bfd_api.c
@@ -181,7 +181,7 @@ bfd_event (bfd_main_t * bm, bfd_session_t * bs)
vpe_client_registration_t *reg;
vl_api_registration_t *vl_reg;
/* *INDENT-OFF* */
- pool_foreach (reg, vam->bfd_events_registrations, ({
+ pool_foreach (reg, vam->bfd_events_registrations) {
vl_reg = vl_api_client_index_to_registration (reg->client_index);
if (vl_reg)
{
@@ -193,7 +193,7 @@ bfd_event (bfd_main_t * bm, bfd_session_t * bs)
send_bfd_udp_session_details (vl_reg, 0, bs);
}
}
- }));
+ }
/* *INDENT-ON* */
}
@@ -208,11 +208,11 @@ vl_api_bfd_udp_session_dump_t_handler (vl_api_bfd_udp_session_dump_t * mp)
bfd_session_t *bs = NULL;
/* *INDENT-OFF* */
- pool_foreach (bs, bfd_main.sessions, ({
+ 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* */
}
@@ -265,7 +265,7 @@ vl_api_bfd_auth_keys_dump_t_handler (vl_api_bfd_auth_keys_dump_t * mp)
vl_api_bfd_auth_keys_details_t *rmp = NULL;
/* *INDENT-OFF* */
- pool_foreach (key, bfd_main.auth_keys, ({
+ pool_foreach (key, bfd_main.auth_keys) {
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_BFD_AUTH_KEYS_DETAILS);
@@ -274,7 +274,7 @@ vl_api_bfd_auth_keys_dump_t_handler (vl_api_bfd_auth_keys_dump_t * mp)
rmp->auth_type = key->auth_type;
rmp->use_count = clib_host_to_net_u32 (key->use_count);
vl_api_send_msg (reg, (u8 *)rmp);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/bfd/bfd_cli.c b/src/vnet/bfd/bfd_cli.c
index a6953bd2687..1d100b077eb 100644
--- a/src/vnet/bfd/bfd_cli.c
+++ b/src/vnet/bfd/bfd_cli.c
@@ -135,10 +135,10 @@ show_bfd (vlib_main_t * vm, unformat_input_t * input,
u8 *s = format (NULL, "%=10s %=25s %=10s\n", "Configuration Key ID",
"Type", "Use Count");
/* *INDENT-OFF* */
- pool_foreach (key, bm->auth_keys, {
+ 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);
@@ -150,9 +150,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, {
+ 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);
diff --git a/src/vnet/bfd/bfd_udp.c b/src/vnet/bfd/bfd_udp.c
index 2bb4c1d615f..1facb73107f 100644
--- a/src/vnet/bfd/bfd_udp.c
+++ b/src/vnet/bfd/bfd_udp.c
@@ -1581,17 +1581,19 @@ bfd_udp_sw_if_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_create)
if (!is_create)
{
bfd_session_t *bs;
- pool_foreach (bs, bfd_udp_main.bfd_main->sessions,
- {
- if (bs->transport != BFD_TRANSPORT_UDP4 &&
- bs->transport != BFD_TRANSPORT_UDP6)
- {
- continue;}
- if (bs->udp.key.sw_if_index != sw_if_index)
- {
- continue;}
- vec_add1 (to_be_freed, bs);}
- );
+ pool_foreach (bs, bfd_udp_main.bfd_main->sessions)
+ {
+ if (bs->transport != BFD_TRANSPORT_UDP4 &&
+ bs->transport != BFD_TRANSPORT_UDP6)
+ {
+ continue;
+ }
+ if (bs->udp.key.sw_if_index != sw_if_index)
+ {
+ continue;
+ }
+ vec_add1 (to_be_freed, bs);
+ }
}
bfd_session_t **bs;
vec_foreach (bs, to_be_freed)