summaryrefslogtreecommitdiffstats
path: root/src/plugins/lisp/lisp-gpe
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/plugins/lisp/lisp-gpe
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/plugins/lisp/lisp-gpe')
-rw-r--r--src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c6
-rw-r--r--src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c24
-rw-r--r--src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c6
-rw-r--r--src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c12
-rw-r--r--src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c6
5 files changed, 27 insertions, 27 deletions
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c
index d93f3abaad2..8d20412a1f2 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c
@@ -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* */
}
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c
index 00d5af4922a..5f196fb22e3 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -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;
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c
index b84c76f0103..9c48c0064ca 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c
@@ -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;
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c
index fb6aa1ac1d5..b6173b273c0 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_tenant.c
@@ -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;
diff --git a/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c b/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c
index b2426429322..14ee095d2de 100644
--- a/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c
+++ b/src/plugins/lisp/lisp-gpe/lisp_gpe_tunnel.c
@@ -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* */
}