summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-12-13 21:47:40 +0100
committerDave Barach <openvpp@barachs.net>2020-12-14 12:14:21 +0000
commitb2c31b685fd2cf28436ca32bc93e23eb24c74878 (patch)
treedc0a1b1ff784445b2cbb0f9b2c07b5bcb4f5a5d0 /src/vnet
parent62c25abaa3e93be5815172d391295a6ab0390122 (diff)
misc: move to new pool_foreach macros
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/adj/adj.c6
-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
-rw-r--r--src/vnet/bier/bier_api.c18
-rw-r--r--src/vnet/bier/bier_disp_table.c6
-rw-r--r--src/vnet/bier/bier_fmask.c6
-rw-r--r--src/vnet/bier/bier_imp.c6
-rw-r--r--src/vnet/bier/bier_table.c6
-rw-r--r--src/vnet/bonding/cli.c16
-rw-r--r--src/vnet/classify/classify_api.c18
-rw-r--r--src/vnet/classify/vnet_classify.c6
-rw-r--r--src/vnet/devices/af_packet/af_packet.c6
-rw-r--r--src/vnet/devices/tap/cli.c6
-rw-r--r--src/vnet/devices/tap/tap.c4
-rw-r--r--src/vnet/devices/virtio/cli.c5
-rw-r--r--src/vnet/devices/virtio/pci.c4
-rw-r--r--src/vnet/devices/virtio/vhost_user.c27
-rw-r--r--src/vnet/devices/virtio/virtio_api.c15
-rw-r--r--src/vnet/devices/virtio/virtio_process.c4
-rw-r--r--src/vnet/dpo/load_balance.c6
-rw-r--r--src/vnet/dpo/load_balance_map.c6
-rw-r--r--src/vnet/dpo/lookup_dpo.c6
-rw-r--r--src/vnet/dpo/replicate_dpo.c6
-rw-r--r--src/vnet/fib/fib_entry.c18
-rw-r--r--src/vnet/fib/fib_entry_delegate.c6
-rw-r--r--src/vnet/fib/fib_path.c6
-rw-r--r--src/vnet/fib/fib_path_list.c6
-rw-r--r--src/vnet/fib/fib_urpf_list.c6
-rw-r--r--src/vnet/fib/ip4_fib.c6
-rw-r--r--src/vnet/fib/ip6_fib.c6
-rw-r--r--src/vnet/fib/mpls_fib.c6
-rw-r--r--src/vnet/flow/flow_cli.c4
-rw-r--r--src/vnet/gre/gre_api.c6
-rw-r--r--src/vnet/gre/interface.c6
-rw-r--r--src/vnet/interface.c26
-rw-r--r--src/vnet/interface_api.c12
-rw-r--r--src/vnet/interface_cli.c20
-rw-r--r--src/vnet/ip-neighbor/ip_neighbor.c24
-rw-r--r--src/vnet/ip/ip4_forward.c6
-rw-r--r--src/vnet/ip/ip6_forward.c6
-rw-r--r--src/vnet/ip/ip_api.c42
-rw-r--r--src/vnet/ip/ip_container_proxy.c12
-rw-r--r--src/vnet/ip/reass/ip4_full_reass.c8
-rw-r--r--src/vnet/ip/reass/ip4_sv_reass.c8
-rw-r--r--src/vnet/ip/reass/ip6_full_reass.c8
-rw-r--r--src/vnet/ip/reass/ip6_sv_reass.c8
-rw-r--r--src/vnet/ip6-nd/ip6_mld.c18
-rw-r--r--src/vnet/ip6-nd/ip6_nd_api.c12
-rw-r--r--src/vnet/ip6-nd/ip6_ra.c42
-rw-r--r--src/vnet/ip6-nd/rd_cp.c36
-rw-r--r--src/vnet/ipip/ipip_api.c6
-rw-r--r--src/vnet/ipip/ipip_cli.c4
-rw-r--r--src/vnet/ipsec/ipsec.c20
-rw-r--r--src/vnet/ipsec/ipsec_api.c12
-rw-r--r--src/vnet/ipsec/ipsec_cli.c20
-rw-r--r--src/vnet/ipsec/ipsec_itf.c6
-rw-r--r--src/vnet/ipsec/ipsec_sa.c6
-rw-r--r--src/vnet/ipsec/ipsec_tun.c6
-rw-r--r--src/vnet/l2/l2_api.c12
-rw-r--r--src/vnet/l2/l2_input.c2
-rw-r--r--src/vnet/l2/l2_rw.c4
-rw-r--r--src/vnet/l2/l2_xcrw.c6
-rw-r--r--src/vnet/mfib/ip4_mfib.c12
-rw-r--r--src/vnet/mfib/ip6_mfib.c6
-rw-r--r--src/vnet/mfib/mfib_entry.c6
-rw-r--r--src/vnet/mfib/mfib_itf.c6
-rw-r--r--src/vnet/mpls/mpls_api.c6
-rw-r--r--src/vnet/mpls/mpls_tunnel.c12
-rw-r--r--src/vnet/pg/cli.c8
-rw-r--r--src/vnet/session/application.c40
-rw-r--r--src/vnet/session/application_namespace.c8
-rw-r--r--src/vnet/session/segment_manager.c22
-rw-r--r--src/vnet/session/session_api.c8
-rw-r--r--src/vnet/session/session_cli.c12
-rw-r--r--src/vnet/session/session_rules_table.c8
-rw-r--r--src/vnet/session/session_table.h2
-rw-r--r--src/vnet/srmpls/sr_mpls_policy.c4
-rw-r--r--src/vnet/srmpls/sr_mpls_steering.c4
-rw-r--r--src/vnet/srp/interface.c4
-rw-r--r--src/vnet/srp/node.c4
-rw-r--r--src/vnet/srv6/sr_api.c24
-rw-r--r--src/vnet/srv6/sr_localsid.c10
-rw-r--r--src/vnet/srv6/sr_policy_rewrite.c12
-rw-r--r--src/vnet/srv6/sr_steering.c2
-rw-r--r--src/vnet/tcp/tcp_bt.c4
-rw-r--r--src/vnet/teib/teib.c18
-rw-r--r--src/vnet/udp/udp_api.c6
-rw-r--r--src/vnet/udp/udp_encap.c12
-rw-r--r--src/vnet/unix/gdb_funcs.c6
-rw-r--r--src/vnet/vxlan-gbp/vxlan_gbp.c6
-rw-r--r--src/vnet/vxlan-gbp/vxlan_gbp_api.c6
-rw-r--r--src/vnet/vxlan-gpe/vxlan_gpe.c6
-rw-r--r--src/vnet/vxlan-gpe/vxlan_gpe_api.c6
-rw-r--r--src/vnet/vxlan/vxlan.c6
-rw-r--r--src/vnet/vxlan/vxlan_api.c6
96 files changed, 496 insertions, 501 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index 5c6ea9b71af..d3890223dc1 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -680,8 +680,8 @@ adj_show (vlib_main_t * vm,
else
{
/* *INDENT-OFF* */
- pool_foreach_index(ai, adj_pool,
- ({
+ pool_foreach_index (ai, adj_pool)
+ {
if (~0 != sw_if_index &&
sw_if_index != adj_get_sw_if_index(ai))
{
@@ -693,7 +693,7 @@ adj_show (vlib_main_t * vm,
format_ip_adjacency, ai,
FORMAT_IP_ADJACENCY_NONE);
}
- }));
+ }
/* *INDENT-ON* */
}
}
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)
diff --git a/src/vnet/bier/bier_api.c b/src/vnet/bier/bier_api.c
index e06a53edd97..366fba174e7 100644
--- a/src/vnet/bier/bier_api.c
+++ b/src/vnet/bier/bier_api.c
@@ -145,8 +145,8 @@ vl_api_bier_table_dump_t_handler (vl_api_bier_table_dump_t * mp)
if (!reg)
return;
- pool_foreach(bt, bier_table_pool,
- ({
+ pool_foreach (bt, bier_table_pool)
+ {
/*
* skip the ecmp tables.
*/
@@ -154,7 +154,7 @@ vl_api_bier_table_dump_t_handler (vl_api_bier_table_dump_t * mp)
{
send_bier_table_details(reg, mp->context, bt);
}
- }));
+ }
}
static void
@@ -405,10 +405,10 @@ vl_api_bier_imp_dump_t_handler (vl_api_bier_imp_dump_t * mp)
if (!reg)
return;
- pool_foreach(bi, bier_imp_pool,
- ({
+ pool_foreach (bi, bier_imp_pool)
+ {
send_bier_imp_details(reg, mp->context, bi);
- }));
+ }
}
static void
@@ -466,10 +466,10 @@ vl_api_bier_disp_table_dump_t_handler (vl_api_bier_disp_table_dump_t * mp)
if (!reg)
return;
- pool_foreach(bdt, bier_disp_table_pool,
- ({
+ pool_foreach (bdt, bier_disp_table_pool)
+ {
send_bier_disp_table_details(reg, mp->context, bdt);
- }));
+ }
}
static void
diff --git a/src/vnet/bier/bier_disp_table.c b/src/vnet/bier/bier_disp_table.c
index cf9f0538df7..bdbc9a9cb59 100644
--- a/src/vnet/bier/bier_disp_table.c
+++ b/src/vnet/bier/bier_disp_table.c
@@ -376,12 +376,12 @@ show_bier_disp_table (vlib_main_t * vm,
if (INDEX_INVALID == bdti)
{
- pool_foreach(bdt, bier_disp_table_pool,
- ({
+ pool_foreach (bdt, bier_disp_table_pool)
+ {
vlib_cli_output(vm, "%U", format_bier_disp_table,
bier_disp_table_get_index(bdt),
0, BIER_SHOW_BRIEF);
- }));
+ }
}
else
{
diff --git a/src/vnet/bier/bier_fmask.c b/src/vnet/bier/bier_fmask.c
index a58a77ff281..b7fca4dca23 100644
--- a/src/vnet/bier/bier_fmask.c
+++ b/src/vnet/bier/bier_fmask.c
@@ -556,12 +556,12 @@ bier_fmask_show (vlib_main_t * vm,
if (INDEX_INVALID == bfmi)
{
- pool_foreach(bfm, bier_fmask_pool,
- ({
+ pool_foreach (bfm, bier_fmask_pool)
+ {
vlib_cli_output (vm, "[@%d] %U",
bier_fmask_get_index(bfm),
format_bier_fmask, bier_fmask_get_index(bfm), 0);
- }));
+ }
}
else
{
diff --git a/src/vnet/bier/bier_imp.c b/src/vnet/bier/bier_imp.c
index 2da3f668cac..660b07e48ae 100644
--- a/src/vnet/bier/bier_imp.c
+++ b/src/vnet/bier/bier_imp.c
@@ -265,13 +265,13 @@ show_bier_imp (vlib_main_t * vm,
if (INDEX_INVALID == bii)
{
- pool_foreach(bi, bier_imp_pool,
- ({
+ pool_foreach (bi, bier_imp_pool)
+ {
vlib_cli_output(vm, "%U", format_bier_imp,
bier_imp_get_index(bi),
1,
BIER_SHOW_BRIEF);
- }));
+ }
}
else
{
diff --git a/src/vnet/bier/bier_table.c b/src/vnet/bier/bier_table.c
index 0e8cc1e88b4..4383053f495 100644
--- a/src/vnet/bier/bier_table.c
+++ b/src/vnet/bier/bier_table.c
@@ -909,10 +909,10 @@ bier_table_show_all (vlib_main_t * vm,
{
int ii;
- pool_foreach_index(ii, bier_table_pool,
- ({
+ pool_foreach_index (ii, bier_table_pool)
+ {
vlib_cli_output (vm, "%U", format_bier_table, ii, flags);
- }));
+ }
}
}
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c
index 9f9ac53365a..4ddee4a171b 100644
--- a/src/vnet/bonding/cli.c
+++ b/src/vnet/bonding/cli.c
@@ -184,7 +184,7 @@ bond_dump_ifs (bond_interface_details_t ** out_bondifs)
bond_interface_details_t *bondif = NULL;
/* *INDENT-OFF* */
- pool_foreach (bif, bm->interfaces,
+ pool_foreach (bif, bm->interfaces) {
vec_add2(r_bondifs, bondif, 1);
clib_memset (bondif, 0, sizeof (*bondif));
bondif->id = bif->id;
@@ -200,7 +200,7 @@ bond_dump_ifs (bond_interface_details_t ** out_bondifs)
bondif->numa_only = bif->numa_only;
bondif->active_members = vec_len (bif->active_members);
bondif->members = vec_len (bif->members);
- );
+ }
/* *INDENT-ON* */
*out_bondifs = r_bondifs;
@@ -899,14 +899,14 @@ show_bond (vlib_main_t * vm)
"load balance", "active members", "members");
/* *INDENT-OFF* */
- pool_foreach (bif, bm->interfaces,
- ({
+ pool_foreach (bif, bm->interfaces)
+ {
vlib_cli_output (vm, "%-16U %-12d %-13U %-13U %-14u %u",
format_bond_interface_name, bif->dev_instance,
bif->sw_if_index, format_bond_mode, bif->mode,
format_bond_load_balance, bif->lb,
vec_len (bif->active_members), vec_len (bif->members));
- }));
+ }
/* *INDENT-ON* */
}
@@ -918,8 +918,8 @@ show_bond_details (vlib_main_t * vm)
u32 *sw_if_index;
/* *INDENT-OFF* */
- pool_foreach (bif, bm->interfaces,
- ({
+ pool_foreach (bif, bm->interfaces)
+ {
vlib_cli_output (vm, "%U", format_bond_interface_name, bif->dev_instance);
vlib_cli_output (vm, " mode: %U",
format_bond_mode, bif->mode);
@@ -955,7 +955,7 @@ show_bond_details (vlib_main_t * vm)
vlib_cli_output (vm, " interface id: %d", bif->id);
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* */
}
diff --git a/src/vnet/classify/classify_api.c b/src/vnet/classify/classify_api.c
index b0750e95124..f489928ae6d 100644
--- a/src/vnet/classify/classify_api.c
+++ b/src/vnet/classify/classify_api.c
@@ -277,10 +277,10 @@ vl_api_classify_table_ids_t_handler (vl_api_classify_table_ids_t * mp)
u32 count;
/* *INDENT-OFF* */
- pool_foreach (t, cm->tables,
- ({
+ pool_foreach (t, cm->tables)
+ {
vec_add1 (table_ids, ntohl(t - cm->tables));
- }));
+ }
/* *INDENT-ON* */
count = vec_len (table_ids);
@@ -365,8 +365,8 @@ vl_api_classify_table_info_t_handler (vl_api_classify_table_info_t * mp)
vnet_classify_table_t *t;
/* *INDENT-OFF* */
- pool_foreach (t, cm->tables,
- ({
+ pool_foreach (t, cm->tables)
+ {
if (table_id == t - cm->tables)
{
rmp = vl_msg_api_alloc_as_if_client
@@ -385,7 +385,7 @@ vl_api_classify_table_info_t_handler (vl_api_classify_table_info_t * mp)
rmp->retval = 0;
break;
}
- }));
+ }
/* *INDENT-ON* */
if (rmp == 0)
@@ -435,8 +435,8 @@ vl_api_classify_session_dump_t_handler (vl_api_classify_session_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (t, cm->tables,
- ({
+ pool_foreach (t, cm->tables)
+ {
if (table_id == t - cm->tables)
{
vnet_classify_bucket_t * b;
@@ -467,7 +467,7 @@ vl_api_classify_session_dump_t_handler (vl_api_classify_session_dump_t * mp)
}
break;
}
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/classify/vnet_classify.c b/src/vnet/classify/vnet_classify.c
index 1e7515e1e12..088890a5717 100644
--- a/src/vnet/classify/vnet_classify.c
+++ b/src/vnet/classify/vnet_classify.c
@@ -2190,11 +2190,11 @@ show_classify_tables_command_fn (vlib_main_t * vm,
}
/* *INDENT-OFF* */
- pool_foreach (t, cm->tables,
- ({
+ 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))
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c
index 62371cd5495..31d4df0c0e3 100644
--- a/src/vnet/devices/af_packet/af_packet.c
+++ b/src/vnet/devices/af_packet/af_packet.c
@@ -506,8 +506,8 @@ af_packet_dump_ifs (af_packet_if_detail_t ** out_af_packet_ifs)
af_packet_if_detail_t *af_packet_if = NULL;
/* *INDENT-OFF* */
- pool_foreach (apif, apm->interfaces,
- ({
+ pool_foreach (apif, apm->interfaces)
+ {
vec_add2 (r_af_packet_ifs, af_packet_if, 1);
af_packet_if->sw_if_index = apif->sw_if_index;
if (apif->host_if_name)
@@ -516,7 +516,7 @@ af_packet_dump_ifs (af_packet_if_detail_t ** out_af_packet_ifs)
MIN (ARRAY_LEN (af_packet_if->host_if_name) - 1,
strlen ((const char *) apif->host_if_name)));
}
- }));
+ }
/* *INDENT-ON* */
*out_af_packet_ifs = r_af_packet_ifs;
diff --git a/src/vnet/devices/tap/cli.c b/src/vnet/devices/tap/cli.c
index 89b2ff091b0..10f4bb0ee2e 100644
--- a/src/vnet/devices/tap/cli.c
+++ b/src/vnet/devices/tap/cli.c
@@ -297,9 +297,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,
+ pool_foreach (vif, mm->interfaces)
vec_add1 (hw_if_indices, vif->hw_if_index);
- );
/* *INDENT-ON* */
}
@@ -347,9 +346,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,
+ pool_foreach (vif, mm->interfaces)
vec_add1 (hw_if_indices, vif->hw_if_index);
- );
/* *INDENT-ON* */
}
diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c
index b65879c42fc..11c24808f7b 100644
--- a/src/vnet/devices/tap/tap.c
+++ b/src/vnet/devices/tap/tap.c
@@ -946,7 +946,7 @@ tap_dump_ifs (tap_interface_details_t ** out_tapids)
tap_interface_details_t *tapid = NULL;
/* *INDENT-OFF* */
- pool_foreach (vif, mm->interfaces,
+ pool_foreach (vif, mm->interfaces) {
if ((vif->type != VIRTIO_IF_TYPE_TAP)
&& (vif->type != VIRTIO_IF_TYPE_TUN))
continue;
@@ -988,7 +988,7 @@ tap_dump_ifs (tap_interface_details_t ** out_tapids)
clib_memcpy(tapid->host_ip6_addr.as_u8, &vif->host_ip6_addr, 16);
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 05f9eab18cf..a78336997e2 100644
--- a/src/vnet/devices/virtio/cli.c
+++ b/src/vnet/devices/virtio/cli.c
@@ -231,9 +231,8 @@ show_virtio_pci_fn (vlib_main_t * vm, unformat_input_t * input,
if (vec_len (hw_if_indices) == 0)
{
- pool_foreach (vif, vim->interfaces,
- vec_add1 (hw_if_indices, vif->hw_if_index);
- );
+ pool_foreach (vif, vim->interfaces)
+ vec_add1 (hw_if_indices, vif->hw_if_index);
}
else if (show_device_config)
{
diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c
index 785ca4839c5..93ea70b3b53 100644
--- a/src/vnet/devices/virtio/pci.c
+++ b/src/vnet/devices/virtio/pci.c
@@ -1352,7 +1352,7 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args)
u32 interrupt_count = 0;
/* *INDENT-OFF* */
- pool_foreach (vif, vim->interfaces, ({
+ pool_foreach (vif, vim->interfaces) {
if (vif->pci_addr.as_u32 == args->addr)
{
args->rv = VNET_API_ERROR_ADDRESS_IN_USE;
@@ -1363,7 +1363,7 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args)
" PCI address in use");
return;
}
- }));
+ }
/* *INDENT-ON* */
pool_get (vim->interfaces, vif);
diff --git a/src/vnet/devices/virtio/vhost_user.c b/src/vnet/devices/virtio/vhost_user.c
index f7cecef4d19..45897b66cb6 100644
--- a/src/vnet/devices/virtio/vhost_user.c
+++ b/src/vnet/devices/virtio/vhost_user.c
@@ -1126,7 +1126,7 @@ vhost_user_send_interrupt_process (vlib_main_t * vm,
case ~0:
/* *INDENT-OFF* */
- pool_foreach (vui, vum->vhost_user_interfaces, {
+ pool_foreach (vui, vum->vhost_user_interfaces) {
next_timeout = timeout;
for (qid = 0; qid < VHOST_VRING_MAX_N / 2; qid += 2)
{
@@ -1154,7 +1154,7 @@ vhost_user_send_interrupt_process (vlib_main_t * vm,
if ((next_timeout < timeout) && (next_timeout > 0.0))
timeout = next_timeout;
}
- });
+ }
/* *INDENT-ON* */
break;
@@ -1205,7 +1205,7 @@ vhost_user_process (vlib_main_t * vm,
timeout = 3.0;
/* *INDENT-OFF* */
- pool_foreach (vui, vum->vhost_user_interfaces, {
+ pool_foreach (vui, vum->vhost_user_interfaces) {
if (vui->unix_server_index == ~0) { //Nothing to do for server sockets
if (vui->clib_file_index == ~0)
@@ -1273,7 +1273,7 @@ vhost_user_process (vlib_main_t * vm,
}
}
}
- });
+ }
/* *INDENT-ON* */
}
return 0;
@@ -1408,9 +1408,9 @@ vhost_user_exit (vlib_main_t * vm)
vlib_worker_thread_barrier_sync (vlib_get_main ());
/* *INDENT-OFF* */
- pool_foreach (vui, vum->vhost_user_interfaces, {
+ 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;
@@ -1832,9 +1832,8 @@ vhost_user_dump_ifs (vnet_main_t * vnm, vlib_main_t * vm,
if (!out_vuids)
return -1;
- pool_foreach (vui, vum->vhost_user_interfaces,
- vec_add1 (hw_if_indices, vui->hw_if_index);
- );
+ pool_foreach (vui, vum->vhost_user_interfaces)
+ vec_add1 (hw_if_indices, vui->hw_if_index);
for (i = 0; i < vec_len (hw_if_indices); i++)
{
@@ -2110,9 +2109,8 @@ show_vhost_user_command_fn (vlib_main_t * vm,
}
if (vec_len (hw_if_indices) == 0)
{
- pool_foreach (vui, vum->vhost_user_interfaces,
- vec_add1 (hw_if_indices, vui->hw_if_index);
- );
+ pool_foreach (vui, vum->vhost_user_interfaces)
+ vec_add1 (hw_if_indices, vui->hw_if_index);
}
vlib_cli_output (vm, "Virtio vhost-user interfaces");
vlib_cli_output (vm, "Global:\n coalesce frames %d time %e",
@@ -2509,9 +2507,8 @@ vhost_user_unmap_all (void)
if (vum->dont_dump_vhost_user_memory)
{
- pool_foreach (vui, vum->vhost_user_interfaces,
- unmap_all_mem_regions (vui);
- );
+ pool_foreach (vui, vum->vhost_user_interfaces)
+ unmap_all_mem_regions (vui);
}
}
diff --git a/src/vnet/devices/virtio/virtio_api.c b/src/vnet/devices/virtio/virtio_api.c
index bd72284fd78..4d0b663b3dd 100644
--- a/src/vnet/devices/virtio/virtio_api.c
+++ b/src/vnet/devices/virtio/virtio_api.c
@@ -232,14 +232,13 @@ static void
if (!reg)
return;
- pool_foreach (vif, vmx->interfaces, (
- {
- if (vif->type == VIRTIO_IF_TYPE_PCI)
- {
- virtio_pci_send_sw_interface_details
- (am, reg, vif, mp->context);}
- }
- ));
+ pool_foreach (vif, vmx->interfaces)
+ {
+ if (vif->type == VIRTIO_IF_TYPE_PCI)
+ {
+ virtio_pci_send_sw_interface_details (am, reg, vif, mp->context);
+ }
+ }
}
#define vl_msg_name_crc_list
diff --git a/src/vnet/devices/virtio/virtio_process.c b/src/vnet/devices/virtio/virtio_process.c
index 7a25611bb95..1689459f1cc 100644
--- a/src/vnet/devices/virtio/virtio_process.c
+++ b/src/vnet/devices/virtio/virtio_process.c
@@ -46,7 +46,7 @@ virtio_send_interrupt_process (vlib_main_t * vm,
case ~0:
/* *INDENT-OFF* */
- pool_foreach (vif, vim->interfaces, {
+ pool_foreach (vif, vim->interfaces) {
if (vif->packet_coalesce || vif->packet_buffering)
{
virtio_vring_t *vring;
@@ -59,7 +59,7 @@ virtio_send_interrupt_process (vlib_main_t * vm,
RX_QUEUE_ACCESS (vring->queue_id));
}
}
- });
+ }
/* *INDENT-ON* */
break;
diff --git a/src/vnet/dpo/load_balance.c b/src/vnet/dpo/load_balance.c
index c0c440c25f2..fb876a09ec2 100644
--- a/src/vnet/dpo/load_balance.c
+++ b/src/vnet/dpo/load_balance.c
@@ -1029,12 +1029,12 @@ load_balance_show (vlib_main_t * vm,
{
load_balance_t *lb;
- pool_foreach(lb, load_balance_pool,
- ({
+ pool_foreach (lb, load_balance_pool)
+ {
vlib_cli_output (vm, "%U", format_load_balance,
load_balance_get_index(lb),
LOAD_BALANCE_FORMAT_NONE);
- }));
+ }
}
return 0;
diff --git a/src/vnet/dpo/load_balance_map.c b/src/vnet/dpo/load_balance_map.c
index de5f30bc60a..55249747e5d 100644
--- a/src/vnet/dpo/load_balance_map.c
+++ b/src/vnet/dpo/load_balance_map.c
@@ -575,11 +575,11 @@ load_balance_map_show (vlib_main_t * vm,
{
load_balance_map_t *lbm;
- pool_foreach(lbm, load_balance_map_pool,
- ({
+ pool_foreach (lbm, load_balance_map_pool)
+ {
vlib_cli_output (vm, "%U", format_load_balance_map,
load_balance_map_get_index(lbm), 0);
- }));
+ }
}
return 0;
diff --git a/src/vnet/dpo/lookup_dpo.c b/src/vnet/dpo/lookup_dpo.c
index 677a19fe862..23a1285be53 100644
--- a/src/vnet/dpo/lookup_dpo.c
+++ b/src/vnet/dpo/lookup_dpo.c
@@ -1480,13 +1480,13 @@ lookup_dpo_show (vlib_main_t * vm,
{
lookup_dpo_t *lkd;
- pool_foreach(lkd, lookup_dpo_pool,
- ({
+ pool_foreach (lkd, lookup_dpo_pool)
+ {
vlib_cli_output (vm, "[@%d] %U",
lookup_dpo_get_index(lkd),
format_lookup_dpo,
lookup_dpo_get_index(lkd));
- }));
+ }
}
return 0;
diff --git a/src/vnet/dpo/replicate_dpo.c b/src/vnet/dpo/replicate_dpo.c
index cd753dcd35b..929fed0b831 100644
--- a/src/vnet/dpo/replicate_dpo.c
+++ b/src/vnet/dpo/replicate_dpo.c
@@ -697,12 +697,12 @@ replicate_show (vlib_main_t * vm,
{
replicate_t *rep;
- pool_foreach(rep, replicate_pool,
- ({
+ pool_foreach (rep, replicate_pool)
+ {
vlib_cli_output (vm, "%U", format_replicate,
replicate_get_index(rep),
REPLICATE_FORMAT_NONE);
- }));
+ }
}
return 0;
diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c
index 33c29a6e33c..a5fab8551ce 100644
--- a/src/vnet/fib/fib_entry.c
+++ b/src/vnet/fib/fib_entry.c
@@ -357,14 +357,14 @@ fib_entry_show_memory (void)
pool_len(fib_entry_pool),
sizeof(fib_entry_t));
- pool_foreach(entry, fib_entry_pool,
- ({
+ pool_foreach (entry, fib_entry_pool)
+ {
n_srcs += vec_len(entry->fe_srcs);
vec_foreach(esrc, entry->fe_srcs)
{
n_exts += fib_path_ext_list_length(&esrc->fes_path_exts);
}
- }));
+ }
fib_show_memory_usage("Entry Source",
n_srcs, n_srcs, sizeof(fib_entry_src_t));
@@ -1741,11 +1741,11 @@ fib_table_assert_empty (const fib_table_t *fib_table)
fib_node_index_t *fei, *feis = NULL;
fib_entry_t *fib_entry;
- pool_foreach (fib_entry, fib_entry_pool,
- ({
+ pool_foreach (fib_entry, fib_entry_pool)
+ {
if (fib_entry->fe_fib_index == fib_table->ft_index)
vec_add1 (feis, fib_entry_get_index(fib_entry));
- }));
+ }
if (vec_len(feis))
{
@@ -1787,13 +1787,13 @@ show_fib_entry_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "FIB Entries:");
- pool_foreach_index(fei, fib_entry_pool,
- ({
+ pool_foreach_index (fei, fib_entry_pool)
+ {
vlib_cli_output (vm, "%d@%U",
fei,
format_fib_entry, fei,
FIB_ENTRY_FORMAT_BRIEF);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/fib_entry_delegate.c b/src/vnet/fib/fib_entry_delegate.c
index d7503fbb1b9..466327b7f22 100644
--- a/src/vnet/fib/fib_entry_delegate.c
+++ b/src/vnet/fib/fib_entry_delegate.c
@@ -333,12 +333,12 @@ show_fib_entry_delegate_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "FIB Entry Delegates:");
- pool_foreach_index(fedi, fib_entry_delegate_pool,
- ({
+ pool_foreach_index (fedi, fib_entry_delegate_pool)
+ {
vlib_cli_output (vm, "%d@%U",
fedi,
format_fib_entry_delegate, fedi);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 08076ec63c2..f48b64484cb 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -2821,11 +2821,11 @@ show_fib_path_command (vlib_main_t * vm,
else
{
vlib_cli_output (vm, "FIB Paths");
- pool_foreach_index (pi, fib_path_pool,
- ({
+ pool_foreach_index (pi, fib_path_pool)
+ {
vlib_cli_output (vm, "%U", format_fib_path, pi, 0,
FIB_PATH_FORMAT_FLAGS_NONE);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/fib_path_list.c b/src/vnet/fib/fib_path_list.c
index 2ad7c30e50a..184399aa309 100644
--- a/src/vnet/fib/fib_path_list.c
+++ b/src/vnet/fib/fib_path_list.c
@@ -1474,10 +1474,10 @@ show_fib_path_list_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "FIB Path Lists");
- pool_foreach_index (pli, fib_path_list_pool,
- ({
+ pool_foreach_index (pli, fib_path_list_pool)
+ {
vlib_cli_output (vm, "%U", format_fib_path_list, pli, 0);
- }));
+ }
}
return (NULL);
}
diff --git a/src/vnet/fib/fib_urpf_list.c b/src/vnet/fib/fib_urpf_list.c
index bd225142a1d..4f751a63627 100644
--- a/src/vnet/fib/fib_urpf_list.c
+++ b/src/vnet/fib/fib_urpf_list.c
@@ -207,12 +207,12 @@ show_fib_urpf_list_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "FIB uRPF Entries:");
- pool_foreach_index(ui, fib_urpf_list_pool,
- ({
+ pool_foreach_index (ui, fib_urpf_list_pool)
+ {
vlib_cli_output (vm, "%d@%U",
ui,
format_fib_urpf_list, ui);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c
index 9142c636cdf..a3010149a4d 100644
--- a/src/vnet/fib/ip4_fib.c
+++ b/src/vnet/fib/ip4_fib.c
@@ -616,8 +616,8 @@ ip4_show_fib (vlib_main_t * vm,
break;
}
- pool_foreach (fib_table, im4->fibs,
- ({
+ pool_foreach (fib_table, im4->fibs)
+ {
ip4_fib_t *fib = pool_elt_at_index(im4->v4_fibs, fib_table->ft_index);
fib_source_t source;
u8 *s = NULL;
@@ -704,7 +704,7 @@ ip4_show_fib (vlib_main_t * vm,
ip4_fib_table_show_one(fib, vm, &matching_address,
matching_mask, detail);
}
- }));
+ }
if (memory)
{
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c
index 861edccd4a9..6943166663f 100644
--- a/src/vnet/fib/ip6_fib.c
+++ b/src/vnet/fib/ip6_fib.c
@@ -696,8 +696,8 @@ ip6_show_fib (vlib_main_t * vm,
return (NULL);
}
- pool_foreach (fib_table, im6->fibs,
- ({
+ pool_foreach (fib_table, im6->fibs)
+ {
fib_source_t source;
u8 *s = NULL;
@@ -762,7 +762,7 @@ ip6_show_fib (vlib_main_t * vm,
{
ip6_fib_table_show_one(fib, vm, &matching_address, mask_len, detail);
}
- }));
+ }
return 0;
}
diff --git a/src/vnet/fib/mpls_fib.c b/src/vnet/fib/mpls_fib.c
index 9ec32d2fea6..494d0106bae 100644
--- a/src/vnet/fib/mpls_fib.c
+++ b/src/vnet/fib/mpls_fib.c
@@ -441,8 +441,8 @@ mpls_fib_show (vlib_main_t * vm,
break;
}
- pool_foreach (fib_table, mpls_main.fibs,
- ({
+ pool_foreach (fib_table, mpls_main.fibs)
+ {
fib_source_t source;
u8 *s = NULL;
@@ -470,7 +470,7 @@ mpls_fib_show (vlib_main_t * vm,
{
mpls_fib_table_show_one(mpls_fib_get(fib_table->ft_index), label, vm);
}
- }));
+ }
return 0;
}
diff --git a/src/vnet/flow/flow_cli.c b/src/vnet/flow/flow_cli.c
index 7dd68677c3b..aea2534ec1a 100644
--- a/src/vnet/flow/flow_cli.c
+++ b/src/vnet/flow/flow_cli.c
@@ -240,10 +240,10 @@ show_flow_entry (vlib_main_t * vm, unformat_input_t * input,
no_args:
/* *INDENT-OFF* */
- pool_foreach (f, fm->global_flow_pool,
+ pool_foreach (f, fm->global_flow_pool)
{
vlib_cli_output (vm, "%U\n", format_flow, f);
- });
+ }
/* *INDENT-ON* */
return 0;
diff --git a/src/vnet/gre/gre_api.c b/src/vnet/gre/gre_api.c
index f4c8efa7ecd..e83635a7820 100644
--- a/src/vnet/gre/gre_api.c
+++ b/src/vnet/gre/gre_api.c
@@ -168,10 +168,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,
- ({
+ pool_foreach (t, gm->tunnels)
+ {
send_gre_tunnel_details(t, mp);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/gre/interface.c b/src/vnet/gre/interface.c
index 5e8ad461d93..30c8dc479c2 100644
--- a/src/vnet/gre/interface.c
+++ b/src/vnet/gre/interface.c
@@ -742,10 +742,10 @@ show_gre_tunnel_command_fn (vlib_main_t * vm,
if (~0 == ti)
{
/* *INDENT-OFF* */
- pool_foreach (t, gm->tunnels,
- ({
+ pool_foreach (t, gm->tunnels)
+ {
vlib_cli_output (vm, "%U", format_gre_tunnel, t);
- }));
+ }
/* *INDENT-ON* */
}
else
diff --git a/src/vnet/interface.c b/src/vnet/interface.c
index d0919136b0b..82dc29b3744 100644
--- a/src/vnet/interface.c
+++ b/src/vnet/interface.c
@@ -139,22 +139,22 @@ 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, ({
+ 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, ({
+ pool_foreach (sif, im->sw_interfaces) {
if (sif->flags != 0)
{
vec_add2 (sts, st, 1);
st->sw_hw_if_index = sif->sw_if_index;
st->flags = sif->flags;
}
- }));
+ }
/* *INDENT-ON* */
vec_serialize (m, sts, serialize_vec_vnet_sw_hw_interface_state);
@@ -163,14 +163,14 @@ serialize_vnet_interface_state (serialize_main_t * m, va_list * va)
_vec_len (sts) = 0;
/* *INDENT-OFF* */
- pool_foreach (hif, im->hw_interfaces, ({
+ pool_foreach (hif, im->hw_interfaces) {
if (hif->flags != 0)
{
vec_add2 (sts, st, 1);
st->sw_hw_if_index = hif->hw_if_index;
st->flags = vnet_hw_interface_flags_to_sw(hif->flags);
}
- }));
+ }
/* *INDENT-ON* */
vec_serialize (m, sts, serialize_vec_vnet_sw_hw_interface_state);
@@ -204,7 +204,7 @@ unserialize_vnet_interface_state (serialize_main_t * m, va_list * va)
clib_error_t *error;
/* *INDENT-OFF* */
- pool_foreach (hif, im->hw_interfaces, ({
+ pool_foreach (hif, im->hw_interfaces) {
unserialize_cstring (m, &class_name);
p = hash_get_mem (im->hw_interface_class_by_name, class_name);
if (p)
@@ -218,7 +218,7 @@ unserialize_vnet_interface_state (serialize_main_t * m, va_list * va)
if (error)
clib_error_report (error);
vec_free (class_name);
- }));
+ }
/* *INDENT-ON* */
}
@@ -1109,11 +1109,11 @@ vnet_hw_interface_walk (vnet_main_t * vnm,
im = &vnm->interface_main;
/* *INDENT-OFF* */
- pool_foreach (hi, im->hw_interfaces,
- ({
+ pool_foreach (hi, im->hw_interfaces)
+ {
if (WALK_STOP == fn(vnm, hi->hw_if_index, ctx))
break;
- }));
+ }
/* *INDENT-ON* */
}
@@ -1127,11 +1127,11 @@ vnet_sw_interface_walk (vnet_main_t * vnm,
im = &vnm->interface_main;
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces,
+ pool_foreach (si, im->sw_interfaces)
{
if (WALK_STOP == fn (vnm, si, ctx))
break;
- });
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 4fe655c5024..240f13fa418 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -367,8 +367,8 @@ vl_api_sw_interface_dump_t_handler (vl_api_sw_interface_dump_t * mp)
char *strcasestr (char *, char *); /* lnx hdr file botch */
/* *INDENT-OFF* */
- pool_foreach (swif, im->sw_interfaces,
- ({
+ pool_foreach (swif, im->sw_interfaces)
+ {
if (!vnet_swif_is_api_visible (swif))
continue;
vec_reset_length(name);
@@ -379,7 +379,7 @@ vl_api_sw_interface_dump_t_handler (vl_api_sw_interface_dump_t * mp)
continue;
send_sw_interface_details (am, rp, swif, name, mp->context);
- }));
+ }
/* *INDENT-ON* */
vec_free (name);
@@ -789,12 +789,12 @@ link_state_process (vlib_main_t * vm,
continue;
/* *INDENT-OFF* */
- pool_foreach(reg, vam->interface_events_registrations,
- ({
+ 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);
diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c
index fa8d5d2266e..73f70cf5b1b 100644
--- a/src/vnet/interface_cli.c
+++ b/src/vnet/interface_cli.c
@@ -112,8 +112,8 @@ show_or_clear_hw_interfaces (vlib_main_t * vm,
/* Gather interfaces. */
if (vec_len (hw_if_indices) == 0)
- pool_foreach (hi, im->hw_interfaces,
- vec_add1 (hw_if_indices, hi - im->hw_interfaces));
+ pool_foreach (hi, im->hw_interfaces)
+ vec_add1 (hw_if_indices, hi - im->hw_interfaces);
if (verbose < 0)
verbose = 1; /* default to verbose (except bond) */
@@ -395,12 +395,12 @@ show_sw_interfaces (vlib_main_t * vm,
vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
_vec_len (sorted_sis) = 0;
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces,
- ({
+ pool_foreach (si, im->sw_interfaces)
+ {
int visible = vnet_swif_is_api_visible (si);
if (visible)
- vec_add1 (sorted_sis, si[0]);}
- ));
+ vec_add1 (sorted_sis, si[0]);
+ }
/* *INDENT-ON* */
/* Sort by name. */
vec_sort_with_function (sorted_sis, sw_interface_name_compare);
@@ -1207,12 +1207,12 @@ show_interface_sec_mac_addr_fn (vlib_main_t * vm, unformat_input_t * input,
vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
_vec_len (sorted_sis) = 0;
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces,
- ({
+ pool_foreach (si, im->sw_interfaces)
+ {
int visible = vnet_swif_is_api_visible (si);
if (visible)
- vec_add1 (sorted_sis, si[0]);}
- ));
+ vec_add1 (sorted_sis, si[0]);
+ }
/* *INDENT-ON* */
/* Sort by name. */
vec_sort_with_function (sorted_sis, sw_interface_name_compare);
diff --git a/src/vnet/ip-neighbor/ip_neighbor.c b/src/vnet/ip-neighbor/ip_neighbor.c
index 2dd8e748be6..78b45a27c9d 100644
--- a/src/vnet/ip-neighbor/ip_neighbor.c
+++ b/src/vnet/ip-neighbor/ip_neighbor.c
@@ -840,14 +840,14 @@ ip_neighbor_entries (u32 sw_if_index, ip_address_family_t af)
ip_neighbor_t *ipn;
/* *INDENT-OFF* */
- pool_foreach (ipn, ip_neighbor_pool,
- ({
+ pool_foreach (ipn, ip_neighbor_pool)
+ {
if ((sw_if_index == ~0 ||
ipn->ipn_key->ipnk_sw_if_index == sw_if_index) &&
(N_AF == af ||
ip_neighbor_get_af(ipn) == af))
vec_add1 (ipnis, ip_neighbor_get_index(ipn));
- }));
+ }
/* *INDENT-ON* */
@@ -1152,15 +1152,15 @@ ip_neighbor_ethernet_change_mac (ethernet_main_t * em,
sw_if_index);
/* *INDENT-OFF* */
- pool_foreach (ipn, ip_neighbor_pool,
- ({
+ pool_foreach (ipn, ip_neighbor_pool)
+ {
if (ipn->ipn_key->ipnk_sw_if_index == sw_if_index)
adj_nbr_walk_nh (ipn->ipn_key->ipnk_sw_if_index,
ip_address_family_to_fib_proto(ip_neighbor_get_af(ipn)),
&ip_addr_46(&ipn->ipn_key->ipnk_ip),
ip_neighbor_mk_complete_walk,
ipn);
- }));
+ }
/* *INDENT-ON* */
adj_glean_update_rewrite_itf (sw_if_index);
@@ -1177,12 +1177,12 @@ ip_neighbor_populate (ip_address_family_t af, u32 sw_if_index)
sw_if_index, format_ip_address_family, af);
/* *INDENT-OFF* */
- pool_foreach (ipn, ip_neighbor_pool,
- ({
+ 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)
@@ -1210,13 +1210,13 @@ ip_neighbor_flush (ip_address_family_t af, u32 sw_if_index)
sw_if_index, format_ip_address_family, af);
/* *INDENT-OFF* */
- pool_foreach (ipn, ip_neighbor_pool,
- ({
+ pool_foreach (ipn, ip_neighbor_pool)
+ {
if (ip_neighbor_get_af(ipn) == af &&
ipn->ipn_key->ipnk_sw_if_index == 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));
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 77ea4c5524e..bb70805b4e6 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -677,8 +677,8 @@ ip4_add_del_interface_address_internal (vlib_main_t * vm,
ip_interface_address_t *ia;
vnet_sw_interface_t *sif;
- pool_foreach(sif, vnm->interface_main.sw_interfaces,
- ({
+ pool_foreach (sif, vnm->interface_main.sw_interfaces)
+ {
if (im->fib_index_by_sw_if_index[sw_if_index] ==
im->fib_index_by_sw_if_index[sif->sw_if_index])
{
@@ -728,7 +728,7 @@ ip4_add_del_interface_address_internal (vlib_main_t * vm,
}
}));
}
- }));
+ }
}
/* *INDENT-ON* */
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index cd753b044b1..659955ad42d 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -369,8 +369,8 @@ ip6_add_del_interface_address (vlib_main_t * vm,
ip_interface_address_t *ia;
vnet_sw_interface_t *sif;
- pool_foreach(sif, vnm->interface_main.sw_interfaces,
- ({
+ pool_foreach (sif, vnm->interface_main.sw_interfaces)
+ {
if (im->fib_index_by_sw_if_index[sw_if_index] ==
im->fib_index_by_sw_if_index[sif->sw_if_index])
{
@@ -417,7 +417,7 @@ ip6_add_del_interface_address (vlib_main_t * vm,
}
}));
}
- }));
+ }
}
/* *INDENT-ON* */
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 3bdb53cd9ff..1d0dea86443 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -154,17 +154,17 @@ vl_api_ip_table_dump_t_handler (vl_api_ip_table_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (fib_table, ip4_main.fibs,
- ({
+ pool_foreach (fib_table, ip4_main.fibs)
+ {
send_ip_table_details(am, reg, mp->context, fib_table);
- }));
- pool_foreach (fib_table, ip6_main.fibs,
- ({
+ }
+ pool_foreach (fib_table, ip6_main.fibs)
+ {
/* don't send link locals */
if (fib_table->ft_flags & FIB_TABLE_FLAG_IP6_LL)
continue;
send_ip_table_details(am, reg, mp->context, fib_table);
- }));
+ }
/* *INDENT-ON* */
}
@@ -294,14 +294,14 @@ vl_api_ip_mtable_dump_t_handler (vl_api_ip_mtable_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (mfib_table, ip4_main.mfibs,
- ({
+ pool_foreach (mfib_table, ip4_main.mfibs)
+ {
send_ip_mtable_details (reg, mp->context, mfib_table);
- }));
- pool_foreach (mfib_table, ip6_main.mfibs,
- ({
+ }
+ pool_foreach (mfib_table, ip6_main.mfibs)
+ {
send_ip_mtable_details (reg, mp->context, mfib_table);
- }));
+ }
/* *INDENT-ON* */
}
@@ -950,8 +950,8 @@ vl_api_ip_unnumbered_dump_t_handler (vl_api_ip_unnumbered_dump_t * mp)
else
{
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces,
- ({
+ pool_foreach (si, im->sw_interfaces)
+ {
if ((si->flags & VNET_SW_INTERFACE_FLAG_UNNUMBERED))
{
send_ip_unnumbered_details(am, reg,
@@ -959,7 +959,7 @@ vl_api_ip_unnumbered_dump_t_handler (vl_api_ip_unnumbered_dump_t * mp)
si->unnumbered_sw_if_index,
mp->context);
}
- }));
+ }
/* *INDENT-ON* */
}
@@ -985,10 +985,10 @@ vl_api_ip_dump_t_handler (vl_api_ip_dump_t * mp)
sorted_sis = vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
_vec_len (sorted_sis) = 0;
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces,
- ({
+ pool_foreach (si, im->sw_interfaces)
+ {
vec_add1 (sorted_sis, si[0]);
- }));
+ }
/* *INDENT-ON* */
vec_foreach (si, sorted_sis)
@@ -1429,8 +1429,8 @@ vl_api_ip_table_flush_t_handler (vl_api_ip_table_flush_t * mp)
/* Shut down interfaces in this FIB / clean out intfc routes */
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces,
- ({
+ pool_foreach (si, im->sw_interfaces)
+ {
if (fib_index == fib_table_get_index_for_sw_if_index (fproto,
si->sw_if_index))
{
@@ -1438,7 +1438,7 @@ vl_api_ip_table_flush_t_handler (vl_api_ip_table_flush_t * mp)
flags &= ~VNET_SW_INTERFACE_FLAG_ADMIN_UP;
vnet_sw_interface_set_flags (vnm, si->sw_if_index, flags);
}
- }));
+ }
/* *INDENT-ON* */
fib_table_flush (fib_index, fproto, FIB_SOURCE_API);
diff --git a/src/vnet/ip/ip_container_proxy.c b/src/vnet/ip/ip_container_proxy.c
index e90be8b45d3..2c94b70ec85 100644
--- a/src/vnet/ip/ip_container_proxy.c
+++ b/src/vnet/ip/ip_container_proxy.c
@@ -139,20 +139,20 @@ ip_container_proxy_walk (ip_container_proxy_cb_t cb, void *ctx)
};
/* *INDENT-OFF* */
- pool_foreach (fib_table, ip4_main.fibs,
- ({
+ pool_foreach (fib_table, ip4_main.fibs)
+ {
fib_table_walk(fib_table->ft_index,
FIB_PROTOCOL_IP4,
ip_container_proxy_fib_table_walk,
&wctx);
- }));
- pool_foreach (fib_table, ip6_main.fibs,
- ({
+ }
+ pool_foreach (fib_table, ip6_main.fibs)
+ {
fib_table_walk(fib_table->ft_index,
FIB_PROTOCOL_IP6,
ip_container_proxy_fib_table_walk,
&wctx);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c
index ce7771f8e43..ecd2fb0e5c6 100644
--- a/src/vnet/ip/reass/ip4_full_reass.c
+++ b/src/vnet/ip/reass/ip4_full_reass.c
@@ -1576,13 +1576,13 @@ ip4_full_reass_walk_expired (vlib_main_t * vm,
vec_reset_length (pool_indexes_to_free);
/* *INDENT-OFF* */
- pool_foreach_index (index, rt->pool, ({
+ pool_foreach_index (index, rt->pool) {
reass = pool_elt_at_index (rt->pool, index);
if (now > reass->last_heard + rm->timeout)
{
vec_add1 (pool_indexes_to_free, index);
}
- }));
+ }
/* *INDENT-ON* */
int *i;
/* *INDENT-OFF* */
@@ -1696,9 +1696,9 @@ show_ip4_reass (vlib_main_t * vm,
if (details)
{
/* *INDENT-OFF* */
- pool_foreach (reass, rt->pool, {
+ pool_foreach (reass, rt->pool) {
vlib_cli_output (vm, "%U", format_ip4_reass, vm, reass);
- });
+ }
/* *INDENT-ON* */
}
sum_reass_n += rt->reass_n;
diff --git a/src/vnet/ip/reass/ip4_sv_reass.c b/src/vnet/ip/reass/ip4_sv_reass.c
index 8f3b0f946a5..c74f8e5b661 100644
--- a/src/vnet/ip/reass/ip4_sv_reass.c
+++ b/src/vnet/ip/reass/ip4_sv_reass.c
@@ -1203,13 +1203,13 @@ ip4_sv_reass_walk_expired (vlib_main_t * vm,
vec_reset_length (pool_indexes_to_free);
/* *INDENT-OFF* */
- pool_foreach_index (index, rt->pool, ({
+ pool_foreach_index (index, rt->pool) {
reass = pool_elt_at_index (rt->pool, index);
if (now > reass->last_heard + rm->timeout)
{
vec_add1 (pool_indexes_to_free, index);
}
- }));
+ }
/* *INDENT-ON* */
int *i;
/* *INDENT-OFF* */
@@ -1312,9 +1312,9 @@ show_ip4_reass (vlib_main_t * vm,
if (details)
{
/* *INDENT-OFF* */
- pool_foreach (reass, rt->pool, {
+ pool_foreach (reass, rt->pool) {
vlib_cli_output (vm, "%U", format_ip4_sv_reass, vm, reass);
- });
+ }
/* *INDENT-ON* */
}
sum_reass_n += rt->reass_n;
diff --git a/src/vnet/ip/reass/ip6_full_reass.c b/src/vnet/ip/reass/ip6_full_reass.c
index f1a3606d41a..80a31e83215 100644
--- a/src/vnet/ip/reass/ip6_full_reass.c
+++ b/src/vnet/ip/reass/ip6_full_reass.c
@@ -1520,13 +1520,13 @@ ip6_full_reass_walk_expired (vlib_main_t * vm,
vec_reset_length (pool_indexes_to_free);
/* *INDENT-OFF* */
- pool_foreach_index (index, rt->pool, ({
+ pool_foreach_index (index, rt->pool) {
reass = pool_elt_at_index (rt->pool, index);
if (now > reass->last_heard + rm->timeout)
{
vec_add1 (pool_indexes_to_free, index);
}
- }));
+ }
/* *INDENT-ON* */
int *i;
/* *INDENT-OFF* */
@@ -1665,9 +1665,9 @@ show_ip6_full_reass (vlib_main_t * vm, unformat_input_t * input,
if (details)
{
/* *INDENT-OFF* */
- pool_foreach (reass, rt->pool, {
+ pool_foreach (reass, rt->pool) {
vlib_cli_output (vm, "%U", format_ip6_full_reass, vm, reass);
- });
+ }
/* *INDENT-ON* */
}
sum_reass_n += rt->reass_n;
diff --git a/src/vnet/ip/reass/ip6_sv_reass.c b/src/vnet/ip/reass/ip6_sv_reass.c
index 7c13f4b7fac..c5c84e5f93a 100644
--- a/src/vnet/ip/reass/ip6_sv_reass.c
+++ b/src/vnet/ip/reass/ip6_sv_reass.c
@@ -1031,13 +1031,13 @@ ip6_sv_reass_walk_expired (vlib_main_t * vm,
vec_reset_length (pool_indexes_to_free);
/* *INDENT-OFF* */
- pool_foreach_index (index, rt->pool, ({
+ pool_foreach_index (index, rt->pool) {
reass = pool_elt_at_index (rt->pool, index);
if (now > reass->last_heard + rm->timeout)
{
vec_add1 (pool_indexes_to_free, index);
}
- }));
+ }
/* *INDENT-ON* */
int *i;
/* *INDENT-OFF* */
@@ -1138,9 +1138,9 @@ show_ip6_sv_reass (vlib_main_t * vm, unformat_input_t * input,
if (details)
{
/* *INDENT-OFF* */
- pool_foreach (reass, rt->pool, {
+ pool_foreach (reass, rt->pool) {
vlib_cli_output (vm, "%U", format_ip6_sv_reass, vm, reass);
- });
+ }
/* *INDENT-ON* */
}
sum_reass_n += rt->reass_n;
diff --git a/src/vnet/ip6-nd/ip6_mld.c b/src/vnet/ip6-nd/ip6_mld.c
index 2a95c84eb0b..ea70bcc5d19 100644
--- a/src/vnet/ip6-nd/ip6_mld.c
+++ b/src/vnet/ip6-nd/ip6_mld.c
@@ -327,8 +327,8 @@ ip6_neighbor_send_mldpv2_report (u32 sw_if_index)
rh0->icmp.checksum = 0;
/* *INDENT-OFF* */
- pool_foreach (m, imd->mldp_group_pool,
- ({
+ pool_foreach (m, imd->mldp_group_pool)
+ {
rr.type = m->type;
rr.aux_data_len_u32s = 0;
rr.num_sources = clib_host_to_net_u16 (m->num_sources);
@@ -344,7 +344,7 @@ ip6_neighbor_send_mldpv2_report (u32 sw_if_index)
}
payload_length += sizeof( icmp6_multicast_address_record_t);
- }));
+ }
/* *INDENT-ON* */
rh0->rsvd = 0;
@@ -389,8 +389,8 @@ ip6_mld_timer_event (vlib_main_t * vm,
/* Interface ip6 radv info list */
/* *INDENT-OFF* */
- pool_foreach (imd, ip6_mld_pool,
- ({
+ pool_foreach (imd, ip6_mld_pool)
+ {
if (!vnet_sw_interface_is_admin_up (vnm, imd->sw_if_index))
{
imd->all_routers_mcast = 0;
@@ -404,7 +404,7 @@ ip6_mld_timer_event (vlib_main_t * vm,
ip6_neighbor_send_mldpv2_report(imd->sw_if_index);
imd->all_routers_mcast = 1;
}
- }));
+ }
/* *INDENT-ON* */
return 0;
@@ -454,13 +454,13 @@ 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,
- ({
+ pool_foreach (m, imd->mldp_group_pool)
+ {
s = format (s, "%U%U\n",
format_white_space, indent+2,
format_ip6_address,
&m->mcast_address);
- }));
+ }
/* *INDENT-ON* */
return (s);
diff --git a/src/vnet/ip6-nd/ip6_nd_api.c b/src/vnet/ip6-nd/ip6_nd_api.c
index 65b3ee381b3..9e4024670e6 100644
--- a/src/vnet/ip6-nd/ip6_nd_api.c
+++ b/src/vnet/ip6-nd/ip6_nd_api.c
@@ -96,13 +96,13 @@ vl_api_ip6nd_proxy_dump_t_handler (vl_api_ip6nd_proxy_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (fib_table, im6->fibs,
- ({
+ pool_foreach (fib_table, im6->fibs)
+ {
fib_table_walk(fib_table->ft_index,
FIB_PROTOCOL_IP6,
api_ip6nd_proxy_fib_table_walk,
&ctx);
- }));
+ }
/* *INDENT-ON* */
vec_sort_with_function (ctx.indices, fib_entry_cmp_for_sort);
@@ -237,8 +237,8 @@ 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,
- ({
+ pool_foreach (rp, vpe_api_main.ip6_ra_events_registrations)
+ {
vl_api_registration_t *vl_reg;
vl_reg = vl_api_client_index_to_registration (rp->client_index);
@@ -287,7 +287,7 @@ ip6_ra_handle_report (const ip6_ra_report_t * rap)
vl_api_send_msg (vl_reg, (u8 *) event);
}
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/ip6-nd/ip6_ra.c b/src/vnet/ip6-nd/ip6_ra.c
index 97c5b4a2837..a3d95eee9fb 100644
--- a/src/vnet/ip6-nd/ip6_ra.c
+++ b/src/vnet/ip6-nd/ip6_ra.c
@@ -525,8 +525,8 @@ icmp6_router_solicitation (vlib_main_t * vm,
ip6_radv_prefix_t *pr_info;
/* *INDENT-OFF* */
- pool_foreach (pr_info, radv_info->adv_prefixes_pool,
- ({
+ pool_foreach (pr_info, radv_info->adv_prefixes_pool)
+ {
if(pr_info->enabled &&
(!pr_info->decrement_lifetime_flag
|| (pr_info->pref_lifetime_expires >0)))
@@ -589,7 +589,7 @@ icmp6_router_solicitation (vlib_main_t * vm,
}
}
- }));
+ }
/* *INDENT-ON* */
/* add additional options before here */
@@ -1007,8 +1007,8 @@ icmp6_router_advertisement (vlib_main_t * vm,
/* look for matching prefix - if we our advertising it, it better be consistant */
/* *INDENT-OFF* */
- pool_foreach (pr_info, radv_info->adv_prefixes_pool,
- ({
+ pool_foreach (pr_info, radv_info->adv_prefixes_pool)
+ {
ip6_address_t mask;
ip6_address_mask_from_width(&mask, pr_info->prefix_len);
@@ -1036,7 +1036,7 @@ icmp6_router_advertisement (vlib_main_t * vm,
}
}
break;
- }));
+ }
/* *INDENT-ON* */
break;
}
@@ -1278,12 +1278,12 @@ send_rs_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
{
due_time = current_time + 1e9;
/* *INDENT-OFF* */
- pool_foreach (radv_info, ip6_ra_pool,
- ({
+ 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);
}
@@ -1440,10 +1440,10 @@ ip6_ra_update_secondary_radv_info (ip6_address_t * address, u8 prefix_len,
vec_reset_length (radv_indices);
/* *INDENT-OFF* */
- pool_foreach (radv_info, ip6_ra_pool,
- ({
+ pool_foreach (radv_info, ip6_ra_pool)
+ {
vec_add1 (radv_indices, radv_info - ip6_ra_pool);
- }));
+ }
/* *INDENT-ON* */
/*
@@ -1460,8 +1460,8 @@ ip6_ra_update_secondary_radv_info (ip6_address_t * address, u8 prefix_len,
continue;
/* *INDENT-OFF* */
- pool_foreach (this_prefix, radv_info->adv_prefixes_pool,
- ({
+ pool_foreach (this_prefix, radv_info->adv_prefixes_pool)
+ {
if (this_prefix->prefix_len == prefix_len
&& ip6_address_is_equal_masked (&this_prefix->prefix, address,
&mask))
@@ -1481,7 +1481,7 @@ ip6_ra_update_secondary_radv_info (ip6_address_t * address, u8 prefix_len,
if (rv != 0)
clib_warning ("ip6_neighbor_ra_prefix returned %d", rv);
}
- }));
+ }
/* *INDENT-ON*/
}
}
@@ -1504,8 +1504,8 @@ ip6_ra_process_timer_event (vlib_main_t * vm,
/* Interface ip6 radv info list */
/* *INDENT-OFF* */
- pool_foreach (radv_info, ip6_ra_pool,
- ({
+ pool_foreach (radv_info, ip6_ra_pool)
+ {
if( !vnet_sw_interface_is_admin_up (vnm, radv_info->sw_if_index))
{
radv_info->initial_adverts_sent = radv_info->initial_adverts_count-1;
@@ -1592,7 +1592,7 @@ ip6_ra_process_timer_event (vlib_main_t * vm,
f = 0;
}
}
- }));
+ }
/* *INDENT-ON* */
if (f)
@@ -2118,12 +2118,12 @@ format_ip6_ra (u8 * s, va_list * args)
indent += 2;
/* *INDENT-OFF* */
- pool_foreach (p, radv_info->adv_prefixes_pool,
- ({
+ 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",
diff --git a/src/vnet/ip6-nd/rd_cp.c b/src/vnet/ip6-nd/rd_cp.c
index bab1b6520a4..13fd90db288 100644
--- a/src/vnet/ip6-nd/rd_cp.c
+++ b/src/vnet/ip6-nd/rd_cp.c
@@ -263,8 +263,8 @@ 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,
- ({
+ pool_foreach (default_route, rm->default_route_pool)
+ {
if (default_route->sw_if_index != sw_if_index)
;
else if (0 != memcmp (&default_route->router_address,
@@ -275,7 +275,7 @@ ip6_ra_report_handler (const ip6_ra_report_t * r)
route_already_present = 1;
goto default_route_pool_foreach_out;
}
- }));
+ }
/* *INDENT-ON* */
default_route_pool_foreach_out:
@@ -334,8 +334,8 @@ ip6_ra_report_handler (const ip6_ra_report_t * r)
u8 address_already_present = 0;
/* *INDENT-OFF* */
- pool_foreach (slaac_address, rm->slaac_address_pool,
- ({
+ pool_foreach (slaac_address, rm->slaac_address_pool)
+ {
if (slaac_address->sw_if_index != sw_if_index)
;
else if (slaac_address->address_length != prefix_length)
@@ -348,7 +348,7 @@ ip6_ra_report_handler (const ip6_ra_report_t * r)
address_already_present = 1;
goto slaac_address_pool_foreach_out;
}
- }));
+ }
/* *INDENT-ON* */
slaac_address_pool_foreach_out:
@@ -415,8 +415,8 @@ rd_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
* as we are removing elements inside the loop body
*/
/* *INDENT-OFF* */
- pool_foreach_index (index, rm->slaac_address_pool,
- ({
+ pool_foreach_index (index, rm->slaac_address_pool)
+ {
slaac_address = pool_elt_at_index(rm->slaac_address_pool, index);
if (slaac_address->due_time > current_time)
{
@@ -430,9 +430,9 @@ rd_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
/* make sure ip6 stays enabled */
ip6_link_enable (sw_if_index, NULL);
}
- }));
- pool_foreach_index (index, rm->default_route_pool,
- ({
+ }
+ pool_foreach_index (index, rm->default_route_pool)
+ {
default_route = pool_elt_at_index(rm->default_route_pool, index);
if (default_route->due_time > current_time)
{
@@ -441,7 +441,7 @@ 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);
}
@@ -515,19 +515,19 @@ rd_cp_set_address_autoconfig (u32 sw_if_index,
if (if_config->enabled && !enable)
{
/* *INDENT-OFF* */
- pool_foreach (slaac_address, rm->slaac_address_pool,
- ({
+ 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,
- ({
+ pool_foreach (default_route, rm->default_route_pool)
+ {
remove_default_route (vm, default_route);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/ipip/ipip_api.c b/src/vnet/ipip/ipip_api.c
index 98e3685ff93..f44c72c3b27 100644
--- a/src/vnet/ipip/ipip_api.c
+++ b/src/vnet/ipip/ipip_api.c
@@ -143,10 +143,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,
- ({
+ pool_foreach (t, im->tunnels)
+ {
send_ipip_tunnel_details(t, mp);
- }));
+ }
/* *INDENT-ON* */
}
else
diff --git a/src/vnet/ipip/ipip_cli.c b/src/vnet/ipip/ipip_cli.c
index 872fb33117f..1a8e8896965 100644
--- a/src/vnet/ipip/ipip_cli.c
+++ b/src/vnet/ipip/ipip_cli.c
@@ -275,8 +275,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); }));
+ pool_foreach (t, gm->tunnels)
+ {vlib_cli_output(vm, "%U", format_ipip_tunnel, t); }
/* *INDENT-ON* */
}
else
diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c
index a2de1e7fa44..1d92676706a 100644
--- a/src/vnet/ipsec/ipsec.c
+++ b/src/vnet/ipsec/ipsec.c
@@ -342,20 +342,20 @@ ipsec_set_async_mode (u32 is_enabled)
ipsec_sa_t *sa;
/* lock all SAs before change im->async_mode */
- pool_foreach (sa, im->sad, (
- {
- fib_node_lock (&sa->node);
- }));
+ pool_foreach (sa, im->sad)
+ {
+ fib_node_lock (&sa->node);
+ }
im->async_mode = is_enabled;
/* change SA crypto op data before unlock them */
- pool_foreach (sa, im->sad, (
- {
- sa->crypto_op_data = is_enabled ?
- sa->async_op_data.data : sa->sync_op_data.data;
- fib_node_unlock (&sa->node);
- }));
+ pool_foreach (sa, im->sad)
+ {
+ sa->crypto_op_data = is_enabled ?
+ sa->async_op_data.data : sa->sync_op_data.data;
+ fib_node_unlock (&sa->node);
+ }
}
static void
diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c
index 7003791c8c8..06e7ba0d784 100644
--- a/src/vnet/ipsec/ipsec_api.c
+++ b/src/vnet/ipsec/ipsec_api.c
@@ -514,9 +514,9 @@ vl_api_ipsec_spds_dump_t_handler (vl_api_ipsec_spds_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (spd, im->spds, ({
+ pool_foreach (spd, im->spds) {
send_ipsec_spds_details (spd, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
#else
clib_warning ("unimplemented");
@@ -1130,7 +1130,7 @@ 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, {
+ 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));
mp->_vl_msg_id = ntohs (VL_API_IPSEC_BACKEND_DETAILS);
@@ -1141,8 +1141,8 @@ vl_api_ipsec_backend_dump_t_handler (vl_api_ipsec_backend_dump_t * mp)
mp->index = ab - im->ah_backends;
mp->active = mp->index == im->ah_current_backend ? 1 : 0;
vl_api_send_msg (rp, (u8 *)mp);
- });
- pool_foreach (eb, im->esp_backends, {
+ }
+ pool_foreach (eb, im->esp_backends) {
vl_api_ipsec_backend_details_t *mp = vl_msg_api_alloc (sizeof (*mp));
clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = ntohs (VL_API_IPSEC_BACKEND_DETAILS);
@@ -1153,7 +1153,7 @@ vl_api_ipsec_backend_dump_t_handler (vl_api_ipsec_backend_dump_t * mp)
mp->index = eb - im->esp_backends;
mp->active = mp->index == im->esp_current_backend ? 1 : 0;
vl_api_send_msg (rp, (u8 *)mp);
- });
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c
index e0a271db87d..407ae868adf 100644
--- a/src/vnet/ipsec/ipsec_cli.c
+++ b/src/vnet/ipsec/ipsec_cli.c
@@ -424,10 +424,10 @@ ipsec_sa_show_all (vlib_main_t * vm, ipsec_main_t * im, u8 detail)
u32 sai;
/* *INDENT-OFF* */
- pool_foreach_index (sai, im->sad, ({
+ pool_foreach_index (sai, im->sad) {
vlib_cli_output(vm, "%U", format_ipsec_sa, sai,
(detail ? IPSEC_FORMAT_DETAIL : IPSEC_FORMAT_BRIEF));
- }));
+ }
/* *INDENT-ON* */
}
@@ -437,9 +437,9 @@ ipsec_spd_show_all (vlib_main_t * vm, ipsec_main_t * im)
u32 spdi;
/* *INDENT-OFF* */
- pool_foreach_index (spdi, im->spds, ({
+ pool_foreach_index (spdi, im->spds) {
vlib_cli_output(vm, "%U", format_ipsec_spd, spdi);
- }));
+ }
/* *INDENT-ON* */
}
@@ -545,9 +545,9 @@ clear_ipsec_sa_command_fn (vlib_main_t * vm,
if (~0 == sai)
{
/* *INDENT-OFF* */
- pool_foreach_index (sai, im->sad, ({
+ pool_foreach_index (sai, im->sad) {
ipsec_sa_clear(sai);
- }));
+ }
/* *INDENT-ON* */
}
else
@@ -643,7 +643,7 @@ ipsec_show_backends_command_fn (vlib_main_t * vm,
u8 *s = format (NULL, "%=25s %=25s %=10s\n", "Name", "Index", "Active");
ipsec_ah_backend_t *ab;
/* *INDENT-OFF* */
- pool_foreach (ab, im->ah_backends, {
+ 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");
if (verbose) {
@@ -657,7 +657,7 @@ ipsec_show_backends_command_fn (vlib_main_t * vm,
n = vlib_get_node (vm, ab->ah6_decrypt_node_index);
s = format (s, " dec6 %s (next %d)\n", n->name, ab->ah6_decrypt_next_index);
}
- });
+ }
/* *INDENT-ON* */
vlib_cli_output (vm, "%v", s);
_vec_len (s) = 0;
@@ -665,7 +665,7 @@ ipsec_show_backends_command_fn (vlib_main_t * vm,
s = format (s, "%=25s %=25s %=10s\n", "Name", "Index", "Active");
ipsec_esp_backend_t *eb;
/* *INDENT-OFF* */
- pool_foreach (eb, im->esp_backends, {
+ 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"
: "no");
@@ -680,7 +680,7 @@ ipsec_show_backends_command_fn (vlib_main_t * vm,
n = vlib_get_node (vm, eb->esp6_decrypt_node_index);
s = format (s, " dec6 %s (next %d)\n", n->name, eb->esp6_decrypt_next_index);
}
- });
+ }
/* *INDENT-ON* */
vlib_cli_output (vm, "%v", s);
diff --git a/src/vnet/ipsec/ipsec_itf.c b/src/vnet/ipsec/ipsec_itf.c
index 97a43875989..4a0f9e7bb6c 100644
--- a/src/vnet/ipsec/ipsec_itf.c
+++ b/src/vnet/ipsec/ipsec_itf.c
@@ -469,10 +469,10 @@ ipsec_interface_show (vlib_main_t * vm,
index_t ii;
/* *INDENT-OFF* */
- pool_foreach_index (ii, ipsec_itf_pool,
- ({
+ pool_foreach_index (ii, ipsec_itf_pool)
+ {
vlib_cli_output (vm, "%U", format_ipsec_itf, ii);
- }));
+ }
/* *INDENT-ON* */
return NULL;
diff --git a/src/vnet/ipsec/ipsec_sa.c b/src/vnet/ipsec/ipsec_sa.c
index 71e86ac5c45..d5a971bb46d 100644
--- a/src/vnet/ipsec/ipsec_sa.c
+++ b/src/vnet/ipsec/ipsec_sa.c
@@ -460,11 +460,11 @@ ipsec_sa_walk (ipsec_sa_walk_cb_t cb, void *ctx)
ipsec_sa_t *sa;
/* *INDENT-OFF* */
- pool_foreach (sa, im->sad,
- ({
+ pool_foreach (sa, im->sad)
+ {
if (WALK_CONTINUE != cb(sa, ctx))
break;
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/ipsec/ipsec_tun.c b/src/vnet/ipsec/ipsec_tun.c
index 9116df5d7e3..a35b6190c44 100644
--- a/src/vnet/ipsec/ipsec_tun.c
+++ b/src/vnet/ipsec/ipsec_tun.c
@@ -838,10 +838,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,
- ({
+ pool_foreach_index (itpi, ipsec_tun_protect_pool)
+ {
fn (itpi, ctx);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index 746c7fdf2a2..2c2f480b35f 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -109,13 +109,13 @@ vl_api_l2_xconnect_dump_t_handler (vl_api_l2_xconnect_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (swif, im->sw_interfaces,
- ({
+ pool_foreach (swif, im->sw_interfaces)
+ {
config = vec_elt_at_index (l2im->configs, swif->sw_if_index);
if (l2_input_is_xconnect(config))
send_l2_xconnect_details (reg, mp->context, swif->sw_if_index,
config->output_sw_if_index);
- }));
+ }
/* *INDENT-ON* */
}
@@ -1112,8 +1112,8 @@ l2_arp_term_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
last = now;
/* *INDENT-OFF* */
- pool_foreach(reg, vpe_api_main.l2_arp_term_events_registrations,
- ({
+ pool_foreach (reg, vpe_api_main.l2_arp_term_events_registrations)
+ {
vl_api_registration_t *vl_reg;
vl_reg = vl_api_client_index_to_registration (reg->client_index);
ALWAYS_ASSERT (vl_reg != NULL);
@@ -1133,7 +1133,7 @@ l2_arp_term_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
mac_address_encode(&event->mac, vevent->mac);
vl_api_send_msg (vl_reg, (u8 *) vevent);
}
- }));
+ }
/* *INDENT-ON* */
}
vec_reset_length (l2am->publish_events);
diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c
index 9dc452e1558..de22cef600e 100644
--- a/src/vnet/l2/l2_input.c
+++ b/src/vnet/l2/l2_input.c
@@ -811,7 +811,7 @@ show_int_mode (vlib_main_t * vm,
sis = vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
_vec_len (sis) = 0;
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces, ({ vec_add1 (sis, si[0]); }));
+ pool_foreach (si, im->sw_interfaces) { vec_add1 (sis, si[0]); }
/* *INDENT-ON* */
}
diff --git a/src/vnet/l2/l2_rw.c b/src/vnet/l2/l2_rw.c
index 3160e65e40d..59b7de91279 100644
--- a/src/vnet/l2/l2_rw.c
+++ b/src/vnet/l2/l2_rw.c
@@ -532,9 +532,9 @@ l2_rw_show_entries_cli_fn (vlib_main_t * vm,
vlib_cli_output (vm, "No entries\n");
/* *INDENT-OFF* */
- pool_foreach(e, rw->entries, {
+ pool_foreach (e, rw->entries) {
vlib_cli_output (vm, "%U\n", format_l2_rw_entry, e);
- });
+ }
/* *INDENT-ON* */
return 0;
}
diff --git a/src/vnet/l2/l2_xcrw.c b/src/vnet/l2/l2_xcrw.c
index 540ce3f9c26..942cd118d3d 100644
--- a/src/vnet/l2/l2_xcrw.c
+++ b/src/vnet/l2/l2_xcrw.c
@@ -569,10 +569,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,
- ({
+ pool_foreach (t, xcm->tunnels)
+ {
vlib_cli_output (vm, "%U", format_l2xcrw, vnm, t);
- }));
+ }
/* *INDENT-ON* */
return 0;
diff --git a/src/vnet/mfib/ip4_mfib.c b/src/vnet/mfib/ip4_mfib.c
index 6973380ec06..9c64c4ae92c 100644
--- a/src/vnet/mfib/ip4_mfib.c
+++ b/src/vnet/mfib/ip4_mfib.c
@@ -396,8 +396,8 @@ format_ip4_mfib_table_memory (u8 * s, va_list * args)
total_memory = 0;
- pool_foreach (mfib_table, ip4_main.mfibs,
- ({
+ pool_foreach (mfib_table, ip4_main.mfibs)
+ {
ip4_mfib_t *mfib = &mfib_table->v4;
uword mfib_size;
int i;
@@ -415,7 +415,7 @@ format_ip4_mfib_table_memory (u8 * s, va_list * args)
}
total_memory += mfib_size;
- }));
+ }
s = format(s, "%=30s %=6d %=12ld\n",
"IPv4 multicast",
@@ -525,8 +525,8 @@ ip4_show_mfib (vlib_main_t * vm,
break;
}
- pool_foreach (mfib_table, im4->mfibs,
- ({
+ pool_foreach (mfib_table, im4->mfibs)
+ {
ip4_mfib_t *mfib = &mfib_table->v4;
if (table_id >= 0 && table_id != (int)mfib->table_id)
@@ -584,7 +584,7 @@ ip4_show_mfib (vlib_main_t * vm,
{
ip4_mfib_table_show_one(mfib, vm, &src, &grp, mask);
}
- }));
+ }
if (memory)
vlib_cli_output (vm, "totals: hash:%ld", total_hash_memory);
diff --git a/src/vnet/mfib/ip6_mfib.c b/src/vnet/mfib/ip6_mfib.c
index 14c724b3bef..b5e5bce8ffc 100644
--- a/src/vnet/mfib/ip6_mfib.c
+++ b/src/vnet/mfib/ip6_mfib.c
@@ -691,8 +691,8 @@ ip6_show_mfib (vlib_main_t * vm,
break;
}
- pool_foreach (mfib_table, im6->mfibs,
- ({
+ pool_foreach (mfib_table, im6->mfibs)
+ {
ip6_mfib_t *mfib = &mfib_table->v6;
if (table_id >= 0 && table_id != (int)mfib->table_id)
@@ -726,7 +726,7 @@ ip6_show_mfib (vlib_main_t * vm,
{
ip6_mfib_table_show_one(mfib, vm, &src, &grp, mask, cover);
}
- }));
+ }
return 0;
}
diff --git a/src/vnet/mfib/mfib_entry.c b/src/vnet/mfib/mfib_entry.c
index 471a6895b52..2d47c3cdd31 100644
--- a/src/vnet/mfib/mfib_entry.c
+++ b/src/vnet/mfib/mfib_entry.c
@@ -1646,13 +1646,13 @@ show_mfib_entry_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "FIB Entries:");
- pool_foreach_index(fei, mfib_entry_pool,
- ({
+ pool_foreach_index (fei, mfib_entry_pool)
+ {
vlib_cli_output (vm, "%d@%U",
fei,
format_mfib_entry, fei,
MFIB_ENTRY_FORMAT_BRIEF);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/mfib/mfib_itf.c b/src/vnet/mfib/mfib_itf.c
index 3e734c8a85f..99408f79f89 100644
--- a/src/vnet/mfib/mfib_itf.c
+++ b/src/vnet/mfib/mfib_itf.c
@@ -249,12 +249,12 @@ show_mfib_itf_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "mFIB interfaces::");
- pool_foreach_index(mfii, mfib_itf_pool,
- ({
+ pool_foreach_index (mfii, mfib_itf_pool)
+ {
vlib_cli_output (vm, "%d@%U",
mfii,
format_mfib_itf, mfii);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/mpls/mpls_api.c b/src/vnet/mpls/mpls_api.c
index 70e8872317a..25bd353c62b 100644
--- a/src/vnet/mpls/mpls_api.c
+++ b/src/vnet/mpls/mpls_api.c
@@ -433,10 +433,10 @@ vl_api_mpls_table_dump_t_handler (vl_api_mpls_table_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (fib_table, mm->fibs,
- ({
+ pool_foreach (fib_table, mm->fibs)
+ {
send_mpls_table_details(am, reg, mp->context, fib_table);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/mpls/mpls_tunnel.c b/src/vnet/mpls/mpls_tunnel.c
index e0fb9eff50e..54458eacdf8 100644
--- a/src/vnet/mpls/mpls_tunnel.c
+++ b/src/vnet/mpls/mpls_tunnel.c
@@ -617,10 +617,10 @@ mpls_tunnel_walk (mpls_tunnel_walk_cb_t cb,
{
u32 mti;
- pool_foreach_index(mti, mpls_tunnel_pool,
- ({
+ pool_foreach_index (mti, mpls_tunnel_pool)
+ {
cb(mti, ctx);
- }));
+ }
}
void
@@ -989,12 +989,12 @@ show_mpls_tunnel_command_fn (vlib_main_t * vm,
if (~0 == mti)
{
- pool_foreach (mt, mpls_tunnel_pool,
- ({
+ pool_foreach (mt, mpls_tunnel_pool)
+ {
vlib_cli_output (vm, "[@%d] %U",
mt - mpls_tunnel_pool,
format_mpls_tunnel, mt);
- }));
+ }
}
else
{
diff --git a/src/vnet/pg/cli.c b/src/vnet/pg/cli.c
index cb8b5bbb287..625198634f5 100644
--- a/src/vnet/pg/cli.c
+++ b/src/vnet/pg/cli.c
@@ -64,9 +64,9 @@ pg_enable_disable (u32 stream_index, int is_enable)
{
/* No stream specified: enable/disable all streams. */
/* *INDENT-OFF* */
- pool_foreach (s, pg->streams, ({
+ pool_foreach (s, pg->streams) {
pg_stream_enable_disable (pg, s, is_enable);
- }));
+ }
/* *INDENT-ON* */
}
else
@@ -245,9 +245,9 @@ show_streams (vlib_main_t * vm,
vlib_cli_output (vm, "%U", format_pg_stream, 0, 0);
/* *INDENT-OFF* */
- pool_foreach (s, pg->streams, ({
+ pool_foreach (s, pg->streams) {
vlib_cli_output (vm, "%U", format_pg_stream, s, verbose);
- }));
+ }
/* *INDENT-ON* */
done:
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 975239e563d..20b0a9e137b 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -622,11 +622,11 @@ application_detach_process (application_t * app, u32 api_client_index)
app->app_index, api_client_index);
/* *INDENT-OFF* */
- pool_foreach (wrk_map, app->worker_maps, ({
+ 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))
@@ -1357,7 +1357,7 @@ application_format_listeners (application_t * app, int verbose)
}
/* *INDENT-OFF* */
- pool_foreach (wrk_map, app->worker_maps, ({
+ pool_foreach (wrk_map, app->worker_maps) {
app_wrk = app_worker_get (wrk_map->wrk_index);
if (hash_elts (app_wrk->listeners_table) == 0)
continue;
@@ -1365,7 +1365,7 @@ application_format_listeners (application_t * app, int verbose)
vlib_cli_output (vm, "%U", format_app_worker_listener, app_wrk,
handle, sm_index, verbose);
}));
- }));
+ }
/* *INDENT-ON* */
}
@@ -1382,10 +1382,10 @@ application_format_connects (application_t * app, int verbose)
}
/* *INDENT-OFF* */
- pool_foreach (wrk_map, app->worker_maps, ({
+ 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* */
}
@@ -1488,10 +1488,10 @@ format_application (u8 * s, va_list * args)
format_memory_size, props->tx_fifo_size);
/* *INDENT-OFF* */
- pool_foreach (wrk_map, app->worker_maps, ({
+ 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;
@@ -1511,9 +1511,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, ({
+ pool_foreach (app, app_main.app_pool) {
application_format_listeners (app, verbose);
- }));
+ }
/* *INDENT-ON* */
}
@@ -1531,9 +1531,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, ({
+ pool_foreach (app, app_main.app_pool) {
application_format_connects (app, verbose);
- }));
+ }
/* *INDENT-ON* */
}
@@ -1545,9 +1545,9 @@ show_certificate_command_fn (vlib_main_t * vm, unformat_input_t * input,
session_cli_return_if_not_enabled ();
/* *INDENT-OFF* */
- pool_foreach (ckpair, app_main.cert_key_pair_store, ({
+ pool_foreach (ckpair, app_main.cert_key_pair_store) {
vlib_cli_output (vm, "%U", format_cert_key_pair, ckpair);
- }));
+ }
/* *INDENT-ON* */
return 0;
}
@@ -1558,12 +1558,12 @@ appliction_format_app_mq (vlib_main_t * vm, application_t * app)
app_worker_map_t *map;
app_worker_t *wrk;
/* *INDENT-OFF* */
- pool_foreach (map, app->worker_maps, ({
+ 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* */
}
@@ -1582,9 +1582,9 @@ appliction_format_all_app_mq (vlib_main_t * vm)
}
/* *INDENT-OFF* */
- pool_foreach (app, app_main.app_pool, ({
+ pool_foreach (app, app_main.app_pool) {
appliction_format_app_mq (vm, app);
- }));
+ }
/* *INDENT-ON* */
return 0;
}
@@ -1660,9 +1660,9 @@ show_app_command_fn (vlib_main_t * vm, unformat_input_t * input,
{
vlib_cli_output (vm, "%U", format_application, 0, 0);
/* *INDENT-OFF* */
- pool_foreach (app, app_main.app_pool, ({
+ pool_foreach (app, app_main.app_pool) {
vlib_cli_output (vm, "%U", format_application, app, 0);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/session/application_namespace.c b/src/vnet/session/application_namespace.c
index 1c43c79ce47..b9674bed94a 100644
--- a/src/vnet/session/application_namespace.c
+++ b/src/vnet/session/application_namespace.c
@@ -297,7 +297,7 @@ app_namespace_show_api (vlib_main_t * vm, app_namespace_t * app_ns)
/* *INDENT-OFF* */
- pool_foreach (cs, app_ns->app_sockets, ({
+ 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);
if (handle->aah_app_wrk_index == APP_INVALID_INDEX)
@@ -308,7 +308,7 @@ app_namespace_show_api (vlib_main_t * vm, app_namespace_t * app_ns)
app_wrk = app_worker_get (handle->aah_app_wrk_index);
vlib_cli_output (vm, "%12d%12d%5u", app_wrk->app_index,
app_wrk->wrk_map_index, cf->file_descriptor);
- }));
+ }
/* *INDENT-ON* */
}
@@ -378,9 +378,9 @@ do_ns_list:
"sw_if_index", "Name");
/* *INDENT-OFF* */
- pool_foreach (app_ns, app_namespace_pool, ({
+ pool_foreach (app_ns, app_namespace_pool) {
vlib_cli_output (vm, "%U", format_app_namespace, app_ns);
- }));
+ }
/* *INDENT-ON* */
done:
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index 1d648f9e410..65f3f08370e 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -39,7 +39,7 @@ static segment_manager_main_t sm_main;
#define segment_manager_foreach_segment_w_lock(VAR, SM, BODY) \
do { \
clib_rwlock_reader_lock (&(SM)->segments_rwlock); \
- pool_foreach((VAR), ((SM)->segments), (BODY)); \
+ pool_foreach((VAR), ((SM)->segments)) (BODY); \
clib_rwlock_reader_unlock (&(SM)->segments_rwlock); \
} while (0)
@@ -482,9 +482,9 @@ segment_manager_free (segment_manager_t * sm)
clib_rwlock_writer_lock (&sm->segments_rwlock);
/* *INDENT-OFF* */
- pool_foreach (fifo_segment, sm->segments, ({
+ pool_foreach (fifo_segment, sm->segments) {
segment_manager_del_segment (sm, fifo_segment);
- }));
+ }
/* *INDENT-ON* */
clib_rwlock_writer_unlock (&sm->segments_rwlock);
@@ -667,14 +667,14 @@ segment_manager_alloc_session_fifos (segment_manager_t * sm,
segment_manager_segment_reader_lock (sm);
/* *INDENT-OFF* */
- pool_foreach (cur, sm->segments, ({
+ pool_foreach (cur, sm->segments) {
free_bytes = fifo_segment_available_bytes (cur);
if (free_bytes > max_free_bytes)
{
max_free_bytes = free_bytes;
fs = cur;
}
- }));
+ }
/* *INDENT-ON* */
if (fs)
@@ -955,7 +955,7 @@ segment_manager_show_fn (vlib_main_t * vm, unformat_input_t * input,
"HighWater", "LowWater", "FifoTuning");
/* *INDENT-OFF* */
- pool_foreach (sm, smm->segment_managers, ({
+ pool_foreach (sm, smm->segment_managers) {
app_wrk = app_worker_get_if_valid (sm->app_wrk_index);
app = app_wrk ? application_get (app_wrk->app_index) : 0;
custom_logic = (app && (app->cb_fns.fifo_tuning_callback)) ? 1 : 0;
@@ -967,7 +967,7 @@ segment_manager_show_fn (vlib_main_t * vm, unformat_input_t * input,
format_memory_size, max_fifo_size,
sm->high_watermark, sm->low_watermark,
custom_logic ? "custom" : "none");
- }));
+ }
/* *INDENT-ON* */
vlib_cli_output (vm, "\n");
@@ -977,11 +977,11 @@ segment_manager_show_fn (vlib_main_t * vm, unformat_input_t * input,
vlib_cli_output (vm, "%U", format_fifo_segment, 0, verbose);
/* *INDENT-OFF* */
- pool_foreach (sm, smm->segment_managers, ({
+ pool_foreach (sm, smm->segment_managers) {
segment_manager_foreach_segment_w_lock (seg, sm, ({
vlib_cli_output (vm, "%U", format_fifo_segment, seg, verbose);
}));
- }));
+ }
/* *INDENT-ON* */
}
@@ -1024,7 +1024,7 @@ segment_manager_format_sessions (segment_manager_t * sm, int verbose)
clib_rwlock_reader_lock (&sm->segments_rwlock);
/* *INDENT-OFF* */
- pool_foreach (fs, sm->segments, ({
+ pool_foreach (fs, sm->segments) {
for (slice_index = 0; slice_index < fs->n_slices; slice_index++)
{
f = fifo_segment_get_slice_fifo_list (fs, slice_index);
@@ -1053,7 +1053,7 @@ 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_api.c b/src/vnet/session/session_api.c
index 90c0772493a..d080ae44925 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -969,12 +969,12 @@ send_session_rules_table_details (session_rules_table_t * srt, u8 fib_proto,
u8 *tag = 0;
/* *INDENT-OFF* */
srt16 = &srt->session_rules_tables_16;
- pool_foreach (rule16, srt16->rules, ({
+ pool_foreach (rule16, srt16->rules) {
ri = mma_rules_table_rule_index_16 (srt16, rule16);
tag = session_rules_table_rule_tag (srt, ri, 1);
send_session_rule_details4 (rule16, is_local, tp, appns_index, tag,
reg, context);
- }));
+ }
/* *INDENT-ON* */
}
if (is_local || fib_proto == FIB_PROTOCOL_IP6)
@@ -982,12 +982,12 @@ send_session_rules_table_details (session_rules_table_t * srt, u8 fib_proto,
u8 *tag = 0;
/* *INDENT-OFF* */
srt40 = &srt->session_rules_tables_40;
- pool_foreach (rule40, srt40->rules, ({
+ pool_foreach (rule40, srt40->rules) {
ri = mma_rules_table_rule_index_40 (srt40, rule40);
tag = session_rules_table_rule_tag (srt, ri, 1);
send_session_rule_details6 (rule40, is_local, tp, appns_index, tag,
reg, context);
- }));
+ }
/* *INDENT-ON* */
}
}
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index ade76ef4e60..a9197547501 100644
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -337,14 +337,14 @@ session_cli_show_all_sessions (vlib_main_t * vm, int verbose)
n_closed = 0;
/* *INDENT-OFF* */
- pool_foreach(s, pool, ({
+ pool_foreach (s, pool) {
if (s->session_state >= SESSION_STATE_TRANSPORT_DELETED)
{
n_closed += 1;
continue;
}
vlib_cli_output (vm, "%U", format_session, s, verbose);
- }));
+ }
/* *INDENT-ON* */
if (!n_closed)
@@ -622,7 +622,7 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input,
"App");
/* *INDENT-OFF* */
- pool_foreach (s, smm->wrk[0].sessions, ({
+ pool_foreach (s, smm->wrk[0].sessions) {
if (s->session_state != SESSION_STATE_LISTENING
|| s->session_type != sst)
continue;
@@ -630,7 +630,7 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input,
app_name = application_name_from_index (app_wrk->app_index);
vlib_cli_output (vm, "%U%-25v%", format_session, s, 0,
app_name);
- }));
+ }
/* *INDENT-ON* */
goto done;
}
@@ -727,9 +727,9 @@ clear_session_command_fn (vlib_main_t * vm, unformat_input_t * input,
/* *INDENT-OFF* */
vec_foreach (wrk, smm->wrk)
{
- pool_foreach(session, wrk->sessions, ({
+ pool_foreach (session, wrk->sessions) {
clear_session (session);
- }));
+ }
};
/* *INDENT-ON* */
}
diff --git a/src/vnet/session/session_rules_table.c b/src/vnet/session/session_rules_table.c
index 7f5c7bb3bbb..34bd6a38676 100644
--- a/src/vnet/session/session_rules_table.c
+++ b/src/vnet/session/session_rules_table.c
@@ -599,9 +599,9 @@ session_rules_table_cli_dump (vlib_main_t * vm, session_rules_table_t * srt,
vlib_cli_output (vm, "IP4 rules");
/* *INDENT-OFF* */
- pool_foreach(sr4, srt4->rules, ({
+ pool_foreach (sr4, srt4->rules) {
vlib_cli_output (vm, "%U", format_session_rule4, srt, sr4);
- }));
+ }
/* *INDENT-ON* */
}
@@ -613,9 +613,9 @@ session_rules_table_cli_dump (vlib_main_t * vm, session_rules_table_t * srt,
vlib_cli_output (vm, "IP6 rules");
/* *INDENT-OFF* */
- pool_foreach(sr6, srt6->rules, ({
+ pool_foreach (sr6, srt6->rules) {
vlib_cli_output (vm, "%U", format_session_rule6, srt, sr6);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/session/session_table.h b/src/vnet/session/session_table.h
index cf4e9698e3a..ead3c302681 100644
--- a/src/vnet/session/session_table.h
+++ b/src/vnet/session/session_table.h
@@ -72,7 +72,7 @@ void session_table_init (session_table_t * slt, u8 fib_proto);
session_table_t *_get_session_tables ();
#define session_table_foreach(VAR, BODY) \
- pool_foreach(VAR, _get_session_tables (), BODY)
+ pool_foreach (VAR, _get_session_tables ()) BODY
#endif /* SRC_VNET_SESSION_SESSION_TABLE_H_ */
/* *INDENT-ON* */
diff --git a/src/vnet/srmpls/sr_mpls_policy.c b/src/vnet/srmpls/sr_mpls_policy.c
index ceff11cbac8..8f0804850f1 100644
--- a/src/vnet/srmpls/sr_mpls_policy.c
+++ b/src/vnet/srmpls/sr_mpls_policy.c
@@ -598,9 +598,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, {
+ pool_foreach (sr_policy, sm->sr_policies) {
vec_add1(vec_policies, sr_policy);
- });
+ }
/* *INDENT-ON* */
vec_foreach_index (i, vec_policies)
diff --git a/src/vnet/srmpls/sr_mpls_steering.c b/src/vnet/srmpls/sr_mpls_steering.c
index 669644913a3..b12e78d2755 100644
--- a/src/vnet/srmpls/sr_mpls_steering.c
+++ b/src/vnet/srmpls/sr_mpls_steering.c
@@ -800,9 +800,9 @@ show_sr_mpls_steering_policies_command_fn (vlib_main_t * vm,
vlib_cli_output (vm, "SR MPLS steering policies:");
/* *INDENT-OFF* */
- pool_foreach(steer_pl, sm->steer_policies, ({
+ pool_foreach (steer_pl, sm->steer_policies) {
vec_add1(steer_policies, steer_pl);
- }));
+ }
/* *INDENT-ON* */
for (i = 0; i < vec_len (steer_policies); i++)
{
diff --git a/src/vnet/srp/interface.c b/src/vnet/srp/interface.c
index 3c98f416781..329cf2b83ca 100644
--- a/src/vnet/srp/interface.c
+++ b/src/vnet/srp/interface.c
@@ -92,10 +92,10 @@ void serialize_srp_main (serialize_main_t * m, va_list * va)
srp_interface_t * si;
serialize_integer (m, pool_elts (sm->interface_pool), sizeof (u32));
- pool_foreach (si, sm->interface_pool, ({
+ pool_foreach (si, sm->interface_pool) {
serialize_integer (m, si->rings[SRP_RING_OUTER].hw_if_index, sizeof (u32));
serialize_integer (m, si->rings[SRP_RING_INNER].hw_if_index, sizeof (u32));
- }));
+ }
}
void unserialize_srp_main (serialize_main_t * m, va_list * va)
diff --git a/src/vnet/srp/node.c b/src/vnet/srp/node.c
index 6b7602516ba..926cb7cb45c 100644
--- a/src/vnet/srp/node.c
+++ b/src/vnet/srp/node.c
@@ -845,9 +845,9 @@ srp_ips_process (vlib_main_t * vm,
while (1)
{
- pool_foreach (si, sm->interface_pool, ({
+ pool_foreach (si, sm->interface_pool) {
maybe_send_ips_message (si);
- }));
+ }
vlib_process_suspend (vm, 1.0);
}
diff --git a/src/vnet/srv6/sr_api.c b/src/vnet/srv6/sr_api.c
index 278111f1dfc..cb468b97ef5 100644
--- a/src/vnet/srv6/sr_api.c
+++ b/src/vnet/srv6/sr_api.c
@@ -273,10 +273,10 @@ static void vl_api_sr_localsids_dump_t_handler
return;
/* *INDENT-OFF* */
- pool_foreach (t, sm->localsids,
- ({
+ pool_foreach (t, sm->localsids)
+ {
send_sr_localsid_details(t, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
}
@@ -338,10 +338,10 @@ vl_api_sr_policies_dump_t_handler (vl_api_sr_policies_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (t, sm->sr_policies,
- ({
+ pool_foreach (t, sm->sr_policies)
+ {
send_sr_policies_details(t, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
}
@@ -406,10 +406,10 @@ static void
return;
/* *INDENT-OFF* */
- pool_foreach (t, sm->sr_policies,
- ({
+ pool_foreach (t, sm->sr_policies)
+ {
send_sr_policies_details_with_sl_index(t, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
}
@@ -453,10 +453,10 @@ static void vl_api_sr_steering_pol_dump_t_handler
return;
/* *INDENT-OFF* */
- pool_foreach (t, sm->steer_policies,
- ({
+ pool_foreach (t, sm->steer_policies)
+ {
send_sr_steering_pol_details(t, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/srv6/sr_localsid.c b/src/vnet/srv6/sr_localsid.c
index f632415c091..93619071ca3 100644
--- a/src/vnet/srv6/sr_localsid.c
+++ b/src/vnet/srv6/sr_localsid.c
@@ -397,10 +397,10 @@ sr_cli_localsid_command_fn (vlib_main_t * vm, unformat_input_t * input,
/* Create a vector out of the plugin pool as recommended */
/* *INDENT-OFF* */
- pool_foreach (plugin, sm->plugin_functions,
+ pool_foreach (plugin, sm->plugin_functions)
{
vec_add1 (vec_plugins, plugin);
- });
+ }
/* *INDENT-ON* */
vec_foreach (plugin_it, vec_plugins)
@@ -552,7 +552,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); }));
+ pool_foreach (ls, sm->localsids) { vec_add1 (localsid_list, ls); }
/* *INDENT-ON* */
for (i = 0; i < vec_len (localsid_list); i++)
{
@@ -2407,8 +2407,8 @@ show_sr_localsid_behaviors_command_fn (vlib_main_t * vm,
"SR LocalSIDs behaviors:\n-----------------------\n\n");
/* *INDENT-OFF* */
- pool_foreach (plugin, sm->plugin_functions,
- ({ vec_add1 (plugins_vec, plugin); }));
+ pool_foreach (plugin, sm->plugin_functions)
+ { vec_add1 (plugins_vec, plugin); }
/* *INDENT-ON* */
/* Print static behaviors */
diff --git a/src/vnet/srv6/sr_policy_rewrite.c b/src/vnet/srv6/sr_policy_rewrite.c
index a0b151decdd..3e8a4e4a9c5 100644
--- a/src/vnet/srv6/sr_policy_rewrite.c
+++ b/src/vnet/srv6/sr_policy_rewrite.c
@@ -979,10 +979,10 @@ sr_policy_command_fn (vlib_main_t * vm, unformat_input_t * input,
sr_policy_fn_registration_t **plugin_it = 0;
/* *INDENT-OFF* */
- pool_foreach (plugin, sm->policy_plugin_functions,
+ pool_foreach (plugin, sm->policy_plugin_functions)
{
vec_add1 (vec_plugins, plugin);
- });
+ }
/* *INDENT-ON* */
vec_foreach (plugin_it, vec_plugins)
@@ -1121,8 +1121,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); } );
+ pool_foreach (sr_policy, sm->sr_policies)
+ {vec_add1 (vec_policies, sr_policy); }
/* *INDENT-ON* */
vec_foreach_index (i, vec_policies)
@@ -3411,8 +3411,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); }));
+ pool_foreach (plugin, sm->policy_plugin_functions)
+ { vec_add1 (plugins_vec, plugin); }
/* *INDENT-ON* */
vlib_cli_output (vm, "Plugin behaviors:\n");
diff --git a/src/vnet/srv6/sr_steering.c b/src/vnet/srv6/sr_steering.c
index aa98a45d3da..9db13900f97 100644
--- a/src/vnet/srv6/sr_steering.c
+++ b/src/vnet/srv6/sr_steering.c
@@ -492,7 +492,7 @@ show_sr_steering_policies_command_fn (vlib_main_t * vm,
vlib_cli_output (vm, "SR steering policies:");
/* *INDENT-OFF* */
- pool_foreach (steer_pl, sm->steer_policies, ({vec_add1(steer_policies, steer_pl);}));
+ 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++)
diff --git a/src/vnet/tcp/tcp_bt.c b/src/vnet/tcp/tcp_bt.c
index 07f86789945..67e9a14ceda 100644
--- a/src/vnet/tcp/tcp_bt.c
+++ b/src/vnet/tcp/tcp_bt.c
@@ -639,9 +639,9 @@ tcp_bt_flush_samples (tcp_connection_t * tc)
vec_reset_length (samples);
/* *INDENT-OFF* */
- pool_foreach (bts, bt->samples, ({
+ pool_foreach (bts, bt->samples) {
vec_add1 (samples, bts - bt->samples);
- }));
+ }
/* *INDENT-ON* */
vec_foreach (si, samples)
diff --git a/src/vnet/teib/teib.c b/src/vnet/teib/teib.c
index 69ed416b41a..dc0c99b1dbe 100644
--- a/src/vnet/teib/teib.c
+++ b/src/vnet/teib/teib.c
@@ -317,10 +317,10 @@ teib_walk (teib_walk_cb_t fn, void *ctx)
index_t tei;
/* *INDENT-OFF* */
- pool_foreach_index(tei, teib_pool,
- ({
+ pool_foreach_index (tei, teib_pool)
+ {
fn(tei, ctx);
- }));
+ }
/* *INDENT-ON* */
}
@@ -330,11 +330,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,
- ({
+ 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* */
}
@@ -345,12 +345,12 @@ teib_walk_itf_proto (u32 sw_if_index,
index_t tei;
/* *INDENT-OFF* */
- pool_foreach_index(tei, teib_pool,
- ({
+ 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* */
}
diff --git a/src/vnet/udp/udp_api.c b/src/vnet/udp/udp_api.c
index 566acbcf35c..5b9d8945642 100644
--- a/src/vnet/udp/udp_api.c
+++ b/src/vnet/udp/udp_api.c
@@ -103,10 +103,10 @@ vl_api_udp_encap_dump_t_handler (vl_api_udp_encap_dump_t * mp,
return;
/* *INDENT-OFF* */
- pool_foreach(ue, udp_encap_pool,
- ({
+ pool_foreach (ue, udp_encap_pool)
+ {
send_udp_encap_details(ue, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vnet/udp/udp_encap.c b/src/vnet/udp/udp_encap.c
index 0b1d3d7125b..28ea56050a6 100644
--- a/src/vnet/udp/udp_encap.c
+++ b/src/vnet/udp/udp_encap.c
@@ -508,11 +508,11 @@ udp_encap_walk (udp_encap_walk_cb_t cb, void *ctx)
index_t uei;
/* *INDENT-OFF* */
- pool_foreach_index(uei, udp_encap_pool,
- ({
+ pool_foreach_index (uei, udp_encap_pool)
+ {
if (WALK_STOP == cb(uei, ctx))
break;
- }));
+ }
/* *INDENT-ON* */
}
@@ -537,10 +537,10 @@ udp_encap_show (vlib_main_t * vm,
if (INDEX_INVALID == uei)
{
/* *INDENT-OFF* */
- pool_foreach_index(uei, udp_encap_pool,
- ({
+ pool_foreach_index (uei, udp_encap_pool)
+ {
vlib_cli_output(vm, "%U", format_udp_encap, uei, 0);
- }));
+ }
/* *INDENT-ON* */
}
else
diff --git a/src/vnet/unix/gdb_funcs.c b/src/vnet/unix/gdb_funcs.c
index 3f2d54dc4d9..fc61c54f82f 100644
--- a/src/vnet/unix/gdb_funcs.c
+++ b/src/vnet/unix/gdb_funcs.c
@@ -249,10 +249,10 @@ gdb_show_traces ()
trace_apply_filter(this_vlib_main);
traces = 0;
- pool_foreach (h, tm->trace_buffer_pool,
- ({
+ pool_foreach (h, tm->trace_buffer_pool)
+ {
vec_add1 (traces, h[0]);
- }));
+ }
if (vec_len (traces) == 0)
{
diff --git a/src/vnet/vxlan-gbp/vxlan_gbp.c b/src/vnet/vxlan-gbp/vxlan_gbp.c
index a061cc17d8f..d1267cffc13 100644
--- a/src/vnet/vxlan-gbp/vxlan_gbp.c
+++ b/src/vnet/vxlan-gbp/vxlan_gbp.c
@@ -929,10 +929,10 @@ show_vxlan_gbp_tunnel_command_fn (vlib_main_t * vm,
vlib_cli_output (vm, "No vxlan-gbp tunnels configured...");
/* *INDENT-OFF* */
- pool_foreach (t, vxm->tunnels,
- ({
+ pool_foreach (t, vxm->tunnels)
+ {
vlib_cli_output (vm, "%U", format_vxlan_gbp_tunnel, t);
- }));
+ }
/* *INDENT-ON* */
if (raw)
diff --git a/src/vnet/vxlan-gbp/vxlan_gbp_api.c b/src/vnet/vxlan-gbp/vxlan_gbp_api.c
index 17a1984b8c3..2cac7f55021 100644
--- a/src/vnet/vxlan-gbp/vxlan_gbp_api.c
+++ b/src/vnet/vxlan-gbp/vxlan_gbp_api.c
@@ -189,10 +189,10 @@ static void vl_api_vxlan_gbp_tunnel_dump_t_handler
if (~0 == sw_if_index)
{
/* *INDENT-OFF* */
- pool_foreach (t, vxm->tunnels,
- ({
+ pool_foreach (t, vxm->tunnels)
+ {
send_vxlan_gbp_tunnel_details(t, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
}
else
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe.c b/src/vnet/vxlan-gpe/vxlan_gpe.c
index 979d98c747a..e5ca4ec769e 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe.c
+++ b/src/vnet/vxlan-gpe/vxlan_gpe.c
@@ -998,10 +998,10 @@ show_vxlan_gpe_tunnel_command_fn (vlib_main_t * vm,
vlib_cli_output (vm, "No vxlan-gpe tunnels configured.");
/* *INDENT-OFF* */
- pool_foreach (t, ngm->tunnels,
- ({
+ pool_foreach (t, ngm->tunnels)
+ {
vlib_cli_output (vm, "%U", format_vxlan_gpe_tunnel, t);
- }));
+ }
/* *INDENT-ON* */
return 0;
diff --git a/src/vnet/vxlan-gpe/vxlan_gpe_api.c b/src/vnet/vxlan-gpe/vxlan_gpe_api.c
index 7d484c14114..711ee66f4fd 100644
--- a/src/vnet/vxlan-gpe/vxlan_gpe_api.c
+++ b/src/vnet/vxlan-gpe/vxlan_gpe_api.c
@@ -190,10 +190,10 @@ static void vl_api_vxlan_gpe_tunnel_dump_t_handler
if (~0 == sw_if_index)
{
/* *INDENT-OFF* */
- pool_foreach (t, vgm->tunnels,
- ({
+ pool_foreach (t, vgm->tunnels)
+ {
send_vxlan_gpe_tunnel_details(t, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
}
else
diff --git a/src/vnet/vxlan/vxlan.c b/src/vnet/vxlan/vxlan.c
index 742103a7887..bf205adc8fb 100644
--- a/src/vnet/vxlan/vxlan.c
+++ b/src/vnet/vxlan/vxlan.c
@@ -862,10 +862,10 @@ show_vxlan_tunnel_command_fn (vlib_main_t * vm,
vlib_cli_output (vm, "No vxlan tunnels configured...");
/* *INDENT-OFF* */
- pool_foreach (t, vxm->tunnels,
- ({
+ pool_foreach (t, vxm->tunnels)
+ {
vlib_cli_output (vm, "%U", format_vxlan_tunnel, t);
- }));
+ }
/* *INDENT-ON* */
if (raw)
diff --git a/src/vnet/vxlan/vxlan_api.c b/src/vnet/vxlan/vxlan_api.c
index 8e5b346c394..0e51f3dab5a 100644
--- a/src/vnet/vxlan/vxlan_api.c
+++ b/src/vnet/vxlan/vxlan_api.c
@@ -232,10 +232,10 @@ static void vl_api_vxlan_tunnel_dump_t_handler
if (~0 == sw_if_index)
{
/* *INDENT-OFF* */
- pool_foreach (t, vxm->tunnels,
- ({
+ pool_foreach (t, vxm->tunnels)
+ {
send_vxlan_tunnel_details(t, reg, mp->context);
- }));
+ }
/* *INDENT-ON* */
}
else