misc: move to new pool_foreach macros
Type: refactor
Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c
index 33c29a6..a5fab85 100644
--- a/src/vnet/fib/fib_entry.c
+++ b/src/vnet/fib/fib_entry.c
@@ -357,14 +357,14 @@
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_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 all
*/
vlib_cli_output (vm, "FIB Entries:");
- pool_foreach_index(fei, fib_entry_pool,
- ({
+ pool_foreach_index (fei, fib_entry_pool)
+ {
vlib_cli_output (vm, "%d@%U",
fei,
format_fib_entry, fei,
FIB_ENTRY_FORMAT_BRIEF);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/fib_entry_delegate.c b/src/vnet/fib/fib_entry_delegate.c
index d7503fb..466327b 100644
--- a/src/vnet/fib/fib_entry_delegate.c
+++ b/src/vnet/fib/fib_entry_delegate.c
@@ -333,12 +333,12 @@
* show all
*/
vlib_cli_output (vm, "FIB Entry Delegates:");
- pool_foreach_index(fedi, fib_entry_delegate_pool,
- ({
+ pool_foreach_index (fedi, fib_entry_delegate_pool)
+ {
vlib_cli_output (vm, "%d@%U",
fedi,
format_fib_entry_delegate, fedi);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 08076ec..f48b644 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -2821,11 +2821,11 @@
else
{
vlib_cli_output (vm, "FIB Paths");
- pool_foreach_index (pi, fib_path_pool,
- ({
+ pool_foreach_index (pi, fib_path_pool)
+ {
vlib_cli_output (vm, "%U", format_fib_path, pi, 0,
FIB_PATH_FORMAT_FLAGS_NONE);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/fib_path_list.c b/src/vnet/fib/fib_path_list.c
index 2ad7c30..184399a 100644
--- a/src/vnet/fib/fib_path_list.c
+++ b/src/vnet/fib/fib_path_list.c
@@ -1474,10 +1474,10 @@
* show all
*/
vlib_cli_output (vm, "FIB Path Lists");
- pool_foreach_index (pli, fib_path_list_pool,
- ({
+ pool_foreach_index (pli, fib_path_list_pool)
+ {
vlib_cli_output (vm, "%U", format_fib_path_list, pli, 0);
- }));
+ }
}
return (NULL);
}
diff --git a/src/vnet/fib/fib_urpf_list.c b/src/vnet/fib/fib_urpf_list.c
index bd22514..4f751a6 100644
--- a/src/vnet/fib/fib_urpf_list.c
+++ b/src/vnet/fib/fib_urpf_list.c
@@ -207,12 +207,12 @@
* show all
*/
vlib_cli_output (vm, "FIB uRPF Entries:");
- pool_foreach_index(ui, fib_urpf_list_pool,
- ({
+ pool_foreach_index (ui, fib_urpf_list_pool)
+ {
vlib_cli_output (vm, "%d@%U",
ui,
format_fib_urpf_list, ui);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c
index 9142c63..a301014 100644
--- a/src/vnet/fib/ip4_fib.c
+++ b/src/vnet/fib/ip4_fib.c
@@ -616,8 +616,8 @@
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_fib_table_show_one(fib, vm, &matching_address,
matching_mask, detail);
}
- }));
+ }
if (memory)
{
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c
index 861edcc..6943166 100644
--- a/src/vnet/fib/ip6_fib.c
+++ b/src/vnet/fib/ip6_fib.c
@@ -696,8 +696,8 @@
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_fib_table_show_one(fib, vm, &matching_address, mask_len, detail);
}
- }));
+ }
return 0;
}
diff --git a/src/vnet/fib/mpls_fib.c b/src/vnet/fib/mpls_fib.c
index 9ec32d2..494d010 100644
--- a/src/vnet/fib/mpls_fib.c
+++ b/src/vnet/fib/mpls_fib.c
@@ -441,8 +441,8 @@
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_table_show_one(mpls_fib_get(fib_table->ft_index), label, vm);
}
- }));
+ }
return 0;
}