aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/fib
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-12-13 21:47:40 +0100
committerDave Barach <openvpp@barachs.net>2020-12-14 12:14:21 +0000
commitb2c31b685fd2cf28436ca32bc93e23eb24c74878 (patch)
treedc0a1b1ff784445b2cbb0f9b2c07b5bcb4f5a5d0 /src/vnet/fib
parent62c25abaa3e93be5815172d391295a6ab0390122 (diff)
misc: move to new pool_foreach macros
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/fib')
-rw-r--r--src/vnet/fib/fib_entry.c18
-rw-r--r--src/vnet/fib/fib_entry_delegate.c6
-rw-r--r--src/vnet/fib/fib_path.c6
-rw-r--r--src/vnet/fib/fib_path_list.c6
-rw-r--r--src/vnet/fib/fib_urpf_list.c6
-rw-r--r--src/vnet/fib/ip4_fib.c6
-rw-r--r--src/vnet/fib/ip6_fib.c6
-rw-r--r--src/vnet/fib/mpls_fib.c6
8 files changed, 30 insertions, 30 deletions
diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c
index 33c29a6e33c..a5fab8551ce 100644
--- a/src/vnet/fib/fib_entry.c
+++ b/src/vnet/fib/fib_entry.c
@@ -357,14 +357,14 @@ fib_entry_show_memory (void)
pool_len(fib_entry_pool),
sizeof(fib_entry_t));
- pool_foreach(entry, fib_entry_pool,
- ({
+ pool_foreach (entry, fib_entry_pool)
+ {
n_srcs += vec_len(entry->fe_srcs);
vec_foreach(esrc, entry->fe_srcs)
{
n_exts += fib_path_ext_list_length(&esrc->fes_path_exts);
}
- }));
+ }
fib_show_memory_usage("Entry Source",
n_srcs, n_srcs, sizeof(fib_entry_src_t));
@@ -1741,11 +1741,11 @@ fib_table_assert_empty (const fib_table_t *fib_table)
fib_node_index_t *fei, *feis = NULL;
fib_entry_t *fib_entry;
- pool_foreach (fib_entry, fib_entry_pool,
- ({
+ pool_foreach (fib_entry, fib_entry_pool)
+ {
if (fib_entry->fe_fib_index == fib_table->ft_index)
vec_add1 (feis, fib_entry_get_index(fib_entry));
- }));
+ }
if (vec_len(feis))
{
@@ -1787,13 +1787,13 @@ show_fib_entry_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "FIB Entries:");
- pool_foreach_index(fei, fib_entry_pool,
- ({
+ pool_foreach_index (fei, fib_entry_pool)
+ {
vlib_cli_output (vm, "%d@%U",
fei,
format_fib_entry, fei,
FIB_ENTRY_FORMAT_BRIEF);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/fib_entry_delegate.c b/src/vnet/fib/fib_entry_delegate.c
index d7503fbb1b9..466327b7f22 100644
--- a/src/vnet/fib/fib_entry_delegate.c
+++ b/src/vnet/fib/fib_entry_delegate.c
@@ -333,12 +333,12 @@ show_fib_entry_delegate_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "FIB Entry Delegates:");
- pool_foreach_index(fedi, fib_entry_delegate_pool,
- ({
+ pool_foreach_index (fedi, fib_entry_delegate_pool)
+ {
vlib_cli_output (vm, "%d@%U",
fedi,
format_fib_entry_delegate, fedi);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 08076ec63c2..f48b64484cb 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -2821,11 +2821,11 @@ show_fib_path_command (vlib_main_t * vm,
else
{
vlib_cli_output (vm, "FIB Paths");
- pool_foreach_index (pi, fib_path_pool,
- ({
+ pool_foreach_index (pi, fib_path_pool)
+ {
vlib_cli_output (vm, "%U", format_fib_path, pi, 0,
FIB_PATH_FORMAT_FLAGS_NONE);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/fib_path_list.c b/src/vnet/fib/fib_path_list.c
index 2ad7c30e50a..184399aa309 100644
--- a/src/vnet/fib/fib_path_list.c
+++ b/src/vnet/fib/fib_path_list.c
@@ -1474,10 +1474,10 @@ show_fib_path_list_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "FIB Path Lists");
- pool_foreach_index (pli, fib_path_list_pool,
- ({
+ pool_foreach_index (pli, fib_path_list_pool)
+ {
vlib_cli_output (vm, "%U", format_fib_path_list, pli, 0);
- }));
+ }
}
return (NULL);
}
diff --git a/src/vnet/fib/fib_urpf_list.c b/src/vnet/fib/fib_urpf_list.c
index bd225142a1d..4f751a63627 100644
--- a/src/vnet/fib/fib_urpf_list.c
+++ b/src/vnet/fib/fib_urpf_list.c
@@ -207,12 +207,12 @@ show_fib_urpf_list_command (vlib_main_t * vm,
* show all
*/
vlib_cli_output (vm, "FIB uRPF Entries:");
- pool_foreach_index(ui, fib_urpf_list_pool,
- ({
+ pool_foreach_index (ui, fib_urpf_list_pool)
+ {
vlib_cli_output (vm, "%d@%U",
ui,
format_fib_urpf_list, ui);
- }));
+ }
}
return (NULL);
diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c
index 9142c636cdf..a3010149a4d 100644
--- a/src/vnet/fib/ip4_fib.c
+++ b/src/vnet/fib/ip4_fib.c
@@ -616,8 +616,8 @@ ip4_show_fib (vlib_main_t * vm,
break;
}
- pool_foreach (fib_table, im4->fibs,
- ({
+ pool_foreach (fib_table, im4->fibs)
+ {
ip4_fib_t *fib = pool_elt_at_index(im4->v4_fibs, fib_table->ft_index);
fib_source_t source;
u8 *s = NULL;
@@ -704,7 +704,7 @@ ip4_show_fib (vlib_main_t * vm,
ip4_fib_table_show_one(fib, vm, &matching_address,
matching_mask, detail);
}
- }));
+ }
if (memory)
{
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c
index 861edccd4a9..6943166663f 100644
--- a/src/vnet/fib/ip6_fib.c
+++ b/src/vnet/fib/ip6_fib.c
@@ -696,8 +696,8 @@ ip6_show_fib (vlib_main_t * vm,
return (NULL);
}
- pool_foreach (fib_table, im6->fibs,
- ({
+ pool_foreach (fib_table, im6->fibs)
+ {
fib_source_t source;
u8 *s = NULL;
@@ -762,7 +762,7 @@ ip6_show_fib (vlib_main_t * vm,
{
ip6_fib_table_show_one(fib, vm, &matching_address, mask_len, detail);
}
- }));
+ }
return 0;
}
diff --git a/src/vnet/fib/mpls_fib.c b/src/vnet/fib/mpls_fib.c
index 9ec32d2fea6..494d0106bae 100644
--- a/src/vnet/fib/mpls_fib.c
+++ b/src/vnet/fib/mpls_fib.c
@@ -441,8 +441,8 @@ mpls_fib_show (vlib_main_t * vm,
break;
}
- pool_foreach (fib_table, mpls_main.fibs,
- ({
+ pool_foreach (fib_table, mpls_main.fibs)
+ {
fib_source_t source;
u8 *s = NULL;
@@ -470,7 +470,7 @@ mpls_fib_show (vlib_main_t * vm,
{
mpls_fib_table_show_one(mpls_fib_get(fib_table->ft_index), label, vm);
}
- }));
+ }
return 0;
}