summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_api.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/ip/ip_api.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/ip/ip_api.c')
-rw-r--r--src/vnet/ip/ip_api.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 3bdb53cd9ff..1d0dea86443 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -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);