misc: move to new pool_foreach macros 96/30396/2
authorDamjan Marion <damarion@cisco.com>
Sun, 13 Dec 2020 20:47:40 +0000 (21:47 +0100)
committerDave Barach <openvpp@barachs.net>
Mon, 14 Dec 2020 12:14:21 +0000 (12:14 +0000)
Type: refactor
Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772
Signed-off-by: Damjan Marion <damarion@cisco.com>
228 files changed:
src/plugins/abf/abf_itf_attach.c
src/plugins/abf/abf_policy.c
src/plugins/acl/acl.c
src/plugins/acl/hash_lookup.c
src/plugins/acl/lookup_context.c
src/plugins/avf/device.c
src/plugins/builtinurl/builtins.c
src/plugins/cdp/cdp_input.c
src/plugins/cdp/cdp_periodic.c
src/plugins/cnat/cnat_client.c
src/plugins/cnat/cnat_session.c
src/plugins/cnat/cnat_translation.c
src/plugins/ct6/ct6.c
src/plugins/dhcp/client.c
src/plugins/dhcp/dhcp6_client_common_dp.c
src/plugins/dhcp/dhcp6_ia_na_client_cp.c
src/plugins/dhcp/dhcp6_pd_client_cp.c
src/plugins/dhcp/dhcp_api.c
src/plugins/dns/dns.c
src/plugins/dpdk/device/init.c
src/plugins/flowprobe/flowprobe.c
src/plugins/gbp/gbp_bridge_domain.c
src/plugins/gbp/gbp_contract.c
src/plugins/gbp/gbp_endpoint.c
src/plugins/gbp/gbp_endpoint_group.c
src/plugins/gbp/gbp_ext_itf.c
src/plugins/gbp/gbp_itf.c
src/plugins/gbp/gbp_recirc.c
src/plugins/gbp/gbp_route_domain.c
src/plugins/gbp/gbp_subnet.c
src/plugins/gbp/gbp_vxlan.c
src/plugins/geneve/geneve.c
src/plugins/geneve/geneve_api.c
src/plugins/gtpu/gtpu.c
src/plugins/gtpu/gtpu_api.c
src/plugins/hs_apps/sapi/vpp_echo.c
src/plugins/hs_apps/sapi/vpp_echo_proto_quic.c
src/plugins/http_static/static_server.c
src/plugins/igmp/igmp_api.c
src/plugins/igmp/igmp_cli.c
src/plugins/ikev2/ikev2.c
src/plugins/ikev2/ikev2_api.c
src/plugins/ikev2/ikev2_cli.c
src/plugins/ila/ila.c
src/plugins/ioam/ip6/ioam_cache.c
src/plugins/ioam/ip6/ioam_cache.h
src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c
src/plugins/l2tp/l2tp.c
src/plugins/l2tp/l2tp_api.c
src/plugins/l3xc/l3xc.c
src/plugins/lacp/cli.c
src/plugins/lacp/lacp.c
src/plugins/lacp/rx_machine.c
src/plugins/lb/api.c
src/plugins/lb/cli.c
src/plugins/lb/lb.c
src/plugins/lisp/lisp-cp/control.c
src/plugins/lisp/lisp-cp/lisp_api.c
src/plugins/lisp/lisp-cp/lisp_cli.c
src/plugins/lisp/lisp-cp/one_api.c
src/plugins/lisp/lisp-cp/one_cli.c
src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c
src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c
src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c
src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c
src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c
src/plugins/lldp/lldp_cli.c
src/plugins/mactime/builtins.c
src/plugins/mactime/mactime.c
src/plugins/mactime/mactime_test.c
src/plugins/mactime/mactime_top.c
src/plugins/map/map.c
src/plugins/map/map_api.c
src/plugins/memif/cli.c
src/plugins/memif/memif.c
src/plugins/memif/memif_api.c
src/plugins/nat/det44/det44.c
src/plugins/nat/det44/det44.h
src/plugins/nat/det44/det44_api.c
src/plugins/nat/det44/det44_cli.c
src/plugins/nat/det44/det44_inlines.h
src/plugins/nat/dslite/dslite_cli.c
src/plugins/nat/in2out.c
src/plugins/nat/in2out_ed.c
src/plugins/nat/nat.c
src/plugins/nat/nat44_api.c
src/plugins/nat/nat44_cli.c
src/plugins/nat/nat44_hairpinning.c
src/plugins/nat/nat64/nat64.c
src/plugins/nat/nat64/nat64_db.c
src/plugins/nat/nat66/nat66.c
src/plugins/nat/nat66/nat66_in2out.c
src/plugins/nat/nat_format.c
src/plugins/nat/nat_inlines.h
src/plugins/nsh/nsh-md2-ioam/nsh_md2_ioam.c
src/plugins/nsh/nsh_api.c
src/plugins/nsh/nsh_cli.c
src/plugins/perfmon/perfmon.c
src/plugins/pppoe/pppoe.c
src/plugins/pppoe/pppoe_api.c
src/plugins/quic/quic.c
src/plugins/stn/stn.c
src/plugins/stn/stn_api.c
src/plugins/tracedump/tracedump.c
src/plugins/vmxnet3/cli.c
src/plugins/vmxnet3/vmxnet3.c
src/plugins/vmxnet3/vmxnet3_api.c
src/plugins/vrrp/vrrp.c
src/plugins/vrrp/vrrp_api.c
src/plugins/vrrp/vrrp_cli.c
src/plugins/wireguard/wireguard_if.c
src/plugins/wireguard/wireguard_peer.c [changed mode: 0755->0644]
src/svm/svm.c
src/svm/svmtool.c
src/vcl/ldp.c
src/vcl/vcl_locked.c
src/vcl/vppcom.c
src/vlib/cli.c
src/vlib/node.c
src/vlib/trace.c
src/vlib/unix/cli.c
src/vlibmemory/memory_api.c
src/vlibmemory/socket_api.c
src/vlibmemory/vlib_api_cli.c
src/vnet/adj/adj.c
src/vnet/bfd/bfd_api.c
src/vnet/bfd/bfd_cli.c
src/vnet/bfd/bfd_udp.c
src/vnet/bier/bier_api.c
src/vnet/bier/bier_disp_table.c
src/vnet/bier/bier_fmask.c
src/vnet/bier/bier_imp.c
src/vnet/bier/bier_table.c
src/vnet/bonding/cli.c
src/vnet/classify/classify_api.c
src/vnet/classify/vnet_classify.c
src/vnet/devices/af_packet/af_packet.c
src/vnet/devices/tap/cli.c
src/vnet/devices/tap/tap.c
src/vnet/devices/virtio/cli.c
src/vnet/devices/virtio/pci.c
src/vnet/devices/virtio/vhost_user.c
src/vnet/devices/virtio/virtio_api.c
src/vnet/devices/virtio/virtio_process.c
src/vnet/dpo/load_balance.c
src/vnet/dpo/load_balance_map.c
src/vnet/dpo/lookup_dpo.c
src/vnet/dpo/replicate_dpo.c
src/vnet/fib/fib_entry.c
src/vnet/fib/fib_entry_delegate.c
src/vnet/fib/fib_path.c
src/vnet/fib/fib_path_list.c
src/vnet/fib/fib_urpf_list.c
src/vnet/fib/ip4_fib.c
src/vnet/fib/ip6_fib.c
src/vnet/fib/mpls_fib.c
src/vnet/flow/flow_cli.c
src/vnet/gre/gre_api.c
src/vnet/gre/interface.c
src/vnet/interface.c
src/vnet/interface_api.c
src/vnet/interface_cli.c
src/vnet/ip-neighbor/ip_neighbor.c
src/vnet/ip/ip4_forward.c
src/vnet/ip/ip6_forward.c
src/vnet/ip/ip_api.c
src/vnet/ip/ip_container_proxy.c
src/vnet/ip/reass/ip4_full_reass.c
src/vnet/ip/reass/ip4_sv_reass.c
src/vnet/ip/reass/ip6_full_reass.c
src/vnet/ip/reass/ip6_sv_reass.c
src/vnet/ip6-nd/ip6_mld.c
src/vnet/ip6-nd/ip6_nd_api.c
src/vnet/ip6-nd/ip6_ra.c
src/vnet/ip6-nd/rd_cp.c
src/vnet/ipip/ipip_api.c
src/vnet/ipip/ipip_cli.c
src/vnet/ipsec/ipsec.c
src/vnet/ipsec/ipsec_api.c
src/vnet/ipsec/ipsec_cli.c
src/vnet/ipsec/ipsec_itf.c
src/vnet/ipsec/ipsec_sa.c
src/vnet/ipsec/ipsec_tun.c
src/vnet/l2/l2_api.c
src/vnet/l2/l2_input.c
src/vnet/l2/l2_rw.c
src/vnet/l2/l2_xcrw.c
src/vnet/mfib/ip4_mfib.c
src/vnet/mfib/ip6_mfib.c
src/vnet/mfib/mfib_entry.c
src/vnet/mfib/mfib_itf.c
src/vnet/mpls/mpls_api.c
src/vnet/mpls/mpls_tunnel.c
src/vnet/pg/cli.c
src/vnet/session/application.c
src/vnet/session/application_namespace.c
src/vnet/session/segment_manager.c
src/vnet/session/session_api.c
src/vnet/session/session_cli.c
src/vnet/session/session_rules_table.c
src/vnet/session/session_table.h
src/vnet/srmpls/sr_mpls_policy.c
src/vnet/srmpls/sr_mpls_steering.c
src/vnet/srp/interface.c
src/vnet/srp/node.c
src/vnet/srv6/sr_api.c
src/vnet/srv6/sr_localsid.c
src/vnet/srv6/sr_policy_rewrite.c
src/vnet/srv6/sr_steering.c
src/vnet/tcp/tcp_bt.c
src/vnet/teib/teib.c
src/vnet/udp/udp_api.c
src/vnet/udp/udp_encap.c
src/vnet/unix/gdb_funcs.c
src/vnet/vxlan-gbp/vxlan_gbp.c
src/vnet/vxlan-gbp/vxlan_gbp_api.c
src/vnet/vxlan-gpe/vxlan_gpe.c
src/vnet/vxlan-gpe/vxlan_gpe_api.c
src/vnet/vxlan/vxlan.c
src/vnet/vxlan/vxlan_api.c
src/vpp/api/api.c
src/vpp/stats/stat_segment.c
src/vppinfra/graph.c
src/vppinfra/pmalloc.c
src/vppinfra/pool.h
src/vppinfra/test_pool_iterate.c
src/vppinfra/test_tw_timer.c
src/vppinfra/timing_wheel.c

index 337eed8..4f17f72 100644 (file)
@@ -472,11 +472,11 @@ abf_itf_attach_walk (abf_itf_attach_walk_cb_t cb, void *ctx)
   u32 aii;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(aii, abf_itf_attach_pool,
-  ({
+  pool_foreach_index (aii, abf_itf_attach_pool)
+   {
     if (!cb(aii, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 8defa75..945434b 100644 (file)
@@ -346,11 +346,11 @@ abf_policy_walk (abf_policy_walk_cb_t cb, void *ctx)
   u32 api;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(api, abf_policy_pool,
-  ({
+  pool_foreach_index (api, abf_policy_pool)
+   {
     if (!cb(api, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -375,10 +375,10 @@ abf_show_policy_cmd (vlib_main_t * vm,
   if (INDEX_INVALID == policy_id)
     {
       /* *INDENT-OFF* */
-      pool_foreach(ap, abf_policy_pool,
-      ({
+      pool_foreach (ap, abf_policy_pool)
+       {
         vlib_cli_output(vm, "%U", format_abf, ap);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
index b18e851..05251c6 100644 (file)
@@ -1965,10 +1965,10 @@ vl_api_acl_dump_t_handler (vl_api_acl_dump_t * mp)
     {
     /* *INDENT-OFF* */
     /* Just dump all ACLs */
-    pool_foreach (acl, am->acls,
-    ({
+    pool_foreach (acl, am->acls)
+     {
       send_acl_details(am, reg, acl, mp->context);
-    }));
+    }
     /* *INDENT-ON* */
     }
   else
@@ -2050,10 +2050,10 @@ vl_api_acl_interface_list_dump_t_handler (vl_api_acl_interface_list_dump_t *
   if (mp->sw_if_index == ~0)
     {
     /* *INDENT-OFF* */
-    pool_foreach (swif, im->sw_interfaces,
-    ({
+    pool_foreach (swif, im->sw_interfaces)
+     {
       send_acl_interface_list_details(am, reg, swif->sw_if_index, mp->context);
-    }));
+    }
     /* *INDENT-ON* */
     }
   else
@@ -2215,10 +2215,10 @@ vl_api_macip_acl_dump_t_handler (vl_api_macip_acl_dump_t * mp)
     {
       /* Just dump all ACLs for now, with sw_if_index = ~0 */
       /* *INDENT-OFF* */
-      pool_foreach (acl, am->macip_acls,
-        ({
+      pool_foreach (acl, am->macip_acls)
+         {
           send_macip_acl_details (am, reg, acl, mp->context);
-        }));
+        }
       /* *INDENT-ON* */
     }
   else
@@ -2424,10 +2424,10 @@ static void
   if (mp->sw_if_index == ~0)
     {
     /* *INDENT-OFF* */
-    pool_foreach (swif, im->sw_interfaces,
-    ({
+    pool_foreach (swif, im->sw_interfaces)
+     {
       send_acl_interface_etype_whitelist_details(am, reg, swif->sw_if_index, mp->context);
-    }));
+    }
     /* *INDENT-ON* */
     }
   else
@@ -3268,8 +3268,8 @@ acl_plugin_show_sessions (acl_main_t * am,
        }
       vlib_cli_output (vm, "  connection add/del stats:", wk);
       /* *INDENT-OFF* */
-      pool_foreach (swif, im->sw_interfaces,
-        ({
+      pool_foreach (swif, im->sw_interfaces)
+         {
           u32 sw_if_index = swif->sw_if_index;
           u64 n_adds =
             (sw_if_index < vec_len (pw->fa_session_adds_by_sw_if_index) ?
@@ -3291,7 +3291,7 @@ acl_plugin_show_sessions (acl_main_t * am,
                            n_adds -
                            n_dels,
                            n_epoch_changes);
-        }));
+        }
       /* *INDENT-ON* */
 
       vlib_cli_output (vm, "  connection timeout type lists:", wk);
index 26ee5cb..85b54b3 100644 (file)
@@ -262,11 +262,11 @@ find_mask_type_index(acl_main_t *am, fa_5tuple_t *mask)
 {
   ace_mask_type_entry_t *mte;
   /* *INDENT-OFF* */
-  pool_foreach(mte, am->ace_mask_type_pool,
-  ({
+  pool_foreach (mte, am->ace_mask_type_pool)
+   {
     if(memcmp(&mte->mask, mask, sizeof(*mask)) == 0)
       return (mte - am->ace_mask_type_pool);
-  }));
+  }
   /* *INDENT-ON* */
   return ~0;
 }
@@ -1160,13 +1160,13 @@ acl_plugin_show_tables_mask_type (void)
 
   vlib_cli_output (vm, "Mask-type entries:");
     /* *INDENT-OFF* */
-    pool_foreach(mte, am->ace_mask_type_pool,
-    ({
+    pool_foreach (mte, am->ace_mask_type_pool)
+     {
       vlib_cli_output(vm, "     %3d: %016llx %016llx %016llx %016llx %016llx %016llx  refcount %d",
                    mte - am->ace_mask_type_pool,
                    mte->mask.kv_40_8.key[0], mte->mask.kv_40_8.key[1], mte->mask.kv_40_8.key[2],
                    mte->mask.kv_40_8.key[3], mte->mask.kv_40_8.key[4], mte->mask.kv_40_8.value, mte->refcount);
-    }));
+    }
     /* *INDENT-ON* */
 }
 
index ed9b2c7..8d1f3f2 100644 (file)
@@ -37,12 +37,12 @@ static u32 get_acl_user_id(acl_main_t *am, char *user_module_name, char *val1_la
 {
     acl_lookup_context_user_t *auser;
 
-    pool_foreach (auser, am->acl_users,
-    ({
+    pool_foreach (auser, am->acl_users)
+     {
       if (0 == strcmp(auser->user_module_name, user_module_name)) {
         return (auser - am->acl_users);
       }
-    }));
+    }
 
     pool_get(am->acl_users, auser);
     auser->user_module_name = user_module_name;
@@ -310,13 +310,13 @@ acl_plugin_show_lookup_user (u32 user_index)
     vlib_main_t *vm = am->vlib_main;
     acl_lookup_context_user_t *auser;
 
-    pool_foreach (auser, am->acl_users,
-    ({
+    pool_foreach (auser, am->acl_users)
+     {
       u32 curr_user_index = (auser - am->acl_users);
       if (user_index == ~0 || (curr_user_index == user_index)) {
         vlib_cli_output (vm, "index %d:%s:%s:%s", curr_user_index, auser->user_module_name, auser->val1_label, auser->val2_label);
       }
-    }));
+    }
 }
 
 
@@ -333,8 +333,8 @@ acl_plugin_show_lookup_context (u32 lc_index)
     return;
   }
 
-  pool_foreach (acontext, am->acl_lookup_contexts,
-  ({
+  pool_foreach (acontext, am->acl_lookup_contexts)
+   {
     u32 curr_lc_index = (acontext - am->acl_lookup_contexts);
     if ((lc_index == ~0) || (curr_lc_index == lc_index)) {
       if (acl_user_id_valid(am, acontext->context_user_id)) {
@@ -350,7 +350,7 @@ acl_plugin_show_lookup_context (u32 lc_index)
                        format_vec32, acontext->acl_indices, "%d");
       }
     }
-  }));
+  }
 }
 
 void *
index c6bf2df..ffd372d 100644 (file)
@@ -1307,10 +1307,10 @@ avf_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
        * during suspend */
       vec_reset_length (dev_pointers);
       /* *INDENT-OFF* */
-      pool_foreach_index (i, am->devices,
+      pool_foreach_index (i, am->devices)
         {
          vec_add1 (dev_pointers, avf_get_device (i));
-       });
+       }
 
       vec_foreach_index (i, dev_pointers)
         {
@@ -1519,7 +1519,7 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args)
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (adp, am->devices, ({
+  pool_foreach (adp, am->devices)  {
        if ((*adp)->pci_addr.as_u32 == args->addr.as_u32)
       {
        args->rv = VNET_API_ERROR_ADDRESS_IN_USE;
@@ -1528,7 +1528,7 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args)
                             &args->addr, "pci address in use");
        return;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_get (am->devices, adp);
index 6b2b57b..04567c0 100644 (file)
@@ -101,10 +101,10 @@ handle_get_interface_stats (http_builtin_method_type_t reqtype,
   else                         /* default, HTTP_BUILTIN_METHOD_GET */
     {
       /* *INDENT-OFF* */
-      pool_foreach (hi, im->hw_interfaces,
-      ({
+      pool_foreach (hi, im->hw_interfaces)
+       {
         vec_add1 (sw_if_indices, hi->sw_if_index);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
@@ -156,12 +156,12 @@ handle_get_interface_list (http_builtin_method_type_t reqtype,
 
   /* Construct vector of active hw_if_indexes ... */
   /* *INDENT-OFF* */
-  pool_foreach (hi, im->hw_interfaces,
-  ({
+  pool_foreach (hi, im->hw_interfaces)
+   {
     /* No point in mentioning "local0"... */
     if (hi - im->hw_interfaces)
       vec_add1 (hw_if_indices, hi - im->hw_interfaces);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* Build answer */
index e52361b..76a3d70 100644 (file)
@@ -439,15 +439,15 @@ format_cdp_neighbors (u8 * s, va_list * va)
              "Our Port", "Peer System", "Peer Port", "Last Heard");
 
   /* *INDENT-OFF* */
-  pool_foreach (n, cm->neighbors,
-  ({
+  pool_foreach (n, cm->neighbors)
+   {
     hw = vnet_get_sup_hw_interface (vnm, n->sw_if_index);
 
     if (n->disabled == 0)
       s = format (s, "%=25v %=25s %=25s %=10.1f\n",
                   hw->name, n->device_name, n->port_id,
                   n->last_heard);
-  }));
+  }
   /* *INDENT-ON* */
   return s;
 }
index b0b33cf..c73d86b 100644 (file)
@@ -358,10 +358,10 @@ cdp_periodic (vlib_main_t * vm)
   static cdp_neighbor_t **n_list = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (n, cm->neighbors,
-  ({
+  pool_foreach (n, cm->neighbors)
+   {
     vec_add1 (n_list, n);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* Across all cdp neighbors known to the system */
index 1074fcc..534813c 100644 (file)
@@ -84,7 +84,7 @@ cnat_client_throttle_pool_process ()
       vec_reset_length (del_vec);
       clib_spinlock_lock (&cnat_client_db.throttle_pool_lock[i]);
       /* *INDENT-OFF* */
-      pool_foreach(addr, cnat_client_db.throttle_pool[i], ({
+      pool_foreach (addr, cnat_client_db.throttle_pool[i])  {
        cc = (AF_IP4 == addr->version ?
              cnat_client_ip4_find (&ip_addr_v4(addr)) :
              cnat_client_ip6_find (&ip_addr_v6(addr)));
@@ -94,7 +94,7 @@ cnat_client_throttle_pool_process ()
            cnat_client_cnt_session (cc);
            vec_add1(del_vec, addr - cnat_client_db.throttle_pool[i]);
          }
-      }));
+      }
       /* *INDENT-ON* */
       vec_foreach (ai, del_vec)
       {
@@ -301,9 +301,8 @@ cnat_client_show (vlib_main_t * vm,
   if (INDEX_INVALID == cci)
     {
       /* *INDENT-OFF* */
-      pool_foreach_index(cci, cnat_client_pool, ({
+      pool_foreach_index (cci, cnat_client_pool)
         vlib_cli_output(vm, "%U", format_cnat_client, cci, 0);
-      }))
       /* *INDENT-ON* */
 
       vlib_cli_output (vm, "%d clients", pool_elts (cnat_client_pool));
index 54554ce..c3d8aa7 100644 (file)
@@ -243,11 +243,11 @@ cnat_timestamp_show (vlib_main_t * vm,
   cnat_timestamp_t *ts;
   clib_rwlock_reader_lock (&cnat_main.ts_lock);
     /* *INDENT-OFF* */
-  pool_foreach (ts, cnat_timestamps, ({
+  pool_foreach (ts, cnat_timestamps)  {
     vlib_cli_output (vm, "[%d] last_seen:%f lifetime:%u ref:%u",
                     ts - cnat_timestamps,
                     ts->last_seen, ts->lifetime, ts->refcnt);
-  }));
+  }
   /* *INDENT-ON* */
   clib_rwlock_reader_unlock (&cnat_main.ts_lock);
   return (NULL);
index d519cd5..9a1cc8b 100644 (file)
@@ -69,11 +69,11 @@ cnat_translation_unwatch_addr (u32 cti, cnat_addr_resol_type_t type)
   addr_resolution_t *ar;
   index_t *indexes = 0, *ari;
   /* *INDENT-OFF* */
-  pool_foreach (ar, tr_resolutions, ({
+  pool_foreach (ar, tr_resolutions)  {
     if ((cti == INDEX_INVALID || ar->cti == cti) &&
       (ar->type == type || CNAT_RESOLV_ADDR_ANY == type))
       vec_add1(indexes, ar - tr_resolutions);
-  }));
+  }
   /* *INDENT-ON* */
   vec_foreach (ari, indexes) pool_put_index (tr_resolutions, *ari);
 
@@ -313,11 +313,11 @@ cnat_translation_walk (cnat_translation_walk_cb_t cb, void *ctx)
   u32 api;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(api, cnat_translation_pool,
-  ({
+  pool_foreach_index (api, cnat_translation_pool)
+   {
     if (!cb(api, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -381,11 +381,11 @@ cnat_translation_show (vlib_main_t * vm,
   if (INDEX_INVALID == cti)
     {
       /* *INDENT-OFF* */
-      pool_foreach_index(cti, cnat_translation_pool,
-      ({
+      pool_foreach_index (cti, cnat_translation_pool)
+       {
        ct = pool_elt_at_index (cnat_translation_pool, cti);
         vlib_cli_output(vm, "%U", format_cnat_translation, ct);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
@@ -403,10 +403,10 @@ cnat_translation_purge (void)
   index_t tri, *trp, *trs = NULL;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(tri, cnat_translation_pool,
-  ({
+  pool_foreach_index (tri, cnat_translation_pool)
+   {
     vec_add1(trs, tri);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (trp, trs) cnat_translation_delete (*trp);
@@ -649,13 +649,13 @@ cnat_if_addr_add_del_callback (u32 sw_if_index, ip_address_t * address,
 {
   addr_resolution_t *ar;
   /* *INDENT-OFF* */
-  pool_foreach (ar, tr_resolutions, ({
+  pool_foreach (ar, tr_resolutions)  {
     if (ar->sw_if_index != sw_if_index)
       continue;
     if (ar->af != ip_addr_version (address))
       continue;
     cnat_if_addr_add_cbs[ar->type] (ar, address, is_del);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 15fa44a..d569a7c 100644 (file)
@@ -322,10 +322,10 @@ show_ct6_command_fn_command_fn (vlib_main_t * vm,
                0 /* pool */ , 0 /* header */ , verbose);
 
       /* *INDENT-OFF* */
-      pool_foreach (s0, cmp->sessions[i],
-      ({
+      pool_foreach (s0, cmp->sessions[i])
+       {
         s = format (s, "%U", format_ct6_session, cmp, i, s0, verbose);
-      }));
+      }
       /* *INDENT-ON* */
     }
   vlib_cli_output (cmp->vlib_main, "%v", s);
@@ -431,10 +431,10 @@ test_ct6_command_fn_command_fn (vlib_main_t * vm,
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (s0, cmp->sessions[0],
-  ({
+  pool_foreach (s0, cmp->sessions[0])
+   {
     s = format (s, "%U", format_ct6_session, cmp, 0, s0, 1 /* verbose */);
-  }));
+  }
   /* *INDENT-ON* */
 
   vlib_cli_output (vm, "\nEnd state: first index %d last index %d\n%v",
@@ -451,10 +451,10 @@ test_ct6_command_fn_command_fn (vlib_main_t * vm,
   ct6_update_session_hit (cmp, s0, 234.0);
 
   /* *INDENT-OFF* */
-  pool_foreach (s0, cmp->sessions[0],
-  ({
+  pool_foreach (s0, cmp->sessions[0])
+   {
     s = format (s, "%U", format_ct6_session, cmp, 0, s0, 1 /* verbose */);
-  }));
+  }
   /* *INDENT-ON* */
 
   vlib_cli_output (vm, "\nEnd state: first index %d last index %d\n%v",
index 575f8b8..e15b6cb 100644 (file)
@@ -867,13 +867,13 @@ dhcp_client_process (vlib_main_t * vm,
            {
               /* *INDENT-OFF* */
               next_expire_time = 1e70;
-              pool_foreach (c, dcm->clients,
-              ({
+              pool_foreach (c, dcm->clients)
+               {
                 this_next_expire_time = dhcp_client_sm
                   (now, timeout, (uword) (c - dcm->clients));
                 next_expire_time = this_next_expire_time < next_expire_time ?
                   this_next_expire_time : next_expire_time;
-              }));
+              }
               if (next_expire_time > now)
                 timeout = next_expire_time - now;
               else
@@ -939,12 +939,12 @@ show_dhcp_client_command_fn (vlib_main_t * vm,
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (c, dcm->clients,
-  ({
+  pool_foreach (c, dcm->clients)
+   {
     vlib_cli_output (vm, "%U",
                      format_dhcp_client, dcm,
                      c, verbose);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -1114,11 +1114,11 @@ dhcp_client_walk (dhcp_client_walk_cb_t cb, void *ctx)
   dhcp_client_t *c;
 
   /* *INDENT-OFF* */
-  pool_foreach (c, dcm->clients,
-  ({
+  pool_foreach (c, dcm->clients)
+   {
     if (!cb(c, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 
 }
index 2acd2f6..da6f61a 100644 (file)
@@ -62,12 +62,12 @@ generate_client_duid (void)
   ethernet_interface_t *eth_if = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (hi, im->hw_interfaces,
-  ({
+  pool_foreach (hi, im->hw_interfaces)
+   {
     eth_if = ethernet_get_interface (&ethernet_main, hi->hw_if_index);
     if (eth_if)
       break;
-  }));
+  }
   /* *INDENT-ON* */
 
   if (eth_if)
index 975a7e0..edc6f49 100644 (file)
@@ -273,8 +273,8 @@ dhcp6_reply_event_handler (vl_api_dhcp6_reply_event_t * mp)
 
       u8 address_already_present = 0;
       /* *INDENT-OFF* */
-      pool_foreach (address_info, rm->address_pool,
-      ({
+      pool_foreach (address_info, rm->address_pool)
+       {
         if (address_info->sw_if_index != sw_if_index)
           ;
         else if (!ip6_addresses_equal (&address_info->address, address))
@@ -284,7 +284,7 @@ dhcp6_reply_event_handler (vl_api_dhcp6_reply_event_t * mp)
             address_already_present = 1;
             goto address_pool_foreach_out;
           }
-      }));
+      }
       /* *INDENT-ON* */
     address_pool_foreach_out:
 
@@ -346,15 +346,15 @@ create_address_list (u32 sw_if_index)
   address_info_t *address_info, *address_list = 0;;
 
   /* *INDENT-OFF* */
-  pool_foreach (address_info, rm->address_pool,
-  ({
+  pool_foreach (address_info, rm->address_pool)
+   {
     if (address_info->sw_if_index == sw_if_index)
       {
         u32 pos = vec_len (address_list);
         vec_validate (address_list, pos);
         clib_memcpy (&address_list[pos], address_info, sizeof (*address_info));
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return address_list;
@@ -395,8 +395,8 @@ dhcp6_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
        {
          due_time = current_time + 1e9;
           /* *INDENT-OFF* */
-          pool_foreach (address_info, rm->address_pool,
-          ({
+          pool_foreach (address_info, rm->address_pool)
+           {
             if (address_info->due_time > current_time)
               {
                 if (address_info->due_time < due_time)
@@ -423,7 +423,7 @@ dhcp6_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
                                                     0, 1);
                   }
               }
-          }));
+          }
           /* *INDENT-ON* */
          for (i = 0; i < vec_len (rm->client_state_by_sw_if_index); i++)
            {
@@ -526,15 +526,15 @@ dhcp6_addresses_show_command_function (vlib_main_t * vm,
   f64 current_time = vlib_time_now (vm);
 
   /* *INDENT-OFF* */
-  pool_foreach (address_info, dm->address_pool,
-  ({
+  pool_foreach (address_info, dm->address_pool)
+   {
     vlib_cli_output (vm, "address: %U, "
                      "preferred lifetime: %u, valid lifetime: %u "
                      "(%f remaining)",
                      format_ip6_address, &address_info->address,
                      address_info->preferred_lt, address_info->valid_lt,
                      address_info->due_time - current_time);
-  }));
+  }
   /* *INDENT-ON* */
 
   return error;
@@ -661,8 +661,8 @@ dhcp6_client_enable_disable (u32 sw_if_index, u8 enable)
        }
 
       /* *INDENT-OFF* */
-      pool_foreach (address_info, rm->address_pool,
-      ({
+      pool_foreach (address_info, rm->address_pool)
+       {
         if (address_info->sw_if_index == sw_if_index)
           {
             ASSERT (sw_if_index < vec_len (rm->client_state_by_sw_if_index) &&
@@ -680,7 +680,7 @@ dhcp6_client_enable_disable (u32 sw_if_index, u8 enable)
                 clib_warning ("Failed to delete interface address");
             pool_put (rm->address_pool, address_info);
           }
-      }));
+      }
       /* *INDENT-ON* */
     }
 
index 2328dfd..f6d30fa 100644 (file)
@@ -372,10 +372,10 @@ dhcp6_pd_reply_event_handler (vl_api_dhcp6_pd_reply_event_t * mp)
    * so collect active indices.
    */
   /* *INDENT-OFF* */
-  pool_foreach (prefix_info, pm->prefix_pool,
-  ({
+  pool_foreach (prefix_info, pm->prefix_pool)
+   {
     vec_add1 (pm->indices, prefix_info - pm->prefix_pool);
-  }));
+  }
   /* *INDENT-ON* */
 
   for (i = 0; i < n_prefixes; i++)
@@ -481,8 +481,8 @@ create_prefix_list (u32 sw_if_index)
   prefix_info_t *prefix_info, *prefix_list = 0;;
 
   /* *INDENT-OFF* */
-  pool_foreach (prefix_info, pm->prefix_pool,
-  ({
+  pool_foreach (prefix_info, pm->prefix_pool)
+   {
     if (is_dhcpv6_pd_prefix (prefix_info) &&
         prefix_info->opaque_data == sw_if_index)
       {
@@ -490,7 +490,7 @@ create_prefix_list (u32 sw_if_index)
         vec_validate (prefix_list, pos);
         clib_memcpy (&prefix_list[pos], prefix_info, sizeof (*prefix_info));
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return prefix_list;
@@ -531,8 +531,8 @@ dhcp6_pd_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
        {
          due_time = current_time + 1e9;
           /* *INDENT-OFF* */
-          pool_foreach (prefix_info, pm->prefix_pool,
-          ({
+          pool_foreach (prefix_info, pm->prefix_pool)
+           {
             if (is_dhcpv6_pd_prefix (prefix_info))
               {
                 if (prefix_info->due_time > current_time)
@@ -558,7 +558,7 @@ dhcp6_pd_client_cp_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
                       }
                   }
               }
-         }));
+         }
          /* *INDENT-ON* */
          for (i = 0; i < vec_len (rm->client_state_by_sw_if_index); i++)
            {
@@ -788,12 +788,12 @@ cp_ip6_address_find_new_active_prefix (u32 prefix_group_index,
   prefix_info_t *prefix_info;
 
   /* *INDENT-OFF* */
-  pool_foreach (prefix_info, pm->prefix_pool,
-  ({
+  pool_foreach (prefix_info, pm->prefix_pool)
+   {
     if (prefix_info->prefix_group_index == prefix_group_index &&
         prefix_info - pm->prefix_pool != ignore_prefix_index)
         return prefix_info - pm->prefix_pool;
-  }));
+  }
   /* *INDENT-ON* */
   return ~0;
 }
@@ -1139,8 +1139,8 @@ cp_ip6_prefixes_show_command_function (vlib_main_t * vm,
   f64 current_time = vlib_time_now (vm);
 
   /* *INDENT-OFF* */
-  pool_foreach (prefix_info, pm->prefix_pool,
-  ({
+  pool_foreach (prefix_info, pm->prefix_pool)
+   {
     prefix_group =
       pm->prefix_group_name_by_index[prefix_info->prefix_group_index];
     vlib_cli_output (vm, "opaque_data: %lu, prefix: %U/%d, prefix group: %s, "
@@ -1151,7 +1151,7 @@ cp_ip6_prefixes_show_command_function (vlib_main_t * vm,
                      prefix_group,
                      prefix_info->preferred_lt, prefix_info->valid_lt,
                      prefix_info->due_time - current_time);
-  }));
+  }
   /* *INDENT-ON* */
 
   return error;
@@ -1305,8 +1305,8 @@ dhcp6_pd_client_enable_disable (u32 sw_if_index,
       vec_validate (prefix_list, 0);
 
       /* *INDENT-OFF* */
-      pool_foreach (prefix_info, pm->prefix_pool,
-      ({
+      pool_foreach (prefix_info, pm->prefix_pool)
+       {
         if (is_dhcpv6_pd_prefix (prefix_info) &&
             prefix_info->opaque_data == sw_if_index)
           {
@@ -1324,7 +1324,7 @@ dhcp6_pd_client_enable_disable (u32 sw_if_index,
             set_is_dhcpv6_pd_prefix (prefix_info, 0);
             pool_put (pm->prefix_pool, prefix_info);
           }
-      }));
+      }
       /* *INDENT-ON* */
 
       vec_free (prefix_list);
index c5c7a82..2b8d41a 100644 (file)
@@ -700,8 +700,8 @@ dhcp6_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
 
              vpe_client_registration_t *reg;
               /* *INDENT-OFF* */
-              pool_foreach(reg, vpe_api_main.dhcp6_reply_events_registrations,
-              ({
+              pool_foreach (reg, vpe_api_main.dhcp6_reply_events_registrations)
+               {
                 vl_api_registration_t *vl_reg;
                 vl_reg =
                   vl_api_client_index_to_registration (reg->client_index);
@@ -715,7 +715,7 @@ dhcp6_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
                     msg->pid = reg->client_pid;
                     vl_api_send_msg (vl_reg, (u8 *) msg);
                   }
-              }));
+              }
               /* *INDENT-ON* */
 
              clib_mem_free (event);
@@ -812,8 +812,8 @@ dhcp6_pd_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
 
              vpe_client_registration_t *reg;
               /* *INDENT-OFF* */
-              pool_foreach(reg, vpe_api_main.dhcp6_pd_reply_events_registrations,
-              ({
+              pool_foreach (reg, vpe_api_main.dhcp6_pd_reply_events_registrations)
+               {
                 vl_api_registration_t *vl_reg;
                 vl_reg =
                   vl_api_client_index_to_registration (reg->client_index);
@@ -827,7 +827,7 @@ dhcp6_pd_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
                     msg->pid = reg->client_pid;
                     vl_api_send_msg (vl_reg, (u8 *) msg);
                   }
-              }));
+              }
               /* *INDENT-ON* */
 
              clib_mem_free (event);
index d045ca0..b4830e4 100644 (file)
@@ -52,11 +52,11 @@ dns_cache_clear (dns_main_t * dm)
   dns_cache_lock (dm, 1);
 
   /* *INDENT-OFF* */
-  pool_foreach (ep, dm->entries,
-  ({
+  pool_foreach (ep, dm->entries)
+   {
     vec_free (ep->name);
     vec_free (ep->pending_requests);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (dm->entries);
@@ -2157,8 +2157,8 @@ format_dns_cache (u8 * s, va_list * args)
   if (verbose > 0)
     {
       /* *INDENT-OFF* */
-      pool_foreach (ep, dm->entries,
-      ({
+      pool_foreach (ep, dm->entries)
+       {
         if (ep->flags & DNS_CACHE_ENTRY_FLAG_VALID)
           {
             ASSERT (ep->dns_response);
@@ -2194,7 +2194,7 @@ format_dns_cache (u8 * s, va_list * args)
                         verbose);
           }
         vec_add1 (s, '\n');
-      }));
+      }
       /* *INDENT-ON* */
     }
 
index 51adbc2..bd8d435 100644 (file)
@@ -1429,7 +1429,7 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
       devconf->x = conf->default_devconf.x ;
 
   /* *INDENT-OFF* */
-  pool_foreach (devconf, conf->dev_confs, ({
+  pool_foreach (devconf, conf->dev_confs)  {
 
     /* default per-device config items */
     foreach_dpdk_device_config_item
@@ -1471,7 +1471,7 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
          tmp = format (0, "%U%c", format_vlib_pci_addr, &devconf->pci_addr, 0);
          vec_add1 (conf->eal_init_args, tmp);
     }
-  }));
+  }
   /* *INDENT-ON* */
 
 #undef _
index 3df877a..37abcfc 100644 (file)
@@ -791,12 +791,12 @@ flowprobe_show_table_fn (vlib_main_t * vm,
   for (i = 0; i < vec_len (fm->pool_per_worker); i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (e, fm->pool_per_worker[i], (
+      pool_foreach (e, fm->pool_per_worker[i])
        {
          vlib_cli_output (vm, "%U",
                           format_flowprobe_entry,
                           e);
-       }));
+       }
       /* *INDENT-ON* */
 
     }
index f2a56d7..279169a 100644 (file)
@@ -364,11 +364,11 @@ gbp_bridge_domain_walk (gbp_bridge_domain_cb_t cb, void *ctx)
   gbp_bridge_domain_t *gbpe;
 
   /* *INDENT-OFF* */
-  pool_foreach(gbpe, gbp_bridge_domain_pool,
+  pool_foreach (gbpe, gbp_bridge_domain_pool)
   {
     if (!cb(gbpe, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
index e12b331..dd433f2 100644 (file)
@@ -567,11 +567,11 @@ gbp_contract_walk (gbp_contract_cb_t cb, void *ctx)
   gbp_contract_t *gc;
 
   /* *INDENT-OFF* */
-  pool_foreach(gc, gbp_contract_pool,
-  ({
+  pool_foreach (gc, gbp_contract_pool)
+   {
     if (!cb(gc, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -710,8 +710,8 @@ gbp_contract_show (vlib_main_t * vm,
   vlib_cli_output (vm, "Contracts:");
 
   /* *INDENT-OFF* */
-  pool_foreach (gc, gbp_contract_pool,
-  ({
+  pool_foreach (gc, gbp_contract_pool)
+   {
     gci = gc - gbp_contract_pool;
 
     if (SCLASS_INVALID != src && SCLASS_INVALID != dst)
@@ -732,7 +732,7 @@ gbp_contract_show (vlib_main_t * vm,
       }
     else
       vlib_cli_output (vm, "  %U", format_gbp_contract, gci);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (NULL);
index 9cc69d0..b0cf64c 100644 (file)
@@ -1063,11 +1063,11 @@ gbp_endpoint_walk (gbp_endpoint_cb_t cb, void *ctx)
   u32 index;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(index, gbp_endpoint_pool,
+  pool_foreach_index (index, gbp_endpoint_pool)
   {
     if (!cb(index, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
index 92bad37..b904437 100644 (file)
@@ -241,11 +241,11 @@ gbp_endpoint_group_walk (gbp_endpoint_group_cb_t cb, void *ctx)
   gbp_endpoint_group_t *gbpe;
 
   /* *INDENT-OFF* */
-  pool_foreach(gbpe, gbp_endpoint_group_pool,
+  pool_foreach (gbpe, gbp_endpoint_group_pool)
   {
     if (!cb(gbpe, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
index e18bbe9..c550666 100644 (file)
@@ -233,11 +233,11 @@ gbp_ext_itf_walk (gbp_ext_itf_cb_t cb, void *ctx)
   gbp_ext_itf_t *ge;
 
   /* *INDENT-OFF* */
-  pool_foreach(ge, gbp_ext_itf_pool,
+  pool_foreach (ge, gbp_ext_itf_pool)
   {
     if (!cb(ge, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
index 6a4a197..0c8f6a4 100644 (file)
@@ -541,10 +541,10 @@ gbp_itf_show (vlib_main_t * vm,
   vlib_cli_output (vm, "Interfaces:");
 
   /* *INDENT-OFF* */
-  pool_foreach_index (gii, gbp_itf_pool,
-  ({
+  pool_foreach_index (gii, gbp_itf_pool)
+   {
     vlib_cli_output (vm, "  [%d] %U", gii, format_gbp_itf, gii);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (NULL);
index 2b45d48..8d56f11 100644 (file)
@@ -227,11 +227,11 @@ gbp_recirc_walk (gbp_recirc_cb_t cb, void *ctx)
   gbp_recirc_t *ge;
 
   /* *INDENT-OFF* */
-  pool_foreach(ge, gbp_recirc_pool,
+  pool_foreach (ge, gbp_recirc_pool)
   {
     if (!cb(ge, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
index 99c6e16..6cc595d 100644 (file)
@@ -290,11 +290,11 @@ gbp_route_domain_walk (gbp_route_domain_cb_t cb, void *ctx)
   gbp_route_domain_t *gbpe;
 
   /* *INDENT-OFF* */
-  pool_foreach(gbpe, gbp_route_domain_pool,
+  pool_foreach (gbpe, gbp_route_domain_pool)
   {
     if (!cb(gbpe, ctx))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
index 2ef3fcf..8d3b571 100644 (file)
@@ -424,8 +424,8 @@ gbp_subnet_walk (gbp_subnet_cb_t cb, void *ctx)
   sw_if_index = ~0;
 
   /* *INDENT-OFF* */
-  pool_foreach (gs, gbp_subnet_pool,
-  ({
+  pool_foreach (gs, gbp_subnet_pool)
+   {
     grd = gbp_route_domain_get(gs->gs_rd);
 
     switch (gs->gs_type)
@@ -447,7 +447,7 @@ gbp_subnet_walk (gbp_subnet_cb_t cb, void *ctx)
     if (WALK_STOP == cb (grd->grd_id, &gs->gs_key->gsk_pfx,
                          gs->gs_type, sw_if_index, sclass, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -549,11 +549,11 @@ gbp_subnet_show (vlib_main_t * vm,
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach_index(gsi, gbp_subnet_pool,
-      ({
+      pool_foreach_index (gsi, gbp_subnet_pool)
+       {
         vlib_cli_output (vm, "%U", format_gbp_subnet, gsi,
                          GBP_SUBNET_SHOW_BRIEF);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
index 643089e..d3da2b5 100644 (file)
@@ -306,11 +306,11 @@ gbp_vxlan_walk (gbp_vxlan_cb_t cb, void *ctx)
   gbp_vxlan_tunnel_t *gt;
 
   /* *INDENT-OFF* */
-  pool_foreach (gt, gbp_vxlan_tunnel_pool,
-    ({
+  pool_foreach (gt, gbp_vxlan_tunnel_pool)
+     {
       if (WALK_CONTINUE != cb(gt, ctx))
         break;
-    }));
+    }
   /* *INDENT-ON* */
 }
 
index 2c6f1ff..62502ef 100644 (file)
@@ -903,12 +903,10 @@ show_geneve_tunnel_command_fn (vlib_main_t * vm,
   if (pool_elts (vxm->tunnels) == 0)
     vlib_cli_output (vm, "No geneve tunnels configured...");
 
-  pool_foreach (t, vxm->tunnels, (
-                                  {
-                                  vlib_cli_output (vm, "%U",
-                                                   format_geneve_tunnel, t);
-                                  }
-               ));
+  pool_foreach (t, vxm->tunnels)
+  {
+    vlib_cli_output (vm, "%U", format_geneve_tunnel, t);
+  }
 
   return 0;
 }
index f6b9afd..d35a1bf 100644 (file)
@@ -202,10 +202,10 @@ static void vl_api_geneve_tunnel_dump_t_handler
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, vxm->tunnels,
-      ({
+      pool_foreach (t, vxm->tunnels)
+       {
         send_geneve_tunnel_details(t, reg, mp->context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
index 65c3053..531e45a 100644 (file)
@@ -914,12 +914,10 @@ show_gtpu_tunnel_command_fn (vlib_main_t * vm,
   if (pool_elts (gtm->tunnels) == 0)
     vlib_cli_output (vm, "No gtpu tunnels configured...");
 
-  pool_foreach (t, gtm->tunnels, (
-                                  {
-                                  vlib_cli_output (vm, "%U",
-                                                   format_gtpu_tunnel, t);
-                                  }
-               ));
+  pool_foreach (t, gtm->tunnels)
+  {
+    vlib_cli_output (vm, "%U", format_gtpu_tunnel, t);
+  }
 
   return 0;
 }
index 1100a7f..77432ba 100644 (file)
@@ -239,10 +239,10 @@ vl_api_gtpu_tunnel_dump_t_handler (vl_api_gtpu_tunnel_dump_t * mp)
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, gtm->tunnels,
-      ({
+      pool_foreach (t, gtm->tunnels)
+       {
         send_gtpu_tunnel_details(t, reg, mp->context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
index d6f0b28..03a3577 100644 (file)
@@ -263,11 +263,11 @@ echo_free_sessions (echo_main_t * em)
   u32 *session_indexes = 0, *session_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (s, em->sessions,
-  ({
+  pool_foreach (s, em->sessions)
+   {
     if (s->session_state == ECHO_SESSION_STATE_CLOSED)
-      vec_add1 (session_indexes, s->session_index);}
-  ));
+      vec_add1 (session_indexes, s->session_index);
+   }
   /* *INDENT-ON* */
   vec_foreach (session_index, session_indexes)
   {
index 95a468c..c67b35f 100644 (file)
@@ -240,8 +240,8 @@ quic_echo_initiate_qsession_close_no_stream (echo_main_t * em)
   echo_session_t *s;
 
   /* *INDENT-OFF* */
-  pool_foreach (s, em->sessions,
-  ({
+  pool_foreach (s, em->sessions)
+   {
     if (s->session_type == ECHO_SESSION_TYPE_QUIC)
       {
         if (eqm->send_quic_disconnects == ECHO_CLOSE_F_ACTIVE)
@@ -260,7 +260,7 @@ quic_echo_initiate_qsession_close_no_stream (echo_main_t * em)
         else
           ECHO_LOG (2,"%U: PASSIVE close", echo_format_session, s);
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index b61243a..0ae6741 100644 (file)
@@ -1610,10 +1610,10 @@ http_show_static_server_command_fn (vlib_main_t * vm,
       for (i = 0; i < vec_len (hsm->sessions); i++)
        {
           /* *INDENT-OFF* */
-         pool_foreach (hs, hsm->sessions[i],
-          ({
+         pool_foreach (hs, hsm->sessions[i])
+           {
             vec_add1 (session_indices, hs - hsm->sessions[i]);
-          }));
+          }
           /* *INDENT-ON* */
 
          for (j = 0; j < vec_len (session_indices); j++)
index a298ff1..72c1b03 100644 (file)
@@ -182,10 +182,10 @@ vl_api_igmp_dump_t_handler (vl_api_igmp_dump_t * mp)
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (config, im->configs,
-        ({
+      pool_foreach (config, im->configs)
+         {
           igmp_config_dump(im, rp, mp->context, config);
-        }));
+        }
       /* *INDENT-ON* */
     }
   else
@@ -403,12 +403,12 @@ igmp_event (igmp_filter_mode_t filter,
 
 
   /* *INDENT-OFF* */
-  pool_foreach (api_client, im->api_clients,
-    ({
+  pool_foreach (api_client, im->api_clients)
+     {
       rp = vl_api_client_index_to_registration (api_client->client_index);
       if (rp)
         send_igmp_event (rp, filter, sw_if_index, saddr, gaddr);
-    }));
+    }
   /* *INDENT-ON* */
 }
 
index 5eceb68..f84cdaf 100644 (file)
@@ -356,10 +356,10 @@ igmp_show_command_fn (vlib_main_t * vm, unformat_input_t * input,
   igmp_config_t *config;
 
   /* *INDENT-OFF* */
-  pool_foreach (config, im->configs,
-    ({
+  pool_foreach (config, im->configs)
+     {
       vlib_cli_output (vm, "%U", format_igmp_config, config);
-    }));
+    }
   /* *INDENT-ON* */
 
   return error;
index 745943b..258087f 100644 (file)
@@ -1070,14 +1070,14 @@ ikev2_initial_contact_cleanup_internal (ikev2_main_per_thread_data_t * ptd,
 
   /* find old IKE SAs with the same authenticated identity */
   /* *INDENT-OFF* */
-  pool_foreach (tmp, ptd->sas, ({
+  pool_foreach (tmp, ptd->sas)  {
     if (!ikev2_is_id_equal (&tmp->i_id, &sa->i_id)
         || !ikev2_is_id_equal(&tmp->r_id, &sa->r_id))
       continue;
 
     if (sa->rspi != tmp->rspi)
       vec_add1(delete, tmp - ptd->sas);
-  }));
+  }
   /* *INDENT-ON* */
 
   for (i = 0; i < vec_len (delete); i++)
@@ -1564,7 +1564,7 @@ ikev2_sa_match_ts (ikev2_sa_t * sa)
   ikev2_id_t *id_rem, *id_loc;
 
   /* *INDENT-OFF* */
-  pool_foreach (p, km->profiles, ({
+  pool_foreach (p, km->profiles)  {
 
     if (sa->is_initiator)
       {
@@ -1607,7 +1607,7 @@ ikev2_sa_match_ts (ikev2_sa_t * sa)
       }
 
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   if (tsi && tsr)
@@ -1667,7 +1667,7 @@ ikev2_sa_auth (ikev2_sa_t * sa)
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (p, km->profiles, ({
+  pool_foreach (p, km->profiles)  {
 
     /* check id */
     if (!ikev2_is_id_equal (&p->rem_id, id_rem)
@@ -1707,7 +1707,7 @@ ikev2_sa_auth (ikev2_sa_t * sa)
 
     vec_free(auth);
     vec_free(psk);
-  }));
+  }
   /* *INDENT-ON* */
 
   if (sel_p)
@@ -2679,11 +2679,11 @@ ikev2_retransmit_sa_init (ike_header_t * ike, ip_address_t iaddr,
   ikev2_main_per_thread_data_t *ptd = ikev2_get_per_thread_data ();
 
   /* *INDENT-OFF* */
-  pool_foreach (sa, ptd->sas, ({
+  pool_foreach (sa, ptd->sas)  {
     res = ikev2_retransmit_sa_init_one (sa, ike, iaddr, raddr, rlen);
     if (res)
       return res;
-  }));
+  }
   /* *INDENT-ON* */
 
   /* req is not retransmit */
@@ -3750,10 +3750,10 @@ ikev2_cleanup_profile_sessions (ikev2_main_t * km, ikev2_profile_t * p)
   u32 *del_sai = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach(sa, km->sais, ({
+  pool_foreach (sa, km->sais)  {
     if (pi == sa->profile_index)
       vec_add1 (del_sai, sa - km->sais);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (sai, del_sai)
@@ -3768,10 +3768,10 @@ ikev2_cleanup_profile_sessions (ikev2_main_t * km, ikev2_profile_t * p)
   vec_foreach (tkm, km->per_thread_data)
   {
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       if (sa->profile_index != ~0 && pi == sa->profile_index)
         vec_add1 (del_sai, sa - tkm->sas);
-    }));
+    }
     /* *INDENT-ON* */
 
     vec_foreach (sai, del_sai)
@@ -4403,14 +4403,14 @@ ikev2_initiate_delete_child_sa (vlib_main_t * vm, u32 ispi)
     if (fchild)
       break;
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       fchild = ikev2_sa_get_child(sa, ispi, IKEV2_PROTOCOL_ESP, 1);
       if (fchild)
         {
           fsa = sa;
           break;
         }
-    }));
+    }
     /* *INDENT-ON* */
   }
 
@@ -4443,14 +4443,14 @@ ikev2_initiate_delete_ike_sa (vlib_main_t * vm, u64 ispi)
     if (fsa)
       break;
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       if (sa->ispi == ispi)
         {
           fsa = sa;
           ftkm = tkm;
           break;
         }
-    }));
+    }
     /* *INDENT-ON* */
   }
 
@@ -4526,14 +4526,14 @@ ikev2_initiate_rekey_child_sa (vlib_main_t * vm, u32 ispi)
     if (fchild)
       break;
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       fchild = ikev2_sa_get_child(sa, ispi, IKEV2_PROTOCOL_ESP, 1);
       if (fchild)
         {
           fsa = sa;
           break;
         }
-    }));
+    }
     /* *INDENT-ON* */
   }
 
@@ -4568,10 +4568,10 @@ ikev2_sa_del (ikev2_profile_t * p, u32 sw_if_index)
   vec_foreach (tkm, km->per_thread_data)
   {
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       if (ikev2_sa_sw_if_match (sa, sw_if_index))
         vec_add1 (sa_vec, sa);
-    }));
+    }
     /* *INDENT-ON* */
 
     vec_foreach (sap, sa_vec)
@@ -4583,10 +4583,10 @@ ikev2_sa_del (ikev2_profile_t * p, u32 sw_if_index)
   vec_free (sa_vec);
 
   /* *INDENT-OFF* */
-  pool_foreach (sa, km->sais, ({
+  pool_foreach (sa, km->sais)  {
     if (ikev2_sa_sw_if_match (sa, sw_if_index))
       vec_add1 (ispi_vec, sa->ispi);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (ispi, ispi_vec)
@@ -4607,10 +4607,10 @@ ikev2_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add)
     return 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (p, km->profiles, ({
+  pool_foreach (p, km->profiles)  {
     if (p->responder.sw_if_index == sw_if_index)
       ikev2_sa_del (p, sw_if_index);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -4839,14 +4839,14 @@ ikev2_mngr_process_ipsec_sa (ipsec_sa_t * ipsec_sa)
     if (fchild)
       break;
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       fchild = ikev2_sa_get_child(sa, ipsec_sa->spi, IKEV2_PROTOCOL_ESP, 1);
       if (fchild)
         {
           fsa = sa;
           break;
         }
-    }));
+    }
     /* *INDENT-ON* */
   }
   vlib_get_combined_counter (&ipsec_sa_counters,
@@ -5029,7 +5029,7 @@ ikev2_mngr_process_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
        u32 *to_be_deleted = 0;
 
         /* *INDENT-OFF* */
-        pool_foreach (sa, tkm->sas, ({
+        pool_foreach (sa, tkm->sas)  {
           ikev2_child_sa_t *c;
           u8 del_old_ids = 0;
 
@@ -5049,7 +5049,7 @@ ikev2_mngr_process_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
 
           if (!km->dpd_disabled && ikev2_mngr_process_responder_sas (sa))
             vec_add1 (to_be_deleted, sa - tkm->sas);
-        }));
+        }
         /* *INDENT-ON* */
 
        vec_foreach (sai, to_be_deleted)
@@ -5085,9 +5085,9 @@ ikev2_mngr_process_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
       /* process ipsec sas */
       ipsec_sa_t *sa;
       /* *INDENT-OFF* */
-      pool_foreach (sa, im->sad, ({
+      pool_foreach (sa, im->sad)  {
         ikev2_mngr_process_ipsec_sa(sa);
-      }));
+      }
       /* *INDENT-ON* */
 
       ikev2_process_pending_sa_init (km);
index dd4c094..00d7114 100644 (file)
@@ -187,10 +187,10 @@ vl_api_ikev2_profile_dump_t_handler (vl_api_ikev2_profile_dump_t * mp)
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (profile, im->profiles,
-  ({
+  pool_foreach (profile, im->profiles)
+   {
     send_profile (profile, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -268,12 +268,12 @@ vl_api_ikev2_sa_dump_t_handler (vl_api_ikev2_sa_dump_t * mp)
   vec_foreach (tkm, km->per_thread_data)
   {
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas,
-    ({
+    pool_foreach (sa, tkm->sas)
+     {
       u32 api_sa_index = ikev2_encode_sa_index (sa - tkm->sas,
                                               tkm - km->per_thread_data);
       send_sa (sa, mp, api_sa_index);
-    }));
+    }
     /* *INDENT-ON* */
   }
 }
index 72f82b4..1bb2dd9 100644 (file)
@@ -219,7 +219,7 @@ show_ikev2_sa_command_fn (vlib_main_t * vm,
   vec_foreach (tkm, km->per_thread_data)
   {
     /* *INDENT-OFF* */
-    pool_foreach (sa, tkm->sas, ({
+    pool_foreach (sa, tkm->sas)  {
       if (show_one)
         {
           if (sa->rspi == rspi)
@@ -230,7 +230,7 @@ show_ikev2_sa_command_fn (vlib_main_t * vm,
         }
       else
         s = format (s, "%U\n", format_ikev2_sa, sa, details);
-    }));
+    }
     /* *INDENT-ON* */
   }
 
@@ -562,7 +562,7 @@ show_ikev2_profile_command_fn (vlib_main_t * vm,
   ikev2_profile_t *p;
 
   /* *INDENT-OFF* */
-  pool_foreach (p, km->profiles, ({
+  pool_foreach (p, km->profiles)  {
     vlib_cli_output(vm, "profile %v", p->name);
 
     if (p->auth.data)
@@ -652,7 +652,7 @@ show_ikev2_profile_command_fn (vlib_main_t * vm,
 
     vlib_cli_output(vm, "  lifetime %d jitter %d handover %d maxdata %d",
                     p->lifetime, p->lifetime_jitter, p->handover, p->lifetime_maxdata);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
index 162d417..366abc9 100644 (file)
@@ -1070,10 +1070,10 @@ ila_show_entries_command_fn (vlib_main_t * vm,
   ila_entry_t *e;
 
   vlib_cli_output (vm, "  %U\n", format_ila_entry, vnm, NULL);
-  pool_foreach (e, ilm->entries,
-    ({
+  pool_foreach (e, ilm->entries)
+     {
       vlib_cli_output (vm, "  %U\n", format_ila_entry, vnm, e);
-    }));
+    }
 
   return NULL;
 }
index 74b50c9..d9f7029 100644 (file)
@@ -253,12 +253,10 @@ ioam_cache_table_print (vlib_main_t * vm, u8 verbose)
   int no_of_threads = vec_len (vlib_worker_threads);
   int i;
 
-  pool_foreach (entry, cm->ioam_rewrite_pool, (
-                                               {
-                                               vlib_cli_output (vm, "%U",
-                                                                format_ioam_cache_entry,
-                                                                entry);
-                                               }));
+  pool_foreach (entry, cm->ioam_rewrite_pool)
+  {
+    vlib_cli_output (vm, "%U", format_ioam_cache_entry, entry);
+  }
 
   if (cm->ts_stats)
     for (i = 0; i < no_of_threads; i++)
@@ -269,16 +267,11 @@ ioam_cache_table_print (vlib_main_t * vm, u8 verbose)
 
        if (verbose == 1)
          vlib_worker_thread_barrier_sync (vm);
-       pool_foreach (ts_entry, cm->ioam_ts_pool[i], (
-                                                      {
-                                                      vlib_cli_output (vm,
-                                                                       "%U",
-                                                                       format_ioam_cache_ts_entry,
-                                                                       ts_entry,
-                                                                       (u32)
-                                                                       i);
-                                                      }
-                     ));
+       pool_foreach (ts_entry, cm->ioam_ts_pool[i])
+       {
+         vlib_cli_output (vm, "%U", format_ioam_cache_ts_entry, ts_entry,
+                          (u32) i);
+       }
        vlib_worker_thread_barrier_release (vm);
       }
 
index dc4ae00..b85172e 100644 (file)
@@ -471,10 +471,10 @@ ioam_cache_table_destroy (vlib_main_t * vm)
   ioam_cache_entry_t *entry = 0;
   /* free pool and hash table */
   clib_bihash_free_8_8 (&cm->ioam_rewrite_cache_table);
-  pool_foreach (entry, cm->ioam_rewrite_pool, (
-                                               {
-                                               ioam_cache_entry_free (entry);
-                                               }));
+  pool_foreach (entry, cm->ioam_rewrite_pool)
+  {
+    ioam_cache_entry_free (entry);
+  }
   pool_free (cm->ioam_rewrite_pool);
   cm->ioam_rewrite_pool = 0;
   vec_free (cm->sr_rewrite_template);
@@ -610,13 +610,10 @@ ioam_cache_ts_table_destroy (vlib_main_t * vm)
   /* free pool and hash table */
   for (i = 0; i < no_of_threads; i++)
     {
-      pool_foreach (entry, cm->ioam_ts_pool[i], (
-                                                 {
-                                                 ioam_cache_ts_entry_free (i,
-                                                                           entry,
-                                                                           cm->error_node_index);
-                                                 }
-                   ));
+      pool_foreach (entry, cm->ioam_ts_pool[i])
+      {
+       ioam_cache_ts_entry_free (i, entry, cm->error_node_index);
+      }
       pool_free (cm->ioam_ts_pool[i]);
       cm->ioam_ts_pool = 0;
       tw_timer_wheel_free_16t_2w_512sl (&cm->timer_wheels[i]);
index 5a59e75..108b0c0 100644 (file)
@@ -187,11 +187,10 @@ vxlan_gpe_clear_output_feature_on_all_intfs (vlib_main_t * vm)
   vnet_main_t *vnm = vnet_get_main ();
   vnet_interface_main_t *im = &vnm->interface_main;
 
-  pool_foreach (si, im->sw_interfaces, (
-                                        {
-                                        vxlan_gpe_set_clear_output_feature_on_intf
-                                        (vm, si->sw_if_index, 0);
-                                        }));
+  pool_foreach (si, im->sw_interfaces)
+  {
+    vxlan_gpe_set_clear_output_feature_on_intf (vm, si->sw_if_index, 0);
+  }
   return;
 }
 
@@ -377,17 +376,12 @@ vxlan_gpe_refresh_output_feature_on_all_dest (void)
   i = vec_len (hm->bool_ref_by_sw_if_index);
   vec_free (hm->bool_ref_by_sw_if_index);
   vec_validate_init_empty (hm->bool_ref_by_sw_if_index, i, ~0);
-  pool_foreach (t, hm->dst_tunnels, (
-                                     {
-                                     vxlan_gpe_enable_disable_ioam_for_dest
-                                     (hm->vlib_main,
-                                      t->dst_addr,
-                                      t->outer_fib_index,
-                                      (t->fp_proto == FIB_PROTOCOL_IP4), 1
-                                      /* is_add */
-                                     );
-                                     }
-               ));
+  pool_foreach (t, hm->dst_tunnels)
+  {
+    vxlan_gpe_enable_disable_ioam_for_dest
+      (hm->vlib_main, t->dst_addr, t->outer_fib_index,
+       (t->fp_proto == FIB_PROTOCOL_IP4), 1 /* is_add */ );
+  }
   return;
 }
 
@@ -621,16 +615,14 @@ int vxlan_gpe_ioam_disable_for_dest
       return 0;
     }
 
-  pool_foreach (t, hm->dst_tunnels, (
-                                     {
-                                     vxlan_gpe_enable_disable_ioam_for_dest
-                                     (hm->vlib_main,
-                                      t->dst_addr,
-                                      t->outer_fib_index,
-                                      (t->fp_proto ==
-                                       FIB_PROTOCOL_IP4), 1 /* is_add */ );
-                                     }
-               ));
+  pool_foreach (t, hm->dst_tunnels)
+  {
+    vxlan_gpe_enable_disable_ioam_for_dest
+      (hm->vlib_main,
+       t->dst_addr,
+       t->outer_fib_index,
+       (t->fp_proto == FIB_PROTOCOL_IP4), 1 /* is_add */ );
+  }
   vxlan_gpe_clear_output_feature_on_select_intfs ();
   return (0);
 
index 242f432..08fa6d1 100644 (file)
@@ -130,10 +130,10 @@ show_l2tp_command_fn (vlib_main_t * vm,
       vlib_cli_output (vm, "L2tp session lookup on %s", keystr);
 
       /* *INDENT-OFF* */
-      pool_foreach (session, lm->sessions,
-      ({
+      pool_foreach (session, lm->sessions)
+       {
         vlib_cli_output (vm, "%U", format_l2t_session, session);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
@@ -160,8 +160,8 @@ test_counters_command_fn (vlib_main_t * vm,
   u32 thread_index = vm->thread_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (session, lm->sessions,
-  ({
+  pool_foreach (session, lm->sessions)
+   {
     session_index = session - lm->sessions;
     counter_index =
       session_index_to_counter_index (session_index,
@@ -176,7 +176,7 @@ test_counters_command_fn (vlib_main_t * vm,
                                      1/*pkt*/, 2222 /*bytes*/);
     nincr++;
 
-  }));
+  }
   /* *INDENT-ON* */
   vlib_cli_output (vm, "Incremented %d active counters\n", nincr);
 
@@ -202,8 +202,8 @@ clear_counters_command_fn (vlib_main_t * vm,
   u32 nincr = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (session, lm->sessions,
-  ({
+  pool_foreach (session, lm->sessions)
+   {
     session_index = session - lm->sessions;
     counter_index =
       session_index_to_counter_index (session_index,
@@ -211,7 +211,7 @@ clear_counters_command_fn (vlib_main_t * vm,
     vlib_zero_combined_counter (&lm->counter_main, counter_index);
     vlib_zero_combined_counter (&lm->counter_main, counter_index+1);
     nincr++;
-  }));
+  }
   /* *INDENT-ON* */
   vlib_cli_output (vm, "Cleared %d active counters\n", nincr);
 
index fb675dd..ba9d268 100644 (file)
@@ -90,10 +90,10 @@ vl_api_sw_if_l2tpv3_tunnel_dump_t_handler (vl_api_sw_if_l2tpv3_tunnel_dump_t *
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (session, lm->sessions,
-  ({
+  pool_foreach (session, lm->sessions)
+   {
     send_sw_if_l2tpv3_tunnel_details (am, reg, session, lm, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 9839278..21f3eea 100644 (file)
@@ -305,11 +305,11 @@ l3xc_walk (l3xc_walk_cb_t cb, void *ctx)
   u32 l3xci;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(l3xci, l3xc_pool,
-  ({
+  pool_foreach_index (l3xci, l3xc_pool)
+   {
     if (!cb(l3xci, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -320,10 +320,10 @@ l3xc_show_cmd (vlib_main_t * vm,
   l3xc_t *l3xc;
 
   /* *INDENT-OFF* */
-  pool_foreach(l3xc, l3xc_pool,
-  ({
+  pool_foreach (l3xc, l3xc_pool)
+   {
     vlib_cli_output(vm, "%U", format_l3xc, l3xc);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (NULL);
index 7abc6f0..fee9a5a 100644 (file)
@@ -29,7 +29,7 @@ lacp_dump_ifs (lacp_interface_details_t ** out_lacpifs)
   lacp_interface_details_t *lacpif = NULL;
 
   /* *INDENT-OFF* */
-  pool_foreach (mif, bm->neighbors,
+  pool_foreach (mif, bm->neighbors) {
     if (mif->lacp_enabled == 0)
       continue;
     vec_add2(r_lacpifs, lacpif, 1);
@@ -60,7 +60,7 @@ lacp_dump_ifs (lacp_interface_details_t ** out_lacpifs)
     lacpif->tx_state = mif->tx_state;
     lacpif->ptx_state = mif->ptx_state;
     lacpif->mux_state = mif->mux_state;
-  );
+  }
   /* *INDENT-ON* */
 
   *out_lacpifs = r_lacpifs;
@@ -295,9 +295,8 @@ show_lacp_fn (vlib_main_t * vm, unformat_input_t * input,
 
   if (vec_len (sw_if_indices) == 0)
     {
-      pool_foreach (mif, bm->neighbors,
-                   vec_add1 (sw_if_indices, mif->sw_if_index);
-       );
+      pool_foreach (mif, bm->neighbors)
+       vec_add1 (sw_if_indices, mif->sw_if_index);
     }
 
   if (details)
index 319a8f7..44a32aa 100644 (file)
@@ -143,8 +143,8 @@ lacp_periodic (vlib_main_t * vm)
   u8 actor_state, partner_state;
 
   /* *INDENT-OFF* */
-  pool_foreach (mif, bm->neighbors,
-  ({
+  pool_foreach (mif, bm->neighbors)
+   {
     if (mif->port_enabled == 0)
       continue;
 
@@ -184,7 +184,7 @@ lacp_periodic (vlib_main_t * vm)
                                        [mif->sw_if_index].partner_state,
                                        mif->partner.state);
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 60edc80..6e36a66 100644 (file)
@@ -344,7 +344,7 @@ lacp_port_is_moved (vlib_main_t * vm, member_if_t * mif)
   lacp_pdu_t *lacpdu = (lacp_pdu_t *) mif->last_rx_pkt;
 
   /* *INDENT-OFF* */
-  pool_foreach (mif2, bm->neighbors, {
+  pool_foreach (mif2, bm->neighbors) {
       {
        if ((mif != mif2) && (mif2->rx_state == LACP_RX_STATE_PORT_DISABLED) &&
            !memcmp (mif2->partner.system,
@@ -352,7 +352,7 @@ lacp_port_is_moved (vlib_main_t * vm, member_if_t * mif)
            (mif2->partner.port_number == lacpdu->partner.port_info.port_number))
          return 1;
       }
-  });
+  }
   /* *INDENT-ON* */
 
   return 0;
index 176da24..e44f815 100644 (file)
@@ -177,7 +177,7 @@ vl_api_lb_vip_dump_t_handler
   lb_vip_t *vip = 0;
 
   /* construct vip list */
-  pool_foreach(vip, lbm->vips, {
+  pool_foreach (vip, lbm->vips) {
       /* Hide placeholder VIP */
       if (vip != lbm->vips) {
         msg_size = sizeof (*rmp);
@@ -199,7 +199,7 @@ vl_api_lb_vip_dump_t_handler
 
         vl_api_send_msg (reg, (u8 *) rmp);
       }
-  });
+  }
 
 
 }
@@ -216,7 +216,7 @@ static void send_lb_as_details
   /* construct as list under this vip */
   lb_as_t *as;
 
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       /* Hide placeholder As for specific VIP */
       if (*as_index != 0) {
         as = &lbm->ass[*as_index];
@@ -237,7 +237,7 @@ static void send_lb_as_details
         vl_api_send_msg (reg, (u8 *) rmp);
         asindex++;
       }
-  });
+  }
 
 
 }
@@ -261,8 +261,8 @@ vl_api_lb_as_dump_t_handler
   dump_all = (prefix.ip6.as_u64[0] == 0) && (prefix.ip6.as_u64[1] == 0);
 
   /* *INDENT-OFF* */
-  pool_foreach(vip, lbm->vips,
-  ({
+  pool_foreach (vip, lbm->vips)
+   {
     if ( dump_all
         || ((prefix.as_u64[0] == vip->prefix.as_u64[0])
         && (prefix.as_u64[1] == vip->prefix.as_u64[1])
@@ -271,7 +271,7 @@ vl_api_lb_as_dump_t_handler
       {
         send_lb_as_details(reg, mp->context, vip);
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index ecc5e66..7b5dc5c 100644 (file)
@@ -387,11 +387,11 @@ lb_show_vips_command_fn (vlib_main_t * vm,
     verbose = 1;
 
   /* Hide placeholder VIP */
-  pool_foreach(vip, lbm->vips, {
+  pool_foreach (vip, lbm->vips) {
     if (vip != lbm->vips) {
       vlib_cli_output(vm, "%U\n", verbose?format_lb_vip_detailed:format_lb_vip, vip);
     }
-  });
+  }
 
   unformat_free (&line_input);
   return NULL;
index 21a1484..6fc7f0f 100644 (file)
@@ -255,7 +255,7 @@ u8 *format_lb_vip_detailed (u8 * s, va_list * args)
 
   lb_as_t *as;
   u32 *as_index;
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       as = &lbm->ass[*as_index];
       s = format(s, "%U    %U %u buckets   %Lu flows  dpo:%u %s\n",
                    format_white_space, indent,
@@ -264,7 +264,7 @@ u8 *format_lb_vip_detailed (u8 * s, va_list * args)
                    vlib_refcount_get(&lbm->as_refcount, as - lbm->ass),
                    as->dpo.dpoi_index,
                    (as->flags & LB_AS_FLAGS_USED)?"used":" removed");
-  });
+  }
 
   vec_free(count);
   return s;
@@ -302,7 +302,7 @@ static void lb_vip_garbage_collection(lb_vip_t *vip)
   vip->last_garbage_collection = now;
   lb_as_t *as;
   u32 *as_index;
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       as = &lbm->ass[*as_index];
       if (!(as->flags & LB_AS_FLAGS_USED) && //Not used
           clib_u32_loop_gt(now, as->last_used + LB_CONCURRENCY_TIMEOUT) &&
@@ -351,7 +351,7 @@ static void lb_vip_garbage_collection(lb_vip_t *vip)
           pool_put(vip->as_indexes, as_index);
           pool_put(lbm->ass, as);
         }
-  });
+  }
 }
 
 void lb_garbage_collection()
@@ -360,14 +360,14 @@ void lb_garbage_collection()
   lb_get_writer_lock();
   lb_vip_t *vip;
   u32 *to_be_removed_vips = 0, *i;
-  pool_foreach(vip, lbm->vips, {
+  pool_foreach (vip, lbm->vips) {
       lb_vip_garbage_collection(vip);
 
       if (!(vip->flags & LB_VIP_FLAGS_USED) &&
           (pool_elts(vip->as_indexes) == 0)) {
         vec_add1(to_be_removed_vips, vip - lbm->vips);
       }
-  });
+  }
 
   vec_foreach(i, to_be_removed_vips) {
     vip = &lbm->vips[*i];
@@ -392,13 +392,13 @@ static void lb_vip_update_new_flow_table(lb_vip_t *vip)
 
   //Check if some AS is configured or not
   i = 0;
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       as = &lbm->ass[*as_index];
       if (as->flags & LB_AS_FLAGS_USED) { //Not used anymore
         i = 1;
         goto out; //Not sure 'break' works in this macro-loop
       }
-  });
+  }
 
 out:
   if (i == 0) {
@@ -414,14 +414,14 @@ out:
   vec_alloc(sort_arr, pool_elts(vip->as_indexes));
 
   i = 0;
-  pool_foreach(as_index, vip->as_indexes, {
+  pool_foreach (as_index, vip->as_indexes) {
       as = &lbm->ass[*as_index];
       if (!(as->flags & LB_AS_FLAGS_USED)) //Not used anymore
         continue;
 
       sort_arr[i].as_index = as - lbm->ass;
       i++;
-  });
+  }
   _vec_len(sort_arr) = i;
 
   vec_sort_with_function(sort_arr, lb_pseudorand_compare);
@@ -503,7 +503,7 @@ int lb_vip_port_find_index(ip46_address_t *prefix, u8 plen,
   /* This must be called with the lock owned */
   CLIB_SPINLOCK_ASSERT_LOCKED (&lbm->writer_lock);
   ip46_prefix_normalize(prefix, plen);
-  pool_foreach(vip, lbm->vips, {
+  pool_foreach (vip, lbm->vips) {
       if ((vip->flags & LB_AS_FLAGS_USED) &&
           vip->plen == plen &&
           vip->prefix.as_u64[0] == prefix->as_u64[0] &&
@@ -522,7 +522,7 @@ int lb_vip_port_find_index(ip46_address_t *prefix, u8 plen,
               return 0;
             }
         }
-  });
+  }
   return VNET_API_ERROR_NO_SUCH_ENTRY;
 }
 
@@ -569,7 +569,7 @@ static int lb_as_find_index_vip(lb_vip_t *vip, ip46_address_t *address, u32 *as_
   CLIB_SPINLOCK_ASSERT_LOCKED (&lbm->writer_lock);
   lb_as_t *as;
   u32 *asi;
-  pool_foreach(asi, vip->as_indexes, {
+  pool_foreach (asi, vip->as_indexes) {
       as = &lbm->ass[*asi];
       if (as->vip_index == (vip - lbm->vips) &&
           as->address.as_u64[0] == address->as_u64[0] &&
@@ -578,7 +578,7 @@ static int lb_as_find_index_vip(lb_vip_t *vip, ip46_address_t *address, u32 *as_
         *as_index = as - lbm->ass;
         return 0;
       }
-  });
+  }
   return -1;
 }
 
@@ -1224,10 +1224,10 @@ int lb_vip_del(u32 vip_index)
     lb_as_t *as;
     u32 *as_index;
 
-    pool_foreach(as_index, vip->as_indexes, {
+    pool_foreach (as_index, vip->as_indexes) {
         as = &lbm->ass[*as_index];
         vec_add1(ass, as->address);
-    });
+    }
     if (vec_len(ass))
       lb_vip_del_ass_withlock(vip_index, ass, vec_len(ass), 0);
     vec_free(ass);
index 6eee74a..446a8d7 100644 (file)
@@ -581,15 +581,15 @@ vnet_lisp_adjacencies_get_by_vni (u32 vni)
   lisp_adjacency_t *adjs = 0, adj;
 
   /* *INDENT-OFF* */
-  pool_foreach(fwd, lcm->fwd_entry_pool,
-  ({
+  pool_foreach (fwd, lcm->fwd_entry_pool)
+   {
     if (gid_address_vni (&fwd->reid) != vni)
       continue;
 
     gid_address_copy (&adj.reid, &fwd->reid);
     gid_address_copy (&adj.leid, &fwd->leid);
     vec_add1 (adjs, adj);
-  }));
+  }
   /* *INDENT-ON* */
 
   return adjs;
@@ -804,8 +804,8 @@ vnet_lisp_map_cache_add_del (vnet_lisp_add_del_mapping_args_t * a,
           * TODO: Address this in a more efficient way.
           */
          /* *INDENT-OFF* */
-         pool_foreach (rmts, lcm->lcl_to_rmt_adjacencies,
-         ({
+         pool_foreach (rmts, lcm->lcl_to_rmt_adjacencies)
+          {
            vec_foreach_index (rmts_itr, rmts[0])
            {
              remote_idx = vec_elt (rmts[0], rmts_itr);
@@ -815,7 +815,7 @@ vnet_lisp_map_cache_add_del (vnet_lisp_add_del_mapping_args_t * a,
                  break;
                }
            }
-         }));
+         }
          /* *INDENT-ON* */
        }
 
@@ -1392,10 +1392,10 @@ vnet_lisp_clear_all_remote_adjacencies (void)
   vnet_lisp_add_del_locator_set_args_t _ls, *ls = &_ls;
 
   /* *INDENT-OFF* */
-  pool_foreach_index (mi, lcm->mapping_pool,
-  ({
+  pool_foreach_index (mi, lcm->mapping_pool)
+   {
     vec_add1 (map_indices, mi);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (map_indexp, map_indices)
@@ -2191,10 +2191,10 @@ lisp_cp_disable_l2_l3_ifaces (lisp_cp_main_t * lcm)
   pool_free (lcm->fwd_entry_pool);
   /* Clear state tracking rmt-lcl fwd entries */
   /* *INDENT-OFF* */
-  pool_foreach(rmts, lcm->lcl_to_rmt_adjacencies,
+  pool_foreach (rmts, lcm->lcl_to_rmt_adjacencies)
   {
     vec_free(rmts[0]);
-  });
+  }
   /* *INDENT-ON* */
   hash_free (lcm->lcl_to_rmt_adjs_by_lcl_idx);
   pool_free (lcm->lcl_to_rmt_adjacencies);
@@ -2672,7 +2672,7 @@ build_map_register_record_list (lisp_cp_main_t * lcm)
   mapping_t *recs = 0, rec, *m;
 
   /* *INDENT-OFF* */
-  pool_foreach(m, lcm->mapping_pool,
+  pool_foreach (m, lcm->mapping_pool)
   {
     /* for now build only local mappings */
     if (!m->local)
@@ -2681,7 +2681,7 @@ build_map_register_record_list (lisp_cp_main_t * lcm)
     rec = m[0];
     add_locators (lcm, &rec, m->locator_set_index, NULL);
     vec_add1 (recs, rec);
-  });
+  }
   /* *INDENT-ON* */
 
   return recs;
@@ -2902,7 +2902,7 @@ send_rloc_probes (lisp_cp_main_t * lcm)
   u32 si, rloc_probes_sent = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (e, lcm->fwd_entry_pool,
+  pool_foreach (e, lcm->fwd_entry_pool)
   {
     if (vec_len (e->locator_pairs) == 0)
       continue;
@@ -2930,7 +2930,7 @@ send_rloc_probes (lisp_cp_main_t * lcm)
                          &lp->rmt_loc);
         rloc_probes_sent++;
       }
-  });
+  }
   /* *INDENT-ON* */
 
   vlib_node_increment_counter (vlib_get_main (), lisp_cp_output_node.index,
@@ -3041,15 +3041,15 @@ _send_encapsulated_map_request (lisp_cp_main_t * lcm,
   /* if there is already a pending request remember it */
 
   /* *INDENT-OFF* */
-  pool_foreach(pmr, lcm->pending_map_requests_pool,
-  ({
+  pool_foreach (pmr, lcm->pending_map_requests_pool)
+   {
     if (!gid_address_cmp (&pmr->src, seid)
         && !gid_address_cmp (&pmr->dst, deid))
       {
         duplicate_pmr = pmr;
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (!is_resend && duplicate_pmr)
@@ -4066,10 +4066,10 @@ map_record_args_get ()
 
   /* Cleanup first */
   /* *INDENT-OFF* */
-  pool_foreach (rec, lcm->map_records_args_pool[vlib_get_thread_index()], ({
+  pool_foreach (rec, lcm->map_records_args_pool[vlib_get_thread_index()])  {
     if (rec->is_free)
       map_records_arg_free (rec);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_get (lcm->map_records_args_pool[vlib_get_thread_index ()], rec);
@@ -4656,8 +4656,8 @@ remove_dead_pending_map_requests (lisp_cp_main_t * lcm)
   u32 *to_be_removed = 0, *pmr_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (pmr, lcm->pending_map_requests_pool,
-  ({
+  pool_foreach (pmr, lcm->pending_map_requests_pool)
+   {
     if (pmr->to_be_removed)
       {
         clib_fifo_foreach (nonce, pmr->nonces, ({
@@ -4666,7 +4666,7 @@ remove_dead_pending_map_requests (lisp_cp_main_t * lcm)
 
         vec_add1 (to_be_removed, pmr - lcm->pending_map_requests_pool);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_foreach (pmr_index, to_be_removed)
@@ -4754,15 +4754,15 @@ update_map_register (lisp_cp_main_t * lcm, f64 dt)
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (pmr, lcm->pending_map_registers_pool,
-  ({
+  pool_foreach (pmr, lcm->pending_map_registers_pool)
+   {
     if (!update_pending_map_register (pmr, dt, &del_all))
     {
       if (del_all)
         break;
       vec_add1 (to_be_removed, pmr - lcm->pending_map_registers_pool);
     }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (del_all)
@@ -4814,11 +4814,11 @@ send_map_resolver_service (vlib_main_t * vm,
       (void) vlib_process_get_events (vm, 0);
 
       /* *INDENT-OFF* */
-      pool_foreach (pmr, lcm->pending_map_requests_pool,
-      ({
+      pool_foreach (pmr, lcm->pending_map_requests_pool)
+       {
         if (!pmr->to_be_removed)
           update_pending_request (pmr, period);
-      }));
+      }
       /* *INDENT-ON* */
 
       remove_dead_pending_map_requests (lcm);
index 041069d..d8f889a 100644 (file)
@@ -590,8 +590,8 @@ vl_api_lisp_locator_set_dump_t_handler (vl_api_lisp_locator_set_dump_t * mp)
 
   filter = mp->filter;
   /* *INDENT-OFF* */
-  pool_foreach (lsit, lcm->locator_set_pool,
-  ({
+  pool_foreach (lsit, lcm->locator_set_pool)
+   {
     if (filter && !((1 == filter && lsit->local) ||
                     (2 == filter && !lsit->local)))
       {
@@ -599,7 +599,7 @@ vl_api_lisp_locator_set_dump_t_handler (vl_api_lisp_locator_set_dump_t * mp)
       }
     send_lisp_locator_set_details (lcm, lsit, reg, mp->context,
                                    lsit - lcm->locator_set_pool);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -704,11 +704,11 @@ vl_api_lisp_eid_table_dump_t_handler (vl_api_lisp_eid_table_dump_t * mp)
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (mapit, lcm->mapping_pool,
-      ({
+      pool_foreach (mapit, lcm->mapping_pool)
+       {
         send_lisp_eid_table_details(mapit, reg, mp->context,
                                     mp->filter);
-      }));
+      }
       /* *INDENT-ON* */
     }
 }
index 8685c1c..569d695 100644 (file)
@@ -841,8 +841,8 @@ lisp_show_eid_table_command_fn (vlib_main_t * vm,
   if (print_all)
     {
       /* *INDENT-OFF* */
-      pool_foreach (mapit, lcm->mapping_pool,
-      ({
+      pool_foreach (mapit, lcm->mapping_pool)
+       {
         if (mapit->pitr_set)
           continue;
 
@@ -855,7 +855,7 @@ lisp_show_eid_table_command_fn (vlib_main_t * vm,
           }
         vlib_cli_output (vm, "%U", format_eid_entry, lcm->vnet_main,
                          lcm, mapit, ls);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
@@ -1300,8 +1300,8 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm,
                   "Priority", "Weight");
 
   /* *INDENT-OFF* */
-  pool_foreach (lsit, lcm->locator_set_pool,
-  ({
+  pool_foreach (lsit, lcm->locator_set_pool)
+   {
     u8 * msg = 0;
     int next_line = 0;
     if (lsit->local)
@@ -1330,7 +1330,7 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm,
       }
     vlib_cli_output (vm, "%v", msg);
     vec_free (msg);
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
index eb0b4c6..3969dd2 100644 (file)
@@ -791,8 +791,8 @@ vl_api_one_locator_set_dump_t_handler (vl_api_one_locator_set_dump_t * mp)
 
   filter = mp->filter;
   /* *INDENT-OFF* */
-  pool_foreach (lsit, lcm->locator_set_pool,
-  ({
+  pool_foreach (lsit, lcm->locator_set_pool)
+   {
     if (filter && !((1 == filter && lsit->local) ||
                     (2 == filter && !lsit->local)))
       {
@@ -800,7 +800,7 @@ vl_api_one_locator_set_dump_t_handler (vl_api_one_locator_set_dump_t * mp)
       }
     send_one_locator_set_details (lcm, lsit, reg, mp->context,
                                    lsit - lcm->locator_set_pool);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -921,11 +921,11 @@ vl_api_one_eid_table_dump_t_handler (vl_api_one_eid_table_dump_t * mp)
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (mapit, lcm->mapping_pool,
-      ({
+      pool_foreach (mapit, lcm->mapping_pool)
+       {
         send_one_eid_table_details(mapit, reg, mp->context,
                                     mp->filter);
-      }));
+      }
       /* *INDENT-ON* */
     }
 }
index b435326..b85fea1 100644 (file)
@@ -1157,8 +1157,8 @@ lisp_show_eid_table_command_fn (vlib_main_t * vm,
   if (print_all)
     {
       /* *INDENT-OFF* */
-      pool_foreach (mapit, lcm->mapping_pool,
-      ({
+      pool_foreach (mapit, lcm->mapping_pool)
+       {
         if (mapit->pitr_set || mapit->nsh_set)
           continue;
 
@@ -1171,7 +1171,7 @@ lisp_show_eid_table_command_fn (vlib_main_t * vm,
           }
         vlib_cli_output (vm, "%U", format_eid_entry, lcm->vnet_main,
                          lcm, mapit, ls);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
@@ -1841,8 +1841,8 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm,
                   "Priority", "Weight");
 
   /* *INDENT-OFF* */
-  pool_foreach (lsit, lcm->locator_set_pool,
-  ({
+  pool_foreach (lsit, lcm->locator_set_pool)
+   {
     u8 * msg = 0;
     int next_line = 0;
     if (lsit->local)
@@ -1871,7 +1871,7 @@ lisp_cp_show_locator_sets_command_fn (vlib_main_t * vm,
       }
     vlib_cli_output (vm, "%v", msg);
     vec_free (msg);
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
index d93f3ab..8d20412 100644 (file)
@@ -559,13 +559,13 @@ lisp_gpe_adjacency_show (vlib_main_t * vm,
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (ladj, lisp_adj_pool,
-      ({
+      pool_foreach (ladj, lisp_adj_pool)
+       {
        vlib_cli_output (vm, "[%d] %U\n",
                         ladj - lisp_adj_pool,
                         format_lisp_gpe_adjacency, ladj,
                         LISP_GPE_ADJ_FORMAT_FLAG_NONE);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
index 00d5af4..5f196fb 100644 (file)
@@ -1357,8 +1357,8 @@ vnet_lisp_gpe_fwd_entry_flush (void)
   lisp_gpe_fwd_entry_t *lfe;
 
   /* *INDENT-OFF* */
-  pool_foreach (lfe, lgm->lisp_fwd_entry_pool,
-  ({
+  pool_foreach (lfe, lgm->lisp_fwd_entry_pool)
+   {
     switch (fid_addr_type(&lfe->key->rmt))
       {
       case FID_ADDR_MAC:
@@ -1371,7 +1371,7 @@ vnet_lisp_gpe_fwd_entry_flush (void)
         del_nsh_fwd_entry_i (lgm, lfe);
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1477,13 +1477,13 @@ lisp_gpe_fwd_entry_show (vlib_main_t * vm,
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (lfe, lgm->lisp_fwd_entry_pool,
-  ({
+  pool_foreach (lfe, lgm->lisp_fwd_entry_pool)
+   {
     if ((vni == ~0) ||
        (lfe->key->vni == vni))
       vlib_cli_output (vm, "%U", format_lisp_gpe_fwd_entry, lfe,
                       LISP_GPE_FWD_ENTRY_FORMAT_NONE);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (NULL);
@@ -1522,10 +1522,10 @@ vnet_lisp_gpe_get_fwd_entry_vnis (void)
   u32 *vnis = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (lfe, lgm->lisp_fwd_entry_pool,
-  ({
+  pool_foreach (lfe, lgm->lisp_fwd_entry_pool)
+   {
     hash_set (vnis, lfe->key->vni, 0);
-  }));
+  }
   /* *INDENT-ON* */
 
   return vnis;
@@ -1539,8 +1539,8 @@ vnet_lisp_gpe_fwd_entries_get_by_vni (u32 vni)
   lisp_api_gpe_fwd_entry_t *entries = 0, e;
 
   /* *INDENT-OFF* */
-  pool_foreach (lfe, lgm->lisp_fwd_entry_pool,
-  ({
+  pool_foreach (lfe, lgm->lisp_fwd_entry_pool)
+   {
     if (lfe->key->vni == vni)
       {
         clib_memset (&e, 0, sizeof (e));
@@ -1553,7 +1553,7 @@ vnet_lisp_gpe_fwd_entries_get_by_vni (u32 vni)
         memcpy (&e.leid, &lfe->key->lcl, sizeof (e.leid));
         vec_add1 (entries, e);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return entries;
index b84c76f..9c48c00 100644 (file)
@@ -245,10 +245,10 @@ lisp_gpe_sub_interface_show (vlib_main_t * vm,
                   "local RLOC");
 
   /* *INDENT-OFF* */
-  pool_foreach (l3s, lisp_gpe_sub_interface_pool,
-  ({
+  pool_foreach (l3s, lisp_gpe_sub_interface_pool)
+   {
     vlib_cli_output (vm, "%U", format_lisp_gpe_sub_interface, l3s);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
index fb6aa1a..b6173b2 100644 (file)
@@ -263,11 +263,11 @@ lisp_gpe_tenant_flush (void)
   lisp_gpe_tenant_t *lt;
 
   /* *INDENT-OFF* */
-  pool_foreach(lt, lisp_gpe_tenant_pool,
-  ({
+  pool_foreach (lt, lisp_gpe_tenant_pool)
+   {
     lisp_gpe_tenant_l2_iface_unlock(lt->lt_vni);
     lisp_gpe_tenant_l3_iface_unlock(lt->lt_vni);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -306,10 +306,10 @@ lisp_gpe_tenant_show (vlib_main_t * vm,
   lisp_gpe_tenant_t *lt;
 
   /* *INDENT-OFF* */
-  pool_foreach (lt, lisp_gpe_tenant_pool,
-  ({
+  pool_foreach (lt, lisp_gpe_tenant_pool)
+   {
     vlib_cli_output (vm, "%U", format_lisp_gpe_tenant, lt);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
index b242642..14ee095 100644 (file)
@@ -254,10 +254,10 @@ show_lisp_gpe_tunnel_command_fn (vlib_main_t * vm,
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (lgt, lisp_gpe_tunnel_pool,
-      ({
+      pool_foreach (lgt, lisp_gpe_tunnel_pool)
+       {
        vlib_cli_output (vm, "%U", format_lisp_gpe_tunnel, lgt);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
index ef3fccc..583804d 100644 (file)
@@ -581,8 +581,8 @@ format_lldp_intfs_detail (u8 * s, vlib_main_t * vm, const lldp_main_t * lm)
   f64 now = vlib_time_now (vm);
 
   /* *INDENT-OFF* */
-  pool_foreach(
-      n, lm->intfs, ({
+  pool_foreach (
+      n, lm->intfs)  {
         hw = vnet_get_hw_interface(vnm, n->hw_if_index);
         sw = vnet_get_sw_interface(lm->vnet_main, hw->sw_if_index);
 
@@ -639,7 +639,7 @@ format_lldp_intfs_detail (u8 * s, vlib_main_t * vm, const lldp_main_t * lm)
                        vec_len(n->port_id), 1, format_time_ago, n->last_sent,
                        now, format_time_ago, n->last_heard, now);
           }
-      }));
+      }
   /* *INDENT-ON* */
   return s;
 }
@@ -664,8 +664,8 @@ format_lldp_intfs (u8 * s, va_list * va)
              "Status");
 
   /* *INDENT-OFF* */
-  pool_foreach(
-      n, lm->intfs, ({
+  pool_foreach (
+      n, lm->intfs)  {
         const vnet_hw_interface_t *hw =
             vnet_get_hw_interface(vnm, n->hw_if_index);
         const vnet_sw_interface_t *sw =
@@ -688,7 +688,7 @@ format_lldp_intfs (u8 * s, va_list * va)
                        "", "", format_time_ago, n->last_heard, now,
                        format_time_ago, n->last_sent, now, "inactive");
           }
-      }));
+      }
   /* *INDENT-ON* */
   return s;
 }
index 1525ab6..d7fd7a0 100644 (file)
@@ -43,10 +43,10 @@ handle_get_mactime (http_builtin_method_type_t reqtype,
     mm->sunday_midnight = clib_timebase_find_sunday_midnight (now);
 
     /* *INDENT-OFF* */
-    pool_foreach (dp, mm->devices,
-    ({
+    pool_foreach (dp, mm->devices)
+     {
         vec_add1 (pool_indices, dp - mm->devices);
-    }));
+    }
     /* *INDENT-ON* */
 
   s = format (s, "{%smactime%s: [\n", q, q);
index 66df70b..a2219be 100644 (file)
@@ -195,8 +195,8 @@ vl_api_mactime_dump_t_handler (vl_api_mactime_dump_t * mp)
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (dev, mm->devices,
-  ({
+  pool_foreach (dev, mm->devices)
+   {
     message_size = sizeof(*ep) + vec_len(dev->device_name) +
       vec_len(dev->ranges) * sizeof(ep->ranges[0]);
 
@@ -230,7 +230,7 @@ vl_api_mactime_dump_t_handler (vl_api_mactime_dump_t * mp)
                       name_len);
     ep->device_name [ARRAY_LEN(ep->device_name) -1] = 0;
     vl_api_send_msg (rp, (u8 *)ep);
-  }));
+  }
   /* *INDENT-OFF* */
 
  send_reply:
@@ -578,10 +578,10 @@ show_mactime_command_fn (vlib_main_t * vm,
     vlib_cli_output (vm, "Time now: %U", format_clib_timebase_time, now);
 
   /* *INDENT-OFF* */
-  pool_foreach (dp, mm->devices,
-  ({
+  pool_foreach (dp, mm->devices)
+   {
     vec_add1 (pool_indices, dp - mm->devices);
-  }));
+  }
   /* *INDENT-ON* */
 
   vlib_cli_output (vm, "%-15s %18s %14s %10s %11s %13s",
index b47cc21..67655cc 100644 (file)
@@ -282,10 +282,10 @@ api_mactime_dump (vat_main_t * vam)
 
   fformat (vam->ofp, "%U", format_device, 0 /* header */ , 0 /* verbose */ );
   /* *INDENT-OFF* */
-  pool_foreach (dev, tm->devices,
-  ({
+  pool_foreach (dev, tm->devices)
+   {
     fformat (vam->ofp, "%U", format_device, dev, verbose);
-  }));
+  }
   /* *INDENT-ON* */
 
   return ret;
index 473cc5b..72d1964 100644 (file)
@@ -196,10 +196,10 @@ scrape_stats_segment (mt_main_t * mm)
 
   vec_reset_length (pool_indices);
   /* *INDENT-OFF* */
-  pool_foreach (dev, mm->devices,
-  ({
+  pool_foreach (dev, mm->devices)
+   {
     vec_add1 (pool_indices, dev->pool_index);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* Nothing to do... */
@@ -445,10 +445,10 @@ print_device_table (mt_main_t * mm)
 
   fformat (stdout, "%U", format_device, 0 /* header */ , 0 /* verbose */ );
   /* *INDENT-OFF* */
-  pool_foreach (dev, mm->devices,
-  ({
+  pool_foreach (dev, mm->devices)
+   {
     fformat (stdout, "%U", format_device, dev, 0 /* verbose */);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 92d2337..938793c 100644 (file)
@@ -980,8 +980,8 @@ show_map_domain_command_fn (vlib_main_t * vm, unformat_input_t * input,
   if (!unformat_user (input, unformat_line_input, line_input))
     {
       /* *INDENT-OFF* */
-      pool_foreach(d, mm->domains,
-       ({vlib_cli_output(vm, "%U", format_map_domain, d, counters);}));
+      pool_foreach (d, mm->domains)
+        {vlib_cli_output(vm, "%U", format_map_domain, d, counters);}
       /* *INDENT-ON* */
       return 0;
     }
@@ -1009,8 +1009,8 @@ show_map_domain_command_fn (vlib_main_t * vm, unformat_input_t * input,
   if (map_domain_index == ~0)
     {
       /* *INDENT-OFF* */
-      pool_foreach(d, mm->domains,
-       ({vlib_cli_output(vm, "%U", format_map_domain, d, counters);}));
+      pool_foreach (d, mm->domains)
+        {vlib_cli_output(vm, "%U", format_map_domain, d, counters);}
       /* *INDENT-ON* */
     }
   else
@@ -1063,14 +1063,14 @@ show_map_stats_command_fn (vlib_main_t * vm, unformat_input_t * input,
     }
 
   /* *INDENT-OFF* */
-  pool_foreach(d, mm->domains, ({
+  pool_foreach (d, mm->domains)  {
     if (d->rules) {
       rulecount+= 0x1 << d->psid_length;
       rules += sizeof(ip6_address_t) * 0x1 << d->psid_length;
     }
     domains += sizeof(*d);
     domaincount++;
-  }));
+  }
   /* *INDENT-ON* */
 
   vlib_cli_output (vm, "MAP domains structure: %d\n", sizeof (map_domain_t));
index e65174e..4d2378a 100644 (file)
@@ -137,10 +137,10 @@ vl_api_map_domain_dump_t_handler (vl_api_map_domain_dump_t * mp)
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(i, mm->domains,
-  ({
+  pool_foreach_index (i, mm->domains)
+   {
     send_domain_details(i, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 00c947a..b313e97 100644 (file)
@@ -461,9 +461,8 @@ memif_show_command_fn (vlib_main_t * vm, unformat_input_t * input,
   if (vec_len (hw_if_indices) == 0)
     {
       /* *INDENT-OFF* */
-      pool_foreach (mif, mm->interfaces,
+      pool_foreach (mif, mm->interfaces)
          vec_add1 (hw_if_indices, mif->hw_if_index);
-      );
       /* *INDENT-ON* */
     }
 
index 4deb46a..bf09509 100644 (file)
@@ -557,8 +557,8 @@ memif_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
 
       last_run_duration = start_time = vlib_time_now (vm);
       /* *INDENT-OFF* */
-      pool_foreach (mif, mm->interfaces,
-        ({
+      pool_foreach (mif, mm->interfaces)
+         {
          memif_socket_file_t * msf = vec_elt_at_index (mm->socket_files, mif->socket_file_index);
          /* Allow no more than 10us without a pause */
          now = vlib_time_now (vm);
@@ -607,7 +607,7 @@ memif_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
                   sock = clib_mem_alloc (sizeof(clib_socket_t));
                }
            }
-        }));
+        }
       /* *INDENT-ON* */
       last_run_duration = vlib_time_now (vm) - last_run_duration;
     }
index 00edc7a..a50e7ce 100644 (file)
@@ -280,8 +280,8 @@ vl_api_memif_dump_t_handler (vl_api_memif_dump_t * mp)
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (mif, mm->interfaces,
-    ({
+  pool_foreach (mif, mm->interfaces)
+     {
       swif = vnet_get_sw_interface (vnm, mif->sw_if_index);
 
       if_name = format (if_name, "%U%c",
@@ -290,7 +290,7 @@ vl_api_memif_dump_t_handler (vl_api_memif_dump_t * mp)
 
       send_memif_details (reg, mif, swif, if_name, mp->context);
       _vec_len (if_name) = 0;
-    }));
+    }
   /* *INDENT-ON* */
 
   vec_free (if_name);
index 582fd20..1dbbfdf 100644 (file)
@@ -151,12 +151,12 @@ snat_det_add_map (ip4_address_t * in_addr, u8 in_plen,
 
   /* Add/del external address range to FIB */
   /* *INDENT-OFF* */
-  pool_foreach (i, dm->interfaces, ({
+  pool_foreach (i, dm->interfaces)  {
     if (det44_interface_is_inside(i))
       continue;
     det44_add_del_addr_to_fib(out_addr, out_plen, i->sw_if_index, is_add);
     goto out;
-  }));
+  }
   /* *INDENT-ON* */
 out:
   return 0;
@@ -204,13 +204,13 @@ det44_interface_add_del (u32 sw_if_index, u8 is_inside, int is_del)
   // then register nodes
 
   /* *INDENT-OFF* */
-  pool_foreach (tmp, dm->interfaces, ({
+  pool_foreach (tmp, dm->interfaces)  {
     if (tmp->sw_if_index == sw_if_index)
       {
         i = tmp;
         goto out;
       }
-  }));
+  }
   /* *INDENT-ON* */
 out:
 
@@ -302,10 +302,10 @@ out:
       // add/del outside address to FIB
       snat_det_map_t *mp;
       /* *INDENT-OFF* */
-      pool_foreach (mp, dm->det_maps, ({
+      pool_foreach (mp, dm->det_maps)  {
         det44_add_del_addr_to_fib(&mp->out_addr,
                                   mp->out_plen, sw_if_index, !is_del);
-      }));
+      }
       /* *INDENT-ON* */
     }
   return 0;
@@ -328,14 +328,14 @@ det44_expire_walk_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
   vlib_process_get_events (vm, NULL);
   u32 now = (u32) vlib_time_now (vm);
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps, ({
+  pool_foreach (mp, dm->det_maps)  {
     vec_foreach(ses, mp->sessions)
       {
         /* Delete if session expired */
         if (ses->in_port && (ses->expire < now))
           snat_det_ses_close (mp, ses);
       }
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -429,10 +429,10 @@ det44_plugin_disable ()
   vec_free (interfaces);
 
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     vec_free (mp->sessions);
-  }));
+  }
   /* *INDENT-ON* */
 
   det44_reset_timeouts ();
@@ -468,15 +468,15 @@ det44_update_outside_fib (ip4_main_t * im,
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, dm->interfaces,
-    ({
+  pool_foreach (i, dm->interfaces)
+     {
       if (i->sw_if_index == sw_if_index)
         {
           if (!(det44_interface_is_outside (i)))
            return;
           match = 1;
         }
-    }));
+    }
   /* *INDENT-ON* */
 
   if (!match)
index 84d570b..02b0fa7 100644 (file)
@@ -279,11 +279,11 @@ snat_det_map_by_user (ip4_address_t * user_addr)
   det44_main_t *dm = &det44_main;
   snat_det_map_t *mp;
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     if (is_addr_in_net(user_addr, &mp->in_addr, mp->in_plen))
       return mp;
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -294,11 +294,11 @@ snat_det_map_by_out (ip4_address_t * out_addr)
   det44_main_t *dm = &det44_main;
   snat_det_map_t *mp;
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     if (is_addr_in_net(out_addr, &mp->out_addr, mp->out_plen))
       return mp;
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
index 7c7b178..1486180 100644 (file)
@@ -329,10 +329,10 @@ vl_api_det44_interface_dump_t_handler (vl_api_det44_interface_dump_t * mp)
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, dm->interfaces,
-  ({
+  pool_foreach (i, dm->interfaces)
+   {
     det44_send_interface_details(i, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 933784f..28569c7 100644 (file)
@@ -75,8 +75,8 @@ det44_show_mappings_command_fn (vlib_main_t * vm,
   snat_det_map_t *mp;
   vlib_cli_output (vm, "NAT44 deterministic mappings:");
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     vlib_cli_output (vm, " in %U/%d out %U/%d\n",
                      format_ip4_address, &mp->in_addr, mp->in_plen,
                      format_ip4_address, &mp->out_addr, mp->out_plen);
@@ -85,7 +85,7 @@ det44_show_mappings_command_fn (vlib_main_t * vm,
     vlib_cli_output (vm, "  number of ports per inside host: %d\n",
                      mp->ports_per_host);
     vlib_cli_output (vm, "  sessions number: %d\n", mp->ses_num);
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -188,8 +188,8 @@ det44_show_sessions_command_fn (vlib_main_t * vm,
   snat_det_map_t *mp;
   vlib_cli_output (vm, "NAT44 deterministic sessions:");
   /* *INDENT-OFF* */
-  pool_foreach (mp, dm->det_maps,
-  ({
+  pool_foreach (mp, dm->det_maps)
+   {
     int i;
     vec_foreach_index (i, mp->sessions)
       {
@@ -197,7 +197,7 @@ det44_show_sessions_command_fn (vlib_main_t * vm,
         if (ses->in_port)
           vlib_cli_output (vm, "  %U", format_det_map_ses, mp, ses, &i);
       }
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
@@ -487,14 +487,14 @@ det44_show_interfaces_command_fn (vlib_main_t * vm, unformat_input_t * input,
   det44_interface_t *i;
   vlib_cli_output (vm, "DET44 interfaces:");
   /* *INDENT-OFF* */
-  pool_foreach (i, dm->interfaces,
-  ({
+  pool_foreach (i, dm->interfaces)
+   {
     vlib_cli_output (vm, " %U %s", format_vnet_sw_if_index_name, vnm,
                      i->sw_if_index,
                      (det44_interface_is_inside(i) &&
                       det44_interface_is_outside(i)) ? "in out" :
                      (det44_interface_is_inside(i) ? "in" : "out"));
-  }));
+  }
   /* *INDENT-ON* */
   return 0;
 }
index e4be469..aeb55b3 100644 (file)
@@ -108,11 +108,11 @@ det44_translate (vlib_node_runtime_t * node, u32 sw_if_index0,
        {
          det44_interface_t *i;
           /* *INDENT-OFF* */
-          pool_foreach (i, dm->interfaces, ({
+          pool_foreach (i, dm->interfaces)  {
             /* NAT packet aimed at outside interface */
            if ((det44_interface_is_outside (i)) && (sw_if_index == i->sw_if_index))
               return 0;
-          }));
+          }
           /* *INDENT-ON* */
        }
     }
index 0819f95..25fcd01 100644 (file)
@@ -287,10 +287,10 @@ dslite_show_sessions_command_fn (vlib_main_t * vm,
   /* *INDENT-OFF* */
   vec_foreach (td, dm->per_thread_data)
     {
-      pool_foreach (b4, td->b4s,
-      ({
+      pool_foreach (b4, td->b4s)
+       {
         vlib_cli_output (vm, "%U", format_dslite_b4, td, b4);
-      }));
+      }
     }
   /* *INDENT-ON* */
 
index 85df078..309329f 100644 (file)
@@ -171,11 +171,11 @@ nat_not_translate_output_feature (snat_main_t * sm, ip4_header_t * ip0,
     {
       /* hairpinning */
     /* *INDENT-OFF* */
-    pool_foreach (i, sm->output_feature_interfaces,
-    ({
+    pool_foreach (i, sm->output_feature_interfaces)
+     {
       if ((nat_interface_is_inside(i)) && (sw_if_index == i->sw_if_index))
         return 0;
-    }));
+    }
     /* *INDENT-ON* */
       return 1;
     }
index d9a45dc..776efdf 100644 (file)
@@ -627,11 +627,11 @@ nat44_ed_not_translate_output_feature (snat_main_t * sm, ip4_header_t * ip,
 
       /* hairpinning */
       /* *INDENT-OFF* */
-      pool_foreach (i, sm->output_feature_interfaces,
-      ({
+      pool_foreach (i, sm->output_feature_interfaces)
+       {
         if ((nat_interface_is_inside (i)) && (rx_sw_if_index == i->sw_if_index))
            return 0;
-      }));
+      }
       /* *INDENT-ON* */
       return 1;
     }
@@ -826,7 +826,7 @@ nat44_ed_in2out_unknown_proto (snat_main_t * sm,
       else
        {
          /* *INDENT-OFF* */
-         pool_foreach (s, tsm->sessions, {
+         pool_foreach (s, tsm->sessions) {
            if (s->ext_host_addr.as_u32 == ip->dst_address.as_u32)
              {
                new_addr = ip->src_address.as_u32 = s->out2in.addr.as_u32;
@@ -837,7 +837,7 @@ nat44_ed_in2out_unknown_proto (snat_main_t * sm,
 
                break;
              }
-         });
+         }
          /* *INDENT-ON* */
 
          for (i = 0; i < vec_len (sm->addresses); i++)
index 91f14d6..0694c34 100644 (file)
@@ -730,22 +730,22 @@ snat_add_address (snat_main_t * sm, ip4_address_t * addr, u32 vrf_id,
 
   /* Add external address to FIB */
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     if (nat_interface_is_inside(i) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(addr, 32, i->sw_if_index, 1);
     break;
-  }));
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  }
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     if (nat_interface_is_inside(i) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(addr, 32, i->sw_if_index, 1);
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -756,15 +756,15 @@ is_snat_address_used_in_static_mapping (snat_main_t * sm, ip4_address_t addr)
 {
   snat_static_mapping_t *m;
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
       if (is_addr_only_static_mapping (m) ||
           is_out2in_only_static_mapping (m) ||
           is_identity_static_mapping (m))
         continue;
       if (m->external_addr.as_u32 == addr.as_u32)
         return 1;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -882,7 +882,7 @@ nat_ed_static_mapping_del_sessions (snat_main_t * sm,
   snat_session_t *s;
   u32 *indexes_to_free = NULL;
   /* *INDENT-OFF* */
-  pool_foreach (s, tsm->sessions, {
+  pool_foreach (s, tsm->sessions) {
     if (s->in2out.fib_index != fib_index ||
         s->in2out.addr.as_u32 != l_addr.as_u32)
       {
@@ -905,7 +905,7 @@ nat_ed_static_mapping_del_sessions (snat_main_t * sm,
     vec_add1 (indexes_to_free, s - tsm->sessions);
     if (!addr_only)
       break;
-  });
+  }
   /* *INDENT-ON* */
   u32 *ses_index;
   vec_foreach (ses_index, indexes_to_free)
@@ -1031,11 +1031,11 @@ snat_add_static_mapping (ip4_address_t l_addr, ip4_address_t e_addr,
          if (is_identity_static_mapping (m))
            {
               /* *INDENT-OFF* */
-              pool_foreach (local, m->locals,
-              ({
+              pool_foreach (local, m->locals)
+               {
                 if (local->vrf_id == vrf_id)
                   return VNET_API_ERROR_VALUE_EXIST;
-              }));
+              }
               /* *INDENT-ON* */
              pool_get (m->locals, local);
              local->vrf_id = vrf_id;
@@ -1246,11 +1246,11 @@ snat_add_static_mapping (ip4_address_t l_addr, ip4_address_t e_addr,
            vrf_id = sm->inside_vrf_id;
 
           /* *INDENT-OFF* */
-          pool_foreach (local, m->locals,
-          ({
+          pool_foreach (local, m->locals)
+           {
            if (local->vrf_id == vrf_id)
               find = local - m->locals;
-         }));
+         }
           /* *INDENT-ON* */
          if (find == ~0)
            return VNET_API_ERROR_NO_SUCH_ENTRY;
@@ -1340,22 +1340,22 @@ snat_add_static_mapping (ip4_address_t l_addr, ip4_address_t e_addr,
 
   /* Add/delete external address to FIB */
   /* *INDENT-OFF* */
-  pool_foreach (interface, sm->interfaces,
-  ({
+  pool_foreach (interface, sm->interfaces)
+   {
     if (nat_interface_is_inside(interface) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(&e_addr, 32, interface->sw_if_index, is_add);
     break;
-  }));
-  pool_foreach (interface, sm->output_feature_interfaces,
-  ({
+  }
+  pool_foreach (interface, sm->output_feature_interfaces)
+   {
     if (nat_interface_is_inside(interface) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(&e_addr, 32, interface->sw_if_index, is_add);
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -1544,8 +1544,8 @@ nat44_add_del_lb_static_mapping (ip4_address_t e_addr, u16 e_port,
        }
 
       /* *INDENT-OFF* */
-      pool_foreach (local, m->locals,
-      ({
+      pool_foreach (local, m->locals)
+      {
           fib_table_unlock (local->fib_index, FIB_PROTOCOL_IP4,
                             sm->fib_src_low);
           if (!out2in_only)
@@ -1570,7 +1570,7 @@ init_nat_k(&              kv, local->addr, local->port, local->fib_index, m->pro
             tsm = vec_elt_at_index (sm->per_thread_data, sm->num_workers);
 
           /* Delete sessions */
-          pool_foreach (s, tsm->sessions, {
+          pool_foreach (s, tsm->sessions) {
             if (!(is_lb_session (s)))
               continue;
 
@@ -1580,8 +1580,8 @@ init_nat_k(&              kv, local->addr, local->port, local->fib_index, m->pro
 
             nat_free_session_data (sm, s, tsm - sm->per_thread_data, 0);
             nat_ed_session_delete (sm, s, tsm - sm->per_thread_data, 1);
-          });
-      }));
+          }
+      }
       /* *INDENT-ON* */
       if (m->affinity)
        nat_affinity_flush_service (m->affinity_per_service_list_head_index);
@@ -1625,15 +1625,15 @@ nat44_lb_static_mapping_add_del_local (ip4_address_t e_addr, u16 e_port,
     return VNET_API_ERROR_INVALID_VALUE;
 
   /* *INDENT-OFF* */
-  pool_foreach (local, m->locals,
-  ({
+  pool_foreach (local, m->locals)
+   {
     if ((local->addr.as_u32 == l_addr.as_u32) && (local->port == l_port) &&
         (local->vrf_id == vrf_id))
       {
         match_local = local;
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_add)
@@ -1691,7 +1691,7 @@ nat44_lb_static_mapping_add_del_local (ip4_address_t e_addr, u16 e_port,
 
       /* Delete sessions */
       /* *INDENT-OFF* */
-      pool_foreach (s, tsm->sessions, {
+      pool_foreach (s, tsm->sessions) {
         if (!(is_lb_session (s)))
           continue;
 
@@ -1701,7 +1701,7 @@ nat44_lb_static_mapping_add_del_local (ip4_address_t e_addr, u16 e_port,
 
         nat_free_session_data (sm, s, tsm - sm->per_thread_data, 0);
         nat_ed_session_delete (sm, s, tsm - sm->per_thread_data, 1);
-      });
+      }
       /* *INDENT-ON* */
 
       pool_put (m->locals, match_local);
@@ -1710,8 +1710,8 @@ nat44_lb_static_mapping_add_del_local (ip4_address_t e_addr, u16 e_port,
   vec_free (m->workers);
 
   /* *INDENT-OFF* */
-  pool_foreach (local, m->locals,
-  ({
+  pool_foreach (local, m->locals)
+   {
     vec_add1 (locals, local - m->locals);
     if (sm->num_workers > 1)
       {
@@ -1721,7 +1721,7 @@ nat44_lb_static_mapping_add_del_local (ip4_address_t e_addr, u16 e_port,
                                   sm->worker_in2out_cb (&ip, local->fib_index, 0),
                                   1);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   ASSERT (vec_len (locals) > 1);
@@ -1779,8 +1779,8 @@ snat_del_address (snat_main_t * sm, ip4_address_t addr, u8 delete_sm,
     {
       ip4_address_t pool_addr = { 0 };
       /* *INDENT-OFF* */
-      pool_foreach (m, sm->static_mappings,
-      ({
+      pool_foreach (m, sm->static_mappings)
+       {
           if (m->external_addr.as_u32 == addr.as_u32)
             (void) snat_add_static_mapping (m->local_addr, m->external_addr,
                                             m->local_port, m->external_port,
@@ -1792,7 +1792,7 @@ snat_del_address (snat_main_t * sm, ip4_address_t addr, u8 delete_sm,
                                             m->tag,
                                             is_identity_static_mapping(m),
                                             pool_addr, 0);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
@@ -1814,13 +1814,13 @@ snat_del_address (snat_main_t * sm, ip4_address_t addr, u8 delete_sm,
       vec_foreach (tsm, sm->per_thread_data)
       {
         /* *INDENT-OFF* */
-        pool_foreach (ses, tsm->sessions, ({
+        pool_foreach (ses, tsm->sessions)  {
           if (ses->out2in.addr.as_u32 == addr.as_u32)
             {
               nat_free_session_data (sm, ses, tsm - sm->per_thread_data, 0);
               vec_add1 (ses_to_be_removed, ses - tsm->sessions);
             }
-        }));
+        }
         /* *INDENT-ON* */
 
        if (sm->endpoint_dependent)
@@ -1858,22 +1858,22 @@ snat_del_address (snat_main_t * sm, ip4_address_t addr, u8 delete_sm,
 
   /* Delete external address from FIB */
   /* *INDENT-OFF* */
-  pool_foreach (interface, sm->interfaces,
-  ({
+  pool_foreach (interface, sm->interfaces)
+   {
     if (nat_interface_is_inside(interface) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(&addr, 32, interface->sw_if_index, 0);
     break;
-  }));
-  pool_foreach (interface, sm->output_feature_interfaces,
-  ({
+  }
+  pool_foreach (interface, sm->output_feature_interfaces)
+   {
     if (nat_interface_is_inside(interface) || sm->out2in_dpo)
       continue;
 
     snat_add_del_addr_to_fib(&addr, 32, interface->sw_if_index, 0);
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -1997,14 +1997,14 @@ snat_interface_add_del (u32 sw_if_index, u8 is_inside, int is_del)
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         nat_log_err ("error interface already configured");
         return VNET_API_ERROR_VALUE_EXIST;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (sm->static_mapping_only && !(sm->static_mapping_connection_tracking))
@@ -2063,8 +2063,8 @@ snat_interface_add_del (u32 sw_if_index, u8 is_inside, int is_del)
 
 feature_set:
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         if (is_del)
@@ -2180,7 +2180,7 @@ feature_set:
 
         goto fib;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_del)
@@ -2226,13 +2226,13 @@ fib:
   vec_foreach (ap, sm->addresses)
     snat_add_del_addr_to_fib(&ap->addr, 32, sw_if_index, !is_del);
 
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
     if (!(is_addr_only_static_mapping(m)) || (m->local_addr.as_u32 == m->external_addr.as_u32))
       continue;
 
     snat_add_del_addr_to_fib(&m->external_addr, 32, sw_if_index, !is_del);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -2263,14 +2263,14 @@ snat_interface_add_del_output_feature (u32 sw_if_index,
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         nat_log_err ("error interface already configured");
         return VNET_API_ERROR_VALUE_EXIST;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (sm->endpoint_dependent)
@@ -2403,8 +2403,8 @@ fq:
       vlib_frame_queue_main_init (sm->out2in_node_index, 0);
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         if (is_del)
@@ -2414,7 +2414,7 @@ fq:
 
         goto fib;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_del)
@@ -2441,13 +2441,13 @@ fib:
   vec_foreach (ap, sm->addresses)
     snat_add_del_addr_to_fib(&ap->addr, 32, sw_if_index, !is_del);
 
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
     if (!((is_addr_only_static_mapping(m)))  || (m->local_addr.as_u32 == m->external_addr.as_u32))
       continue;
 
     snat_add_del_addr_to_fib(&m->external_addr, 32, sw_if_index, !is_del);
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -2499,25 +2499,25 @@ snat_update_outside_fib (ip4_main_t * im, uword opaque,
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-    ({
+  pool_foreach (i, sm->interfaces)
+     {
       if (i->sw_if_index == sw_if_index)
         {
           if (!(nat_interface_is_outside (i)))
            return;
           match = 1;
         }
-    }));
+    }
 
-  pool_foreach (i, sm->output_feature_interfaces,
-    ({
+  pool_foreach (i, sm->output_feature_interfaces)
+     {
       if (i->sw_if_index == sw_if_index)
         {
           if (!(nat_interface_is_outside (i)))
            return;
           match = 1;
         }
-    }));
+    }
   /* *INDENT-ON* */
 
   if (!match)
@@ -3251,8 +3251,8 @@ snat_static_mapping_match (snat_main_t * sm,
            {
              u32 thread_index = vlib_get_thread_index ();
               /* *INDENT-OFF* */
-              pool_foreach_index (i, m->locals,
-              ({
+              pool_foreach_index (i, m->locals)
+               {
                 local = pool_elt_at_index (m->locals, i);
 
                 ip4_header_t ip = {
@@ -3264,17 +3264,17 @@ snat_static_mapping_match (snat_main_t * sm,
                   {
                     vec_add1 (tmp, i);
                   }
-              }));
+              }
               /* *INDENT-ON* */
              ASSERT (vec_len (tmp) != 0);
            }
          else
            {
               /* *INDENT-OFF* */
-              pool_foreach_index (i, m->locals,
-              ({
+              pool_foreach_index (i, m->locals)
+               {
                 vec_add1 (tmp, i);
-              }));
+              }
               /* *INDENT-ON* */
            }
          hi = vec_len (tmp) - 1;
index 4600645..5bc4b4c 100644 (file)
@@ -725,10 +725,10 @@ vl_api_nat44_interface_dump_t_handler (vl_api_nat44_interface_dump_t * mp)
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     send_nat44_interface_details(i, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -785,10 +785,10 @@ static void
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     send_nat44_interface_output_feature_details(i, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -982,11 +982,11 @@ vl_api_nat44_static_mapping_dump_t_handler (vl_api_nat44_static_mapping_dump_t
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
       if (!is_identity_static_mapping(m) && !is_lb_static_mapping (m))
         send_nat44_static_mapping_details (m, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 
   for (j = 0; j < vec_len (sm->to_resolve); j++)
@@ -1104,16 +1104,16 @@ static void
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
       if (is_identity_static_mapping(m) && !is_lb_static_mapping (m))
         {
-          pool_foreach_index (j, m->locals,
-          ({
+          pool_foreach_index (j, m->locals)
+           {
             send_nat44_identity_mapping_details (m, j, reg, mp->context);
-          }));
+          }
         }
-  }));
+  }
   /* *INDENT-ON* */
 
   for (j = 0; j < vec_len (sm->to_resolve); j++)
@@ -1251,7 +1251,7 @@ nat_ed_users_create (snat_main_per_thread_data_t * tsm)
 {
   snat_session_t *s;
   /* *INDENT-OFF* */
-  pool_foreach (s, tsm->sessions, { nat_ed_user_create_helper (tsm, s); });
+  pool_foreach (s, tsm->sessions) { nat_ed_user_create_helper (tsm, s); }
   /* *INDENT-ON* */
 }
 
@@ -1286,10 +1286,10 @@ vl_api_nat44_user_dump_t_handler (vl_api_nat44_user_dump_t * mp)
        {
          nat_ed_users_create (tsm);
        }
-      pool_foreach (u, tsm->users,
-      ({
+      pool_foreach (u, tsm->users)
+       {
         send_nat44_user_details (u, reg, mp->context);
-      }));
+      }
       if (sm->endpoint_dependent)
        {
          nat_ed_users_destroy (tsm);
@@ -1407,12 +1407,12 @@ vl_api_nat44_user_session_dump_t_handler (vl_api_nat44_user_session_dump_t *
   else
     {
       /* *INDENT-OFF* */
-      pool_foreach (s, tsm->sessions, {
+      pool_foreach (s, tsm->sessions) {
         if (s->in2out.addr.as_u32 == ukey.addr.as_u32)
           {
             send_nat44_user_session_details (s, reg, mp->context);
           }
-      });
+      }
       /* *INDENT-ON* */
     }
 }
@@ -1556,15 +1556,15 @@ send_nat44_lb_static_mapping_details (snat_static_mapping_t * m,
 
   locals = (vl_api_nat44_lb_addr_port_t *) rmp->locals;
   /* *INDENT-OFF* */
-  pool_foreach (ap, m->locals,
-  ({
+  pool_foreach (ap, m->locals)
+   {
     clib_memcpy (locals->addr, &(ap->addr), 4);
     locals->port = ap->port;
     locals->probability = ap->probability;
     locals->vrf_id = ntohl (ap->vrf_id);
     locals++;
     local_num++;
-  }));
+  }
   /* *INDENT-ON* */
   rmp->local_num = ntohl (local_num);
 
@@ -1587,11 +1587,11 @@ static void
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
       if (is_lb_static_mapping(m))
         send_nat44_lb_static_mapping_details (m, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1644,13 +1644,13 @@ static void
       /* *INDENT-OFF* */
       vec_foreach (tsm, sm->per_thread_data)
       {
-        pool_foreach (s, tsm->sessions,
-        ({
+        pool_foreach (s, tsm->sessions)
+         {
           if (is_fwd_bypass_session(s))
             {
               vec_add1 (ses_to_be_removed, s - tsm->sessions);
             }
-        }));
+        }
        if(sm->endpoint_dependent){
            vec_foreach (ses_index, ses_to_be_removed)
              {
index 2980764..ca396fd 100644 (file)
@@ -773,8 +773,8 @@ nat44_show_summary_command_fn (vlib_main_t * vm, unformat_input_t * input,
       /* *INDENT-OFF* */
       vec_foreach (tsm, sm->per_thread_data)
         {
-          pool_foreach (s, tsm->sessions,
-          ({
+          pool_foreach (s, tsm->sessions)
+           {
             sess_timeout_time = s->last_heard +
              (f64) nat44_session_get_timeout (sm, s);
             if (now >= sess_timeout_time)
@@ -810,7 +810,7 @@ nat44_show_summary_command_fn (vlib_main_t * vm, unformat_input_t * input,
                 udp_sessions++;
                 break;
               }
-          }));
+          }
           nat44_show_lru_summary (vm, tsm, now, sess_timeout_time);
           count += pool_elts (tsm->sessions);
         }
@@ -820,8 +820,8 @@ nat44_show_summary_command_fn (vlib_main_t * vm, unformat_input_t * input,
     {
       tsm = vec_elt_at_index (sm->per_thread_data, sm->num_workers);
       /* *INDENT-OFF* */
-      pool_foreach (s, tsm->sessions,
-      ({
+      pool_foreach (s, tsm->sessions)
+       {
         sess_timeout_time = s->last_heard +
            (f64) nat44_session_get_timeout (sm, s);
         if (now >= sess_timeout_time)
@@ -857,7 +857,7 @@ nat44_show_summary_command_fn (vlib_main_t * vm, unformat_input_t * input,
             udp_sessions++;
             break;
           }
-      }));
+      }
       /* *INDENT-ON* */
       nat44_show_lru_summary (vm, tsm, now, sess_timeout_time);
       count = pool_elts (tsm->sessions);
@@ -1037,24 +1037,24 @@ nat44_show_interfaces_command_fn (vlib_main_t * vm, unformat_input_t * input,
 
   vlib_cli_output (vm, "NAT44 interfaces:");
   /* *INDENT-OFF* */
-  pool_foreach (i, sm->interfaces,
-  ({
+  pool_foreach (i, sm->interfaces)
+   {
     vlib_cli_output (vm, " %U %s", format_vnet_sw_if_index_name, vnm,
                      i->sw_if_index,
                      (nat_interface_is_inside(i) &&
                       nat_interface_is_outside(i)) ? "in out" :
                      (nat_interface_is_inside(i) ? "in" : "out"));
-  }));
+  }
 
-  pool_foreach (i, sm->output_feature_interfaces,
-  ({
+  pool_foreach (i, sm->output_feature_interfaces)
+   {
     vlib_cli_output (vm, " %U output-feature %s",
                      format_vnet_sw_if_index_name, vnm,
                      i->sw_if_index,
                      (nat_interface_is_inside(i) &&
                       nat_interface_is_outside(i)) ? "in out" :
                      (nat_interface_is_inside(i) ? "in" : "out"));
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -1473,10 +1473,10 @@ nat44_show_static_mappings_command_fn (vlib_main_t * vm,
 
   vlib_cli_output (vm, "NAT44 static mappings:");
   /* *INDENT-OFF* */
-  pool_foreach (m, sm->static_mappings,
-  ({
+  pool_foreach (m, sm->static_mappings)
+   {
     vlib_cli_output (vm, " %U", format_snat_static_mapping, m);
-  }));
+  }
   vec_foreach (rp, sm->to_resolve)
     vlib_cli_output (vm, " %U", format_snat_static_map_to_resolve, rp);
   /* *INDENT-ON* */
@@ -1611,18 +1611,18 @@ print:
       if (!sm->endpoint_dependent)
         {
           snat_user_t *u;
-          pool_foreach (u, tsm->users,
-          ({
+          pool_foreach (u, tsm->users)
+           {
             vlib_cli_output (vm, "  %U", format_snat_user, tsm, u, detail);
-          }));
+          }
         }
       else
         {
           snat_session_t *s;
-          pool_foreach (s, tsm->sessions,
-          ({
+          pool_foreach (s, tsm->sessions)
+           {
             vlib_cli_output (vm, "  %U\n", format_snat_session, tsm, s);
-          }));
+          }
         }
     }
   /* *INDENT-ON* */
index 2859046..9432f55 100644 (file)
@@ -746,8 +746,8 @@ snat_hairpin_src_fn_inline (vlib_main_t * vm,
          vnet_feature_next (&next0, b0);
 
           /* *INDENT-OFF* */
-          pool_foreach (i, sm->output_feature_interfaces,
-          ({
+          pool_foreach (i, sm->output_feature_interfaces)
+           {
             /* Only packets from NAT inside interface */
             if ((nat_interface_is_inside(i)) && (sw_if_index0 == i->sw_if_index))
               {
@@ -761,7 +761,7 @@ snat_hairpin_src_fn_inline (vlib_main_t * vm,
                   }
                 break;
               }
-          }));
+          }
           /* *INDENT-ON* */
 
          if (next0 != SNAT_HAIRPIN_SRC_NEXT_DROP)
index 240f3ef..ae7bb35 100644 (file)
@@ -423,14 +423,14 @@ nat64_add_del_pool_addr (u32 thread_index,
 
   /* Add/del external address to FIB */
   /* *INDENT-OFF* */
-  pool_foreach (interface, nm->interfaces,
-  ({
+  pool_foreach (interface, nm->interfaces)
+   {
     if (nat64_interface_is_inside(interface))
       continue;
 
     nat64_add_del_addr_to_fib (addr, 32, interface->sw_if_index, is_add);
     break;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -547,14 +547,14 @@ nat64_interface_add_del (u32 sw_if_index, u8 is_inside, u8 is_add)
 
   /* Check if interface already exists */
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         interface = i;
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_add)
@@ -642,11 +642,11 @@ nat64_interfaces_walk (nat64_interface_walk_fn_t fn, void *ctx)
   nat64_interface_t *i = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     if (fn (i, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -823,8 +823,8 @@ nat64_static_bib_worker_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
   ip46_address_t addr;
 
   /* *INDENT-OFF* */
-  pool_foreach (static_bib, nm->static_bibs,
-  ({
+  pool_foreach (static_bib, nm->static_bibs)
+   {
     if ((static_bib->thread_index != thread_index) || (static_bib->done))
       continue;
 
@@ -858,7 +858,7 @@ nat64_static_bib_worker_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
       }
 
       static_bib->done = 1;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -978,11 +978,11 @@ nat64_add_del_static_bib_entry (ip6_address_t * in_addr,
   if (nm->num_workers)
     {
       /* *INDENT-OFF* */
-      pool_foreach (static_bib, nm->static_bibs,
-      ({
+      pool_foreach (static_bib, nm->static_bibs)
+       {
         if (static_bib->done)
           vec_add1 (to_be_free, static_bib - nm->static_bibs);
-      }));
+      }
       vec_foreach (index, to_be_free)
         pool_put_index (nm->static_bibs, index[0]);
       /* *INDENT-ON* */
@@ -1567,10 +1567,10 @@ nat64_plugin_disable ()
   nm->enabled = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     vec_add1 (interfaces, *i);
-  }));
+  }
   /* *INDENT-ON* */
   vec_foreach (i, interfaces)
   {
index 49909fd..82ef70d 100644 (file)
@@ -177,11 +177,11 @@ nat64_db_bib_entry_free (u32 thread_index, nat64_db_t * db,
   /* delete ST entries for static BIB entry */
   if (bibe->is_static)
     {
-      pool_foreach (ste, st, (
-                              {
-                              if (ste->bibe_index == bibe_index)
-                              vec_add1 (ste_to_be_free, ste - st);}
-                   ));
+      pool_foreach (ste, st)
+      {
+       if (ste->bibe_index == bibe_index)
+         vec_add1 (ste_to_be_free, ste - st);
+      }
       vec_foreach (ste_index, ste_to_be_free)
        nat64_db_st_entry_free (thread_index, db,
                                pool_elt_at_index (st, ste_index[0]));
@@ -274,17 +274,17 @@ nat64_db_bib_walk (nat64_db_t * db, u8 proto,
     /* *INDENT-OFF* */
     #define _(N, i, n, s) \
       bib = db->bib._##n##_bib; \
-      pool_foreach (bibe, bib, ({ \
+      pool_foreach (bibe, bib)  { \
         if (fn (bibe, ctx)) \
           return; \
-      }));
+      }
       foreach_nat_protocol
     #undef _
       bib = db->bib._unk_proto_bib;
-      pool_foreach (bibe, bib, ({
+      pool_foreach (bibe, bib)  {
         if (fn (bibe, ctx))
           return;
-      }));
+      }
     /* *INDENT-ON* */
     }
   else
@@ -305,11 +305,11 @@ nat64_db_bib_walk (nat64_db_t * db, u8 proto,
        }
 
       /* *INDENT-OFF* */
-      pool_foreach (bibe, bib,
-      ({
+      pool_foreach (bibe, bib)
+       {
         if (fn (bibe, ctx))
           return;
-      }));
+      }
       /* *INDENT-ON* */
     }
 }
@@ -348,17 +348,17 @@ nat64_db_st_walk (nat64_db_t * db, u8 proto,
     /* *INDENT-OFF* */
     #define _(N, i, n, s) \
       st = db->st._##n##_st; \
-      pool_foreach (ste, st, ({ \
+      pool_foreach (ste, st)  { \
         if (fn (ste, ctx)) \
           return; \
-      }));
+      }
       foreach_nat_protocol
     #undef _
       st = db->st._unk_proto_st;
-      pool_foreach (ste, st, ({
+      pool_foreach (ste, st)  {
         if (fn (ste, ctx))
           return;
-      }));
+      }
     /* *INDENT-ON* */
     }
   else
@@ -379,11 +379,11 @@ nat64_db_st_walk (nat64_db_t * db, u8 proto,
        }
 
       /* *INDENT-OFF* */
-      pool_foreach (ste, st,
-      ({
+      pool_foreach (ste, st)
+       {
         if (fn (ste, ctx))
           return;
-      }));
+      }
       /* *INDENT-ON* */
     }
 }
@@ -670,12 +670,12 @@ nad64_db_st_free_expired (u32 thread_index, nat64_db_t * db, u32 now)
 /* *INDENT-OFF* */
 #define _(N, i, n, s) \
   st = db->st._##n##_st; \
-  pool_foreach (ste, st, ({\
+  pool_foreach (ste, st{\
     if (i == NAT_PROTOCOL_TCP && !ste->tcp_state) \
       continue; \
     if (ste->expire < now) \
       vec_add1 (ste_to_be_free, ste - st); \
-  })); \
+  } \
   vec_foreach (ste_index, ste_to_be_free) \
     nat64_db_st_entry_free (thread_index, db, \
                             pool_elt_at_index(st, ste_index[0])); \
@@ -684,10 +684,10 @@ nad64_db_st_free_expired (u32 thread_index, nat64_db_t * db, u32 now)
   foreach_nat_protocol
 #undef _
   st = db->st._unk_proto_st;
-  pool_foreach (ste, st, ({
+  pool_foreach (ste, st)  {
     if (ste->expire < now)
       vec_add1 (ste_to_be_free, ste - st);
-  }));
+  }
   vec_foreach (ste_index, ste_to_be_free)
     nat64_db_st_entry_free (thread_index, db,
                             pool_elt_at_index(st, ste_index[0]));
@@ -707,11 +707,11 @@ nat64_db_free_out_addr (u32 thread_index,
 /* *INDENT-OFF* */
 #define _(N, i, n, s) \
   st = db->st._##n##_st; \
-  pool_foreach (ste, st, ({ \
+  pool_foreach (ste, st{ \
     bibe = pool_elt_at_index (db->bib._##n##_bib, ste->bibe_index); \
     if (bibe->out_addr.as_u32 == out_addr->as_u32) \
       vec_add1 (ste_to_be_free, ste - st); \
-  })); \
+  } \
   vec_foreach (ste_index, ste_to_be_free) \
     nat64_db_st_entry_free (thread_index, db, \
                             pool_elt_at_index(st, ste_index[0])); \
@@ -720,11 +720,11 @@ nat64_db_free_out_addr (u32 thread_index,
   foreach_nat_protocol
 #undef _
   st = db->st._unk_proto_st;
-  pool_foreach (ste, st, ({
+  pool_foreach (ste, st)  {
     bibe = pool_elt_at_index (db->bib._unk_proto_bib, ste->bibe_index);
     if (bibe->out_addr.as_u32 == out_addr->as_u32)
       vec_add1 (ste_to_be_free, ste - st);
-  }));
+  }
   vec_foreach (ste_index, ste_to_be_free)
     nat64_db_st_entry_free (thread_index, db,
                             pool_elt_at_index(st, ste_index[0]));
index 0a90f73..a8de3f6 100644 (file)
@@ -94,14 +94,14 @@ nat66_interface_add_del (u32 sw_if_index, u8 is_inside, u8 is_add)
   const char *feature_name;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     if (i->sw_if_index == sw_if_index)
       {
         interface = i;
         break;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (is_add)
@@ -139,11 +139,11 @@ nat66_interfaces_walk (nat66_interface_walk_fn_t fn, void *ctx)
   nat66_interface_t *i = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     if (fn (i, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -257,11 +257,11 @@ nat66_static_mappings_walk (nat66_static_mapping_walk_fn_t fn, void *ctx)
   nat66_static_mapping_t *sm = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (sm, nm->sm,
-  ({
+  pool_foreach (sm, nm->sm)
+   {
     if (fn (sm, ctx))
       break;
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 4c4d3ab..356100f 100644 (file)
@@ -95,12 +95,12 @@ nat66_not_translate (u32 rx_fib_index, ip6_address_t ip6_addr)
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (i, nm->interfaces,
-  ({
+  pool_foreach (i, nm->interfaces)
+   {
     /* NAT packet aimed at outside interface */
     if (nat66_interface_is_outside (i) && sw_if_index == i->sw_if_index)
       return 0;
-  }));
+  }
   /* *INDENT-ON* */
 
   return 1;
index f0e7a5d..90faeb9 100644 (file)
@@ -234,10 +234,10 @@ format_snat_static_mapping (u8 * s, va_list * args)
                    clib_net_to_host_u16 (m->local_port));
 
       /* *INDENT-OFF* */
-      pool_foreach (local, m->locals,
-      ({
+      pool_foreach (local, m->locals)
+       {
         s = format (s, " vrf %d", local->vrf_id);
-      }));
+      }
       /* *INDENT-ON* */
 
       return s;
@@ -264,13 +264,13 @@ format_snat_static_mapping (u8 * s, va_list * args)
                      is_out2in_only_static_mapping (m) ? "out2in-only" : "");
 
           /* *INDENT-OFF* */
-          pool_foreach (local, m->locals,
-          ({
+          pool_foreach (local, m->locals)
+           {
            s = format (s, "\n  local %U:%d vrf %d probability %d\%",
                        format_ip4_address, &local->addr,
                         clib_net_to_host_u16 (local->port),
                        local->vrf_id, local->probability);
-          }));
+          }
           /* *INDENT-ON* */
 
        }
index 3d0f5ba..ccb9cdf 100644 (file)
@@ -713,11 +713,11 @@ snat_not_translate_fast (snat_main_t * sm, vlib_node_runtime_t * node,
 
       snat_interface_t *i;
       /* *INDENT-OFF* */
-      pool_foreach (i, sm->interfaces, ({
+      pool_foreach (i, sm->interfaces)  {
         /* NAT packet aimed at outside interface */
        if ((nat_interface_is_outside (i)) && (sw_if_index == i->sw_if_index))
           return 0;
-      }));
+      }
       /* *INDENT-ON* */
     }
 
index 57e5e6c..63e6a98 100644 (file)
@@ -64,11 +64,11 @@ nsh_md2_ioam_clear_output_feature_on_all_intfs (vlib_main_t * vm)
   vnet_main_t *vnm = vnet_get_main ();
   vnet_interface_main_t *im = &vnm->interface_main;
 
-  pool_foreach (si, im->sw_interfaces, (
+  pool_foreach (si, im->sw_interfaces)
                                         {
                                         nsh_md2_ioam_set_clear_output_feature_on_intf
                                         (vm, si->sw_if_index, 0);
-                                        }));
+                                        }
   return;
 }
 
@@ -305,7 +305,7 @@ nsh_md2_ioam_refresh_output_feature_on_all_dest (void)
   i = vec_len (hm->bool_ref_by_sw_if_index);
   vec_free (hm->bool_ref_by_sw_if_index);
   vec_validate_init_empty (hm->bool_ref_by_sw_if_index, i, ~0);
-  pool_foreach (t, hm->dst_tunnels, (
+  pool_foreach (t, hm->dst_tunnels)
                                      {
                                      nsh_md2_ioam_enable_disable_for_dest
                                      (gm->vlib_main,
@@ -315,7 +315,6 @@ nsh_md2_ioam_refresh_output_feature_on_all_dest (void)
                                       /* is_add */
                                      );
                                      }
-               ));
   return;
 }
 
@@ -382,7 +381,7 @@ int nsh_md2_ioam_disable_for_dest
       return 0;
     }
 
-  pool_foreach (t, hm->dst_tunnels, (
+  pool_foreach (t, hm->dst_tunnels)
                                      {
                                      nsh_md2_ioam_enable_disable_for_dest
                                      (gm->vlib_main,
@@ -391,7 +390,6 @@ int nsh_md2_ioam_disable_for_dest
                                       (t->fp_proto ==
                                        FIB_PROTOCOL_IP4), 1 /* is_add */ );
                                      }
-               ));
   nsh_md2_ioam_clear_output_feature_on_select_intfs ();
   return (0);
 
index 2f40f31..143285e 100644 (file)
@@ -189,12 +189,10 @@ vl_api_nsh_map_dump_t_handler (vl_api_nsh_map_dump_t * mp)
 
   if (~0 == map_index)
     {
-      pool_foreach (t, nm->nsh_mappings, (
-                                          {
-                                          send_nsh_map_details (t, rp,
-                                                                mp->context);
-                                          }
-                   ));
+      pool_foreach (t, nm->nsh_mappings)
+      {
+       send_nsh_map_details (t, rp, mp->context);
+      }
     }
   else
     {
@@ -652,12 +650,10 @@ vl_api_nsh_entry_dump_t_handler (vl_api_nsh_entry_dump_t * mp)
 
   if (~0 == entry_index)
     {
-      pool_foreach (t, nm->nsh_entries, (
-                                         {
-                                         send_nsh_entry_details (t, rp,
-                                                                 mp->context);
-                                         }
-                   ));
+      pool_foreach (t, nm->nsh_entries)
+      {
+       send_nsh_entry_details (t, rp, mp->context);
+      }
     }
   else
     {
index 8bebb72..7bcaf1c 100644 (file)
@@ -141,13 +141,13 @@ nsh_get_adj_by_sw_if_index (u32 sw_if_index)
   adj_index_t ai = ~0;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(ai, adj_pool,
-  ({
+  pool_foreach_index (ai, adj_pool)
+   {
       if (sw_if_index == adj_get_sw_if_index(ai))
       {
         return ai;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return ~0;
@@ -314,13 +314,10 @@ show_nsh_map_command_fn (vlib_main_t * vm,
   if (pool_elts (nm->nsh_mappings) == 0)
     vlib_cli_output (vm, "No nsh maps configured.");
 
-  pool_foreach (map, nm->nsh_mappings, (
-                                        {
-                                        vlib_cli_output (vm, "%U",
-                                                         format_nsh_map,
-                                                         map);
-                                        }
-               ));
+  pool_foreach (map, nm->nsh_mappings)
+  {
+    vlib_cli_output (vm, "%U", format_nsh_map, map);
+  }
 
   return 0;
 }
@@ -615,16 +612,11 @@ show_nsh_entry_command_fn (vlib_main_t * vm,
   if (pool_elts (nm->nsh_entries) == 0)
     vlib_cli_output (vm, "No nsh entries configured.");
 
-  pool_foreach (nsh_entry, nm->nsh_entries, (
-                                             {
-                                             vlib_cli_output (vm, "%U",
-                                                              format_nsh_header,
-                                                              nsh_entry->rewrite);
-                                             vlib_cli_output (vm,
-                                                              "  rewrite_size: %d bytes",
-                                                              nsh_entry->rewrite_size);
-                                             }
-               ));
+  pool_foreach (nsh_entry, nm->nsh_entries)
+  {
+    vlib_cli_output (vm, "%U", format_nsh_header, nsh_entry->rewrite);
+    vlib_cli_output (vm, "  rewrite_size: %d bytes", nsh_entry->rewrite_size);
+  }
 
   return 0;
 }
index 525a864..28d2f45 100644 (file)
@@ -553,10 +553,10 @@ show_pmc_command_fn (vlib_main_t * vm,
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (c, pm->capture_pool,
-  ({
+  pool_foreach (c, pm->capture_pool)
+   {
     vec_add1 (captures, *c);
-  }));
+  }
   /* *INDENT-ON* */
 
   vec_sort_with_function (captures, capture_name_sort);
index 5ad8269..1589725 100644 (file)
@@ -632,10 +632,10 @@ show_pppoe_session_command_fn (vlib_main_t * vm,
   if (pool_elts (pem->sessions) == 0)
     vlib_cli_output (vm, "No pppoe sessions configured...");
 
-  pool_foreach (t, pem->sessions,
-               ({
+  pool_foreach (t, pem->sessions)
+                {
                    vlib_cli_output (vm, "%U",format_pppoe_session, t);
-               }));
+               }
 
   return 0;
 }
index 6da66c8..6705fb6 100644 (file)
@@ -121,10 +121,10 @@ vl_api_pppoe_session_dump_t_handler (vl_api_pppoe_session_dump_t * mp)
   if (~0 == sw_if_index)
     {
       /* *INDENT-OFF* */
-      pool_foreach (t, pem->sessions,
-      ({
+      pool_foreach (t, pem->sessions)
+       {
         send_pppoe_session_details(t, reg, mp->context);
-      }));
+      }
       /* *INDENT-ON* */
     }
   else
index 87a61cc..7f879cc 100644 (file)
@@ -131,13 +131,13 @@ quic_app_cert_key_pair_delete_callback (app_cert_key_pair_t * ckpair)
   for (i = 0; i < num_threads; i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool, ({
+      pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool)  {
        if (crctx->ckpair_index == ckpair->cert_key_index)
          {
            quic_crypto_context_make_key_from_crctx (&kv, crctx);
            clib_bihash_add_del_24_8 (&qm->wrk_ctx[i].crypto_context_hash, &kv, 0 /* is_add */ );
          }
-      }));
+      }
       /* *INDENT-ON* */
     }
   return 0;
@@ -179,9 +179,9 @@ quic_list_crypto_context_command_fn (vlib_main_t * vm,
   for (i = 0; i < num_threads; i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool, ({
+      pool_foreach (crctx, qm->wrk_ctx[i].crypto_ctx_pool)  {
        vlib_cli_output (vm, "[%d][Q]%U", i, format_crypto_context, crctx);
-      }));
+      }
       /* *INDENT-ON* */
     }
   return 0;
@@ -2647,8 +2647,8 @@ quic_show_aggregated_stats (vlib_main_t * vm)
   for (i = 0; i < num_workers + 1; i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (ctx, qm->ctx_pool[i],
-      ({
+      pool_foreach (ctx, qm->ctx_pool[i])
+       {
        if (quic_ctx_is_conn (ctx) && ctx->conn)
          {
            quicly_get_stats (ctx->conn, &st);
@@ -2665,7 +2665,7 @@ quic_show_aggregated_stats (vlib_main_t * vm)
          }
        else if (quic_ctx_is_stream (ctx))
          nstream++;
-      }));
+      }
       /* *INDENT-ON* */
     }
   vlib_cli_output (vm, "-------- Connections --------");
@@ -2822,15 +2822,15 @@ quic_show_connections_command_fn (vlib_main_t * vm,
   for (int i = 0; i < num_workers + 1; i++)
     {
       /* *INDENT-OFF* */
-      pool_foreach (ctx, qm->ctx_pool[i],
-      ({
+      pool_foreach (ctx, qm->ctx_pool[i])
+       {
         if (quic_ctx_is_stream (ctx) && show_stream)
           vlib_cli_output (vm, "%U", quic_format_stream_ctx, ctx);
         else if (quic_ctx_is_listener (ctx) && show_listeners)
           vlib_cli_output (vm, "%U", quic_format_listener_ctx, ctx);
        else if (quic_ctx_is_conn (ctx) && show_conn)
           vlib_cli_output (vm, "%U", quic_format_connection_ctx, ctx);
-      }));
+      }
       /* *INDENT-ON* */
     }
 
index 760061f..241f716 100644 (file)
@@ -378,9 +378,9 @@ show_stn_rules_fn (vlib_main_t * vm,
   stn_main_t *stn = &stn_main;
   u8 *s = 0;
   stn_rule_t *rule;
-  pool_foreach(rule, stn->rules, {
+  pool_foreach (rule, stn->rules) {
       s = format (s, "- %U\n", format_stn_rule, rule);
-  });
+  }
 
   vlib_cli_output(vm, "%v", s);
 
index 818c4a6..e868593 100644 (file)
@@ -85,9 +85,9 @@ vl_api_stn_rules_dump_t_handler (vl_api_stn_rules_dump_t * mp)
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (r, stn->rules,({
+  pool_foreach (r, stn->rules{
     send_stn_rules_details (r, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 5347f82..53dc1a9 100644 (file)
@@ -248,10 +248,10 @@ vl_api_trace_dump_t_handler (vl_api_trace_dump_t * mp)
         /* Filter as directed */
         trace_apply_filter(this_vlib_main);
 
-        pool_foreach (th, tm->trace_buffer_pool,
-        ({
+        pool_foreach (th, tm->trace_buffer_pool)
+         {
           vec_add1 (client_trace_cache[i], th[0]);
-        }));
+        }
 
         /* Sort them by increasing time. */
         if (vec_len (client_trace_cache[i]))
index ad66e76..71342bd 100644 (file)
@@ -556,9 +556,8 @@ show_vmxnet3_fn (vlib_main_t * vm, unformat_input_t * input,
 
   if (vec_len (hw_if_indices) == 0)
     {
-      pool_foreach (vd, vmxm->devices,
-                   vec_add1 (hw_if_indices, vd->hw_if_index);
-       );
+      pool_foreach (vd, vmxm->devices)
+       vec_add1 (hw_if_indices, vd->hw_if_index);
     }
 
   show_vmxnet3 (vm, hw_if_indices, show_descr, show_one_table, which,
index ec0ab2b..8ec10cd 100644 (file)
@@ -661,7 +661,7 @@ vmxnet3_create_if (vlib_main_t * vm, vmxnet3_create_if_args_t * args)
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (vd, vmxm->devices, ({
+  pool_foreach (vd, vmxm->devices)  {
     if (vd->pci_addr.as_u32 == args->addr.as_u32)
       {
        args->rv = VNET_API_ERROR_ADDRESS_IN_USE;
@@ -672,7 +672,7 @@ vmxnet3_create_if (vlib_main_t * vm, vmxnet3_create_if_args_t * args)
                  format_vlib_pci_addr, &args->addr, "pci address in use");
        return;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (args->bind)
index decb7b6..cef0770 100644 (file)
@@ -174,14 +174,14 @@ vl_api_vmxnet3_dump_t_handler (vl_api_vmxnet3_dump_t * mp)
     return;
 
   /* *INDENT-OFF* */
-  pool_foreach (vd, vmxm->devices,
-    ({
+  pool_foreach (vd, vmxm->devices)
+     {
       swif = vnet_get_sw_interface (vnm, vd->sw_if_index);
       if_name = format (if_name, "%U%c", format_vnet_sw_interface_name, vnm,
                        swif, 0);
       send_vmxnet3_details (reg, vd, swif, if_name, mp->context);
       _vec_len (if_name) = 0;
-    }));
+    }
   /* *INDENT-ON* */
 
   vec_free (if_name);
@@ -212,8 +212,8 @@ static void vl_api_sw_vmxnet3_interface_dump_t_handler
     goto bad_sw_if_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (vd, vmxm->devices,
-    ({
+  pool_foreach (vd, vmxm->devices)
+     {
       if ((filter_sw_if_index == ~0) ||
          (vd->sw_if_index == filter_sw_if_index))
        {
@@ -223,7 +223,7 @@ static void vl_api_sw_vmxnet3_interface_dump_t_handler
          send_vmxnet3_details (reg, vd, swif, if_name, mp->context);
          _vec_len (if_name) = 0;
        }
-    }));
+    }
   /* *INDENT-ON* */
 
   BAD_SW_IF_INDEX_LABEL;
index 771cd70..5ee011c 100644 (file)
@@ -423,11 +423,11 @@ vrrp_intf_enable_disable_mcast (u8 enable, u32 sw_if_index, u8 is_ipv6)
   fib_index = mfib_table_get_index_for_sw_if_index (proto, sw_if_index);
 
   /* *INDENT-OFF* */
-  pool_foreach (vr, vrm->vrs,
-  ({
+  pool_foreach (vr, vrm->vrs)
+   {
     if (vrrp_vr_is_ipv6 (vr) == is_ipv6)
       n_vrs++;
-  }));
+  }
   /* *INDENT-ON* */
 
   if (enable)
index 27ca56a..9a206fa 100644 (file)
@@ -216,14 +216,14 @@ vl_api_vrrp_vr_dump_t_handler (vl_api_vrrp_vr_dump_t * mp)
   sw_if_index = htonl (mp->sw_if_index);
 
   /* *INDENT-OFF* */
-  pool_foreach (vr, vmp->vrs, ({
+  pool_foreach (vr, vmp->vrs)  {
 
     if (sw_if_index && (sw_if_index != ~0) &&
        (sw_if_index != vr->config.sw_if_index))
       continue;
 
     send_vrrp_vr_details (vr, reg, mp->context);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -364,14 +364,14 @@ vl_api_vrrp_vr_peer_dump_t_handler (vl_api_vrrp_vr_peer_dump_t * mp)
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (vr, vmp->vrs, ({
+  pool_foreach (vr, vmp->vrs)  {
 
     if (!vec_len (vr->config.peer_addrs))
       continue;
 
     send_vrrp_vr_details (vr, reg, mp->context);
 
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -468,14 +468,14 @@ vl_api_vrrp_vr_track_if_dump_t_handler (vl_api_vrrp_vr_track_if_dump_t * mp)
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (vr, vmp->vrs, ({
+  pool_foreach (vr, vmp->vrs)  {
 
     if (!vec_len (vr->tracking.interfaces))
       continue;
 
     send_vrrp_vr_track_if_details (vr, reg, mp->context);
 
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -511,12 +511,12 @@ vrrp_vr_event (vrrp_vr_t * vr, vrrp_vr_state_t new_state)
   vl_api_registration_t *vl_reg;
 
   /* *INDENT-OFF* */
-  pool_foreach(reg, vam->vrrp_vr_events_registrations,
-  ({
+  pool_foreach (reg, vam->vrrp_vr_events_registrations)
+   {
     vl_reg = vl_api_client_index_to_registration (reg->client_index);
     if (vl_reg)
       send_vrrp_vr_event (reg, vl_reg, vr, new_state);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 447b474..a154a11 100644 (file)
@@ -196,15 +196,14 @@ vrrp_show_vr_command_fn (vlib_main_t * vm,
        break;
     }
 
-  pool_foreach (vr, vmp->vrs, (
-                               {
-
-                               if (sw_if_index && (sw_if_index != ~0) &&
-                                   (sw_if_index != vr->config.sw_if_index))
-                               continue;
-                               vlib_cli_output (vm, "%U", format_vrrp_vr,
-                                                vr);}
-               ));
+  pool_foreach (vr, vmp->vrs)
+  {
+
+    if (sw_if_index && (sw_if_index != ~0) &&
+       (sw_if_index != vr->config.sw_if_index))
+      continue;
+    vlib_cli_output (vm, "%U", format_vrrp_vr, vr);
+  }
 
   return 0;
 }
index 3c59407..f7eb5a1 100644 (file)
@@ -373,11 +373,11 @@ wg_if_walk (wg_if_walk_cb_t fn, void *data)
   index_t wgii;
 
   /* *INDENT-OFF* */
-  pool_foreach_index (wgii, wg_if_pool,
+  pool_foreach_index (wgii, wg_if_pool)
   {
     if (WALK_STOP == fn(wgii, data))
       break;
-  });
+  }
   /* *INDENT-ON* */
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 147adbf..c4f06be
@@ -290,13 +290,13 @@ wg_peer_add (u32 tun_sw_if_index,
     return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
 
   /* *INDENT-OFF* */
-  pool_foreach (peer, wg_peer_pool,
-  ({
+  pool_foreach (peer, wg_peer_pool)
+   {
     if (!memcmp (peer->remote.r_public, public_key, NOISE_PUBLIC_KEY_LEN))
     {
       return (VNET_API_ERROR_ENTRY_ALREADY_EXISTS);
     }
-  }));
+  }
   /* *INDENT-ON* */
 
   if (pool_elts (wg_peer_pool) > MAX_PEERS)
@@ -362,11 +362,11 @@ wg_peer_walk (wg_peer_walk_cb_t fn, void *data)
   index_t peeri;
 
   /* *INDENT-OFF* */
-  pool_foreach_index(peeri, wg_peer_pool,
+  pool_foreach_index (peeri, wg_peer_pool)
   {
     if (WALK_STOP == fn(peeri, data))
       return peeri;
-  });
+  }
   /* *INDENT-ON* */
   return INDEX_INVALID;
 }
index c087655..2834524 100644 (file)
@@ -1288,10 +1288,10 @@ svm_client_scan (const char *root_path)
    * find_or_create.
    */
   /* *INDENT-OFF* */
-  pool_foreach (subp, mp->subregions, ({
+  pool_foreach (subp, mp->subregions)  {
         name = vec_dup (subp->subregion_name);
         vec_add1(svm_names, name);
-      }));
+      }
   /* *INDENT-ON* */
 
   pthread_mutex_unlock (&root_rp->mutex);
index 0f38d7f..61f8372 100644 (file)
@@ -73,10 +73,10 @@ format_all_svm_regions (u8 * s, va_list * args)
    * find_or_create.
    */
   /* *INDENT-OFF* */
-  pool_foreach (subp, mp->subregions, ({
+  pool_foreach (subp, mp->subregions)  {
         name = vec_dup (subp->subregion_name);
         vec_add1(svm_names, name);
-      }));
+      }
   /* *INDENT-ON* */
 
   pthread_mutex_unlock (&root_rp->mutex);
@@ -328,10 +328,10 @@ subregion_repair (char *chroot_path)
    * find_or_create.
    */
   /* *INDENT-OFF* */
-  pool_foreach (subp, mp->subregions, ({
+  pool_foreach (subp, mp->subregions)  {
         name = vec_dup (subp->subregion_name);
         vec_add1(svm_names, name);
-      }));
+      }
   /* *INDENT-ON* */
 
   pthread_mutex_unlock (&root_rp->mutex);
index 73e44ba..0f2412b 100644 (file)
@@ -279,9 +279,9 @@ ldp_init (void)
     }
 
   /* *INDENT-OFF* */
-  pool_foreach (ldpw, ldp->workers, ({
+  pool_foreach (ldpw, ldp->workers)  {
     clib_memset (&ldpw->clib_time, 0, sizeof (ldpw->clib_time));
-  }));
+  }
   /* *INDENT-ON* */
 
   LDBG (0, "LDP initialization: done!");
index d56a209..5beaecd 100644 (file)
@@ -739,7 +739,7 @@ vls_share_sessions (vls_worker_t * vls_parent_wrk, vls_worker_t * vls_wrk)
   vcl_locked_session_t *vls, *parent_vls;
 
   /* *INDENT-OFF* */
-  pool_foreach (vls, vls_wrk->vls_pool, ({
+  pool_foreach (vls, vls_wrk->vls_pool)  {
     /* Initialize sharing on parent session */
     if (vls->shared_data_index == ~0)
       {
@@ -748,7 +748,7 @@ vls_share_sessions (vls_worker_t * vls_parent_wrk, vls_worker_t * vls_wrk)
        vls->shared_data_index = parent_vls->shared_data_index;
       }
     vls_share_session (vls_wrk, vls);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
@@ -1380,11 +1380,11 @@ vls_unshare_vcl_worker_sessions (vcl_worker_t * wrk)
   is_current = current_wrk == wrk->wrk_index;
 
   /* *INDENT-OFF* */
-  pool_foreach (s, wrk->sessions, ({
+  pool_foreach (s, wrk->sessions)  {
     vls = vls_get (vls_si_wi_to_vlsh (s->session_index, wrk->wrk_index));
     if (vls && (is_current || vls_is_shared_by_wrk (vls, current_wrk)))
       vls_unshare_session (vls, wrk);
-  }));
+  }
   /* *INDENT-ON* */
 }
 
index 9c99f66..abad979 100644 (file)
@@ -1284,10 +1284,10 @@ vppcom_app_destroy (void)
   current_wrk = vcl_worker_get_current ();
 
   /* *INDENT-OFF* */
-  pool_foreach (wrk, vcm->workers, ({
+  pool_foreach (wrk, vcm->workers)  {
     if (current_wrk != wrk)
       vcl_worker_cleanup (wrk, 0 /* notify vpp */ );
-  }));
+  }
   /* *INDENT-ON* */
 
   vcl_api_detach (current_wrk);
index c6f71a5..db82ded 100644 (file)
@@ -1077,11 +1077,11 @@ restart_cmd_fn (vlib_main_t * vm, unformat_input_t * input,
 
   /* Close all known open files */
   /* *INDENT-OFF* */
-  pool_foreach(f, fm->file_pool,
-    ({
+  pool_foreach (f, fm->file_pool)
+     {
       if (f->file_descriptor > 2)
         close(f->file_descriptor);
-    }));
+    }
   /* *INDENT-ON* */
 
   /* Exec ourself */
index 2c48643..387b774 100644 (file)
@@ -130,10 +130,10 @@ vlib_node_runtime_update (vlib_main_t * vm, u32 node_index, u32 next_index)
          pf->next_frame_index += n_insert;
       }
       /* *INDENT-OFF* */
-      pool_foreach (pf, nm->suspended_process_frames, ({
+      pool_foreach (pf, nm->suspended_process_frames)  {
          if (pf->next_frame_index != ~0 && pf->next_frame_index >= i)
            pf->next_frame_index += n_insert;
-      }));
+      }
       /* *INDENT-ON* */
 
       r->n_next_nodes = vec_len (node->next_nodes);
index f90f275..1527444 100644 (file)
@@ -258,15 +258,15 @@ trace_apply_filter (vlib_main_t * vm)
    */
   n_accepted = 0;
   /* *INDENT-OFF* */
-  pool_foreach (h, tm->trace_buffer_pool,
-   ({
+  pool_foreach (h, tm->trace_buffer_pool)
+    {
       accept = filter_accept(tm, h[0]);
 
       if ((n_accepted == tm->filter_count) || !accept)
           vec_add1 (traces_to_remove, h);
       else
           n_accepted++;
-  }));
+  }
   /* *INDENT-ON* */
 
   /* remove all traces that we don't want to keep */
@@ -319,10 +319,10 @@ cli_show_trace_buffer (vlib_main_t * vm,
     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)
       {
index 9d26e6e..8120bef 100644 (file)
@@ -3575,7 +3575,7 @@ unix_show_files (vlib_main_t * vm,
                   "Read", "Write", "Error", "File Name", "Description");
 
   /* *INDENT-OFF* */
-  pool_foreach (f, fm->file_pool,(
+  pool_foreach (f, fm->file_pool)
    {
       int rv;
       s = format (s, "/proc/self/fd/%d%c", f->file_descriptor, 0);
@@ -3588,7 +3588,7 @@ unix_show_files (vlib_main_t * vm,
                       f->read_events, f->write_events, f->error_events,
                       path, f->description);
       vec_reset_length (s);
-    }));
+    }
   /* *INDENT-ON* */
   vec_free (s);
 
@@ -3728,7 +3728,7 @@ unix_cli_show_cli_sessions (vlib_main_t * vm,
 
 #define fl(x, y) ( (x) ? toupper((y)) : tolower((y)) )
   /* *INDENT-OFF* */
-  pool_foreach (cf, cm->cli_file_pool, ({
+  pool_foreach (cf, cm->cli_file_pool)  {
     uf = pool_elt_at_index (fm->file_pool, cf->clib_file_index);
     n = vlib_get_node (vm, cf->process_node_index);
     vlib_cli_output (vm,
@@ -3741,7 +3741,7 @@ unix_cli_show_cli_sessions (vlib_main_t * vm,
                     fl (cf->line_mode, 'l'),
                     fl (cf->has_epipe, 'p'),
                     fl (cf->ansi_capable, 'a'));
-  }));
+  }
   /* *INDENT-ON* */
 #undef fl
 
index 18a87b3..f229ecf 100644 (file)
@@ -583,10 +583,10 @@ vl_mem_api_dead_client_scan (api_main_t * am, vl_shmem_hdr_t * shm, f64 now)
   vec_reset_length (confused_indices);
 
   /* *INDENT-OFF* */
-  pool_foreach (regpp, am->vl_clients, ({
+  pool_foreach (regpp, am->vl_clients)  {
       vl_mem_send_client_keepalive_w_reg (am, now, regpp, &dead_indices,
                                           &confused_indices);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* This should "never happen," but if it does, fix it... */
@@ -893,15 +893,15 @@ vl_api_ring_command (vlib_main_t * vm,
 
       /* For horizontal scaling, add a hash table... */
       /* *INDENT-OFF* */
-      pool_foreach (regpp, am->vl_clients,
-      ({
+      pool_foreach (regpp, am->vl_clients)
+       {
         regp = *regpp;
         if (regp && regp->vlib_rp == vlib_rp)
           {
             vlib_cli_output (vm, "%s segment rings:", regp->name);
             goto found;
           }
-      }));
+      }
       vlib_cli_output (vm, "regp %llx not found?", regp);
       continue;
       /* *INDENT-ON* */
index d724164..a5fb86b 100644 (file)
@@ -85,13 +85,13 @@ vl_sock_api_dump_clients (vlib_main_t * vm, api_main_t * am)
   vlib_cli_output (vm, "Socket clients");
   vlib_cli_output (vm, "%20s %8s", "Name", "Fildesc");
     /* *INDENT-OFF* */
-    pool_foreach (reg, sm->registration_pool,
-    ({
+    pool_foreach (reg, sm->registration_pool)
+     {
         if (reg->registration_type == REGISTRATION_TYPE_SOCKET_SERVER) {
             f = vl_api_registration_file (reg);
             vlib_cli_output (vm, "%20s %8d", reg->name, f->file_descriptor);
         }
-    }));
+    }
 /* *INDENT-ON* */
 }
 
@@ -784,11 +784,11 @@ socket_exit (vlib_main_t * vm)
     {
       u32 index;
         /* *INDENT-OFF* */
-        pool_foreach (rp, sm->registration_pool, ({
+        pool_foreach (rp, sm->registration_pool)  {
           vl_api_registration_del_file (rp);
           index = rp->vl_api_registration_pool_index;
           vl_socket_free_registration_index (index);
-        }));
+        }
 /* *INDENT-ON* */
     }
 
index 5a06c65..aca9aac 100644 (file)
@@ -111,8 +111,8 @@ vl_api_client_command (vlib_main_t * vm,
                   "Name", "PID", "Queue Length", "Queue VA", "Health");
 
   /* *INDENT-OFF* */
-  pool_foreach (regpp, am->vl_clients,
-  ({
+  pool_foreach (regpp, am->vl_clients)
+   {
     regp = *regpp;
 
     if (regp)
@@ -134,7 +134,7 @@ vl_api_client_command (vlib_main_t * vm,
                       regpp - am->vl_clients);
         vec_add1 (confused_indices, regpp - am->vl_clients);
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   /* This should "never happen," but if it does, fix it... */
index 5c6ea9b..d389022 100644 (file)
@@ -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* */
         }
     }
index cc28b0b..ba7783f 100644 (file)
@@ -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* */
 }
 
index a6953bd..1d100b0 100644 (file)
@@ -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);
index 2bb4c1d..1facb73 100644 (file)
@@ -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)
index e06a53e..366fba1 100644 (file)
@@ -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
index cf9f053..bdbc9a9 100644 (file)
@@ -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
     {
index a58a77f..b7fca4d 100644 (file)
@@ -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
     {
index 2da3f66..660b07e 100644 (file)
@@ -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
     {
index 0e8cc1e..4383053 100644 (file)
@@ -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);
-        }));
+        }
     }
 }
 
index 9f9ac53..4ddee4a 100644 (file)
@@ -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* */
 }
 
index b0750e9..f489928 100644 (file)
@@ -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* */
 }
 
index 1e7515e..088890a 100644 (file)
@@ -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))
index 62371cd..31d4df0 100644 (file)
@@ -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;
index 89b2ff0..10f4bb0 100644 (file)
@@ -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* */
     }
 
index b65879c..11c2480 100644 (file)
@@ -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;
index 05f9eab..a783369 100644 (file)
@@ -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)
     {
index 785ca48..93ea70b 100644 (file)
@@ -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);
index f7cecef..45897b6 100644 (file)
@@ -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);
     }
 }
 
index bd72284..4d0b663 100644 (file)
@@ -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
index 7a25611..1689459 100644 (file)
@@ -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;
 
index c0c440c..fb876a0 100644 (file)
@@ -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;
index de5f30b..5524974 100644 (file)
@@ -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;
index 677a19f..23a1285 100644 (file)
@@ -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;
index cd753dc..929fed0 100644 (file)
@@ -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;
index 33c29a6..a5fab85 100644 (file)
@@ -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);
index d7503fb..466327b 100644 (file)
@@ -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);
index 08076ec..f48b644 100644 (file)
@@ -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);
index 2ad7c30..184399a 100644 (file)
@@ -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);
 }
index bd22514..4f751a6 100644 (file)
@@ -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);
index 9142c63..a301014 100644 (file)
@@ -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)
     {
index 861edcc..6943166 100644 (file)
@@ -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;
 }
index 9ec32d2..494d010 100644 (file)
@@ -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;
 }
index 7dd6867..aea2534 100644 (file)
@@ -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;
index f4c8efa..e83635a 100644 (file)
@@ -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* */
     }
 
index 5e8ad46..30c8dc4 100644 (file)
@@ -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
index d091913..82dc29b 100644 (file)
@@ -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* */
 }
 
index 4fe655c..240f13f 100644 (file)
@@ -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);
index fa8d5d2..73f70cf 100644 (file)
@@ -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);
index 2dd8e74..78b45a2 100644 (file)
@@ -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));
index 77ea4c5..bb70805 100644 (file)
@@ -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* */
 
index cd753b0..659955a 100644 (file)
@@ -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* */
 
index 3bdb53c..1d0dea8 100644 (file)
@@ -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);
index e90be8b..2c94b70 100644 (file)
@@ -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* */
 }
 
index ce7771f..ecd2fb0 100644 (file)
@@ -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;
index 8f3b0f9..c74f8e5 100644 (file)
@@ -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;
index f1a3606..80a31e8 100644 (file)
@@ -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;
index 7c13f4b..c5c84e5 100644 (file)
@@ -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;
index 2a95c84..ea70bcc 100644 (file)
@@ -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);
index 65b3ee3..9e40246 100644 (file)
@@ -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* */
 }
 
index 97c5b4a..a3d95ee 100644 (file)
@@ -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",
index bab1b65..13fd90d 100644 (file)
@@ -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* */
     }
 
index 98e3685..f44c72c 100644 (file)
@@ -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
index 872fb33..1a8e889 100644 (file)
@@ -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
index a2de1e7..1d92676 100644 (file)
@@ -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
index 7003791..06e7ba0 100644 (file)
@@ -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* */
 }
 
index e0a271d..407ae86 100644 (file)
@@ -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);
 
index 97a4387..4a0f9e7 100644 (file)
@@ -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;
index 71e86ac..d5a971b 100644 (file)
@@ -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* */
 }
 
index 9116df5..a35b619 100644 (file)
@@ -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* */
 }
 
index 746c7fd..2c2f480 100644 (file)
@@ -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);
index 9dc452e..de22cef 100644 (file)
@@ -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* */
     }
 
index 3160e65..59b7de9 100644 (file)
@@ -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;
 }
index 540ce3f..942cd11 100644 (file)
@@ -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;
index 6973380..9c64c4a 100644 (file)
@@ -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);
 
index 14c724b..b5e5bce 100644 (file)
@@ -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;
 }
index 471a689..2d47c3c 100644 (file)
@@ -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);
index 3e734c8..99408f7 100644 (file)
@@ -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);
index 70e8872..25bd353 100644 (file)
@@ -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* */
 }
 
index e0fb9ef..54458ea 100644 (file)
@@ -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
     {
index cb8b5bb..6251986 100644 (file)
@@ -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:
index 975239e..20b0a9e 100644 (file)
@@ -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* */
     }
 
index 1c43c79..b9674be 100644 (file)
@@ -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:
index 1d648f9..65f3f08 100644 (file)
@@ -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);
index 90c0772..d080ae4 100644 (file)
@@ -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* */
     }
 }
index ade76ef..a919754 100644 (file)
@@ -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* */
     }
index 7f5c7bb..34bd6a3 100644 (file)
@@ -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* */
 
     }
index cf4e969..ead3c30 100644 (file)
@@ -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* */
index ceff11c..8f08048 100644 (file)
@@ -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)
index 6696449..b12e78d 100644 (file)
@@ -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++)
     {
index 3c98f41..329cf2b 100644 (file)
@@ -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)
index 6b76025..926cb7c 100644 (file)
@@ -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);
     }
 
index 278111f..cb468b9 100644 (file)
@@ -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* */
 }
 
index f632415..9361907 100644 (file)
@@ -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 */
index a0b151d..3e8a4e4 100644 (file)
@@ -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");
index aa98a45..9db1390 100644 (file)
@@ -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++)
index 07f8678..67e9a14 100644 (file)
@@ -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)
index 69ed416..dc0c99b 100644 (file)
@@ -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* */
 }
 
index 566acbc..5b9d894 100644 (file)
@@ -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* */
 }
 
index 0b1d3d7..28ea560 100644 (file)
@@ -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
index 3f2d54d..fc61c54 100644 (file)
@@ -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)
       {
index a061cc1..d1267cf 100644 (file)
@@ -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)
index 17a1984..2cac7f5 100644 (file)
@@ -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
index 979d98c..e5ca4ec 100644 (file)
@@ -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;
index 7d484c1..711ee66 100644 (file)
@@ -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
index 742103a..bf205ad 100644 (file)
@@ -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)
index 8e5b346..0e51f3d 100644 (file)
@@ -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
index 25dcc03..6007b72 100644 (file)
@@ -581,7 +581,7 @@ static void vl_api_##nn##_t_handler (                                   \
     svm_queue_t * q;                                     \
                                                                         \
     /* One registration only... */                                      \
-    pool_foreach(reg, vam->nn##_registrations,                          \
+    pool_foreach (reg, vam->nn##_registrations)                          \
     ({                                                                  \
         q = vl_api_client_index_to_input_queue (reg->client_index);     \
         if (q) {                                                        \
index 0b5ea30..43a4870 100644 (file)
@@ -667,10 +667,10 @@ do_stat_segment_updates (stat_segment_main_t * sm)
 
   /* *INDENT-OFF* */
   stat_segment_gauges_pool_t *g;
-  pool_foreach(g, sm->gauges,
-  ({
+  pool_foreach (g, sm->gauges)
+   {
     g->fn(&sm->directory_vector[g->directory_index], g->caller_index);
-  }));
+  }
   /* *INDENT-ON* */
 
   /* Heartbeat, so clients detect we're still here */
index 3f8a3e8..4c92f8e 100644 (file)
@@ -160,14 +160,14 @@ format_graph (u8 * s, va_list * args)
 
   s = format (s, "graph %d nodes", pool_elts (g->nodes));
   /* *INDENT-OFF* */
-  pool_foreach (n, g->nodes, ({
+  pool_foreach (n, g->nodes)  {
     s = format (s, "\n%U", format_white_space, indent + 2);
     s = format (s, "%U -> ", format_graph_node, g, n - g->nodes);
     vec_foreach (l, n->next.links)
       s = format (s, "%U (%d), ",
                  format_graph_node, g, l->node_index,
                  l->distance);
-  }));
+  }
   /* *INDENT-ON* */
 
   return s;
index b92dbf3..546a4fe 100644 (file)
@@ -643,7 +643,7 @@ format_pmalloc (u8 * s, va_list * va)
 
 
   /* *INDENT-OFF* */
-  pool_foreach (a, pm->arenas,
+  pool_foreach (a, pm->arenas)
     {
       u32 *page_index;
       s = format (s, "\n%Uarena '%s' pages %u subpage-size %U numa-node %u",
@@ -659,7 +659,7 @@ format_pmalloc (u8 * s, va_list * va)
            s = format (s, "\n%U%U", format_white_space, indent + 4,
                        format_pmalloc_page, pp, verbose);
          }
-    });
+    }
   /* *INDENT-ON* */
 
   return s;
index d7be8cb..116c1cd 100644 (file)
@@ -524,14 +524,14 @@ do {                                                                      \
     vec_foreach() (or plain for-loop) to walk the active index vector.
  */
 
-#define pool_foreach2(VAR,POOL)                                                \
+#define pool_foreach(VAR,POOL)                                         \
   if (POOL)                                                            \
     for (VAR = POOL + pool_get_first_index (POOL);                     \
         VAR < vec_end (POOL);                                          \
         VAR = POOL + pool_get_next_index (POOL, VAR - POOL))
 
-#define pool_foreach(VAR,POOL,BODY)                                    \
-  pool_foreach2(VAR,POOL)                                              \
+#define pool_foreach_old(VAR,POOL,BODY)                                        \
+  pool_foreach(VAR,POOL)                                               \
    { BODY; }
 
 /** Returns pointer to element at given index.
@@ -566,15 +566,15 @@ do {                                                                      \
   _pool_var(rv);                                                        \
 })
 
-#define pool_foreach_index2(i,v)               \
+#define pool_foreach_index(i,v)                \
   if (v)                                       \
     for (i = pool_get_first_index (v);         \
         i < vec_len (v);                       \
         i = pool_get_next_index (v, i))        \
 
 /** Iterate pool by index. */
-#define pool_foreach_index(i,v,body)           \
-  pool_foreach_index2 (i,v)                    \
+#define pool_foreach_index_old(i,v,body)               \
+  pool_foreach_index (i,v)                     \
        { body; }
 
 /**
@@ -589,10 +589,10 @@ do {                                                                      \
 {                                                       \
   uword *_pool_var(ii), *_pool_var(dv) = NULL;          \
                                                         \
-  pool_foreach((VAR), (POOL)                          \
-  ({                                                    \
+  pool_foreach((VAR), (POOL))                          \
+                                                      \
     vec_add1(_pool_var(dv), (VAR) - (POOL));            \
-  }));                                                  \
+  }                                                     \
   vec_foreach(_pool_var(ii), _pool_var(dv))             \
   {                                                     \
     (VAR) = pool_elt_at_index((POOL), *_pool_var(ii));  \
index 4e8e2df..bcbd235 100644 (file)
@@ -78,8 +78,8 @@ main (int argc, char *argv[])
   while (next != ~0);
 
   /* *INDENT-OFF* */
-  pool_foreach (junk, tp,
-  ({
+  pool_foreach (junk, tp)
+   {
     int is_free;
 
     is_free = pool_is_free_index (tp, junk - tp);
@@ -93,7 +93,7 @@ main (int argc, char *argv[])
           if (i != 1 && i != 65)
             clib_warning ("oops, busy index %d reported free", i);
         }
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
index 499cc01..47e5e49 100644 (file)
@@ -317,13 +317,13 @@ test2_single (tw_timer_test_main_t * tm)
       j = 0;
       vec_reset_length (deleted_indices);
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         tw_timer_stop_2t_1w_2048sl (&tm->single_wheel, e->stop_timer_handle);
         vec_add1 (deleted_indices, e - tm->test_elts);
         if (++j >= tm->ntimers / 4)
           goto del_and_re_add;
-      }));
+      }
       /* *INDENT-ON* */
 
     del_and_re_add:
@@ -375,12 +375,12 @@ test2_single (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -456,13 +456,13 @@ test2_double (tw_timer_test_main_t * tm)
       j = 0;
       vec_reset_length (deleted_indices);
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         tw_timer_stop_16t_2w_512sl (&tm->double_wheel, e->stop_timer_handle);
         vec_add1 (deleted_indices, e - tm->test_elts);
         if (++j >= tm->ntimers / 4)
           goto del_and_re_add;
-      }));
+      }
       /* *INDENT-ON* */
 
     del_and_re_add:
@@ -513,12 +513,12 @@ test2_double (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -591,8 +591,8 @@ test2_double_updates (tw_timer_test_main_t * tm)
       j = 0;
 
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         expiration_time = get_expiration_time (tm);
         max_expiration_time = clib_max (expiration_time, max_expiration_time);
        e->expected_to_expire = expiration_time
@@ -601,7 +601,7 @@ test2_double_updates (tw_timer_test_main_t * tm)
                                       expiration_time);
         if (++j >= tm->ntimers / 4)
           goto done;
-      }));
+      }
       /* *INDENT-ON* */
 
     done:
@@ -624,12 +624,12 @@ test2_double_updates (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -707,13 +707,13 @@ test2_triple (tw_timer_test_main_t * tm)
       j = 0;
       vec_reset_length (deleted_indices);
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         tw_timer_stop_4t_3w_256sl (&tm->triple_wheel, e->stop_timer_handle);
         vec_add1 (deleted_indices, e - tm->test_elts);
         if (++j >= tm->ntimers / 4)
           goto del_and_re_add;
-      }));
+      }
       /* *INDENT-ON* */
 
     del_and_re_add:
@@ -764,12 +764,12 @@ test2_triple (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -847,14 +847,14 @@ test2_triple_ov (tw_timer_test_main_t * tm)
       j = 0;
       vec_reset_length (deleted_indices);
       /* *INDENT-OFF* */
-      pool_foreach (e, tm->test_elts,
-      ({
+      pool_foreach (e, tm->test_elts)
+       {
         tw_timer_stop_1t_3w_1024sl_ov (&tm->triple_ov_wheel,
                                        e->stop_timer_handle);
         vec_add1 (deleted_indices, e - tm->test_elts);
         if (++j >= tm->ntimers / 4)
           goto del_and_re_add;
-      }));
+      }
       /* *INDENT-ON* */
 
     del_and_re_add:
@@ -905,8 +905,8 @@ test2_triple_ov (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     TWT (tw_timer) * t;
 
     fformat (stdout, "[%d] expected to expire %d\n",
@@ -914,7 +914,7 @@ test2_triple_ov (tw_timer_test_main_t * tm)
              e->expected_to_expire);
     t = pool_elt_at_index (tm->triple_ov_wheel.timers, e->stop_timer_handle);
     fformat (stdout, "  expiration_time %lld\n", t->expiration_time);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -973,12 +973,12 @@ test1_single (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat(stdout, "[%d] expected to expire %d\n",
                      e - tm->test_elts,
                      e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   fformat (stdout,
@@ -1031,12 +1031,12 @@ test1_double (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat(stdout, "[%d] expected to expire %d\n",
                      e - tm->test_elts,
                      e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   fformat (stdout,
@@ -1089,12 +1089,12 @@ test1_two_timer_double (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat(stdout, "[%d] expected to expire %d\n",
                      e - tm->test_elts,
                      e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   fformat (stdout,
@@ -1169,12 +1169,12 @@ test3_triple_double (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -1253,12 +1253,12 @@ test4_double_double (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
@@ -1337,12 +1337,12 @@ test5_double (tw_timer_test_main_t * tm)
             pool_elts (tm->test_elts));
 
   /* *INDENT-OFF* */
-  pool_foreach (e, tm->test_elts,
-  ({
+  pool_foreach (e, tm->test_elts)
+   {
     fformat (stdout, "[%d] expected to expire %d\n",
              e - tm->test_elts,
              e->expected_to_expire);
-  }));
+  }
   /* *INDENT-ON* */
 
   pool_free (tm->test_elts);
index bbf3012..a6c476b 100644 (file)
@@ -314,10 +314,10 @@ timing_wheel_insert (timing_wheel_t * w, u64 insert_cpu_time, u32 user_data)
       {
        timing_wheel_overflow_elt_t *oe;
        /* *INDENT-OFF* */
-       pool_foreach (oe, w->overflow_pool, ({
+       pool_foreach (oe, w->overflow_pool)  {
          if (oe->user_data == user_data)
            pool_put (w->overflow_pool, oe);
-       }));
+       }
        /* *INDENT-ON* */
       }
 
@@ -398,8 +398,8 @@ timing_wheel_next_expiring_elt_time (timing_wheel_t * w)
       min_t = w->cpu_time_base + min_dt;
 
     /* *INDENT-OFF* */
-    pool_foreach (oe, w->overflow_pool,
-                 ({ min_t = clib_min (min_t, oe->cpu_time); }));
+    pool_foreach (oe, w->overflow_pool)
+                  { min_t = clib_min (min_t, oe->cpu_time); }
     /* *INDENT-ON* */
 
   done:
@@ -503,7 +503,7 @@ advance_cpu_time_base (timing_wheel_t * w, u32 * expired_user_data)
   {
     timing_wheel_overflow_elt_t *oe;
     /* *INDENT-OFF* */
-    pool_foreach (oe, w->overflow_pool, ({
+    pool_foreach (oe, w->overflow_pool)  {
       /* It fits now into 32 bits. */
       if (0 == ((oe->cpu_time - w->cpu_time_base) >> BITS (e->cpu_time_relative_to_base)))
        {
@@ -520,7 +520,7 @@ advance_cpu_time_base (timing_wheel_t * w, u32 * expired_user_data)
            timing_wheel_insert_helper (w, oe->cpu_time, oe->user_data);
          pool_put (w->overflow_pool, oe);
        }
-    }));
+    }
     /* *INDENT-ON* */
   }
   return expired_user_data;