summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry.c
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/fib_entry.c
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/fib_entry.c')
-rw-r--r--src/vnet/fib/fib_entry.c18
1 files changed, 9 insertions, 9 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);