summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user.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/devices/virtio/vhost_user.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/devices/virtio/vhost_user.c')
-rw-r--r--src/vnet/devices/virtio/vhost_user.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/vnet/devices/virtio/vhost_user.c b/src/vnet/devices/virtio/vhost_user.c
index f7cecef4d19..45897b66cb6 100644
--- a/src/vnet/devices/virtio/vhost_user.c
+++ b/src/vnet/devices/virtio/vhost_user.c
@@ -1126,7 +1126,7 @@ vhost_user_send_interrupt_process (vlib_main_t * vm,
case ~0:
/* *INDENT-OFF* */
- pool_foreach (vui, vum->vhost_user_interfaces, {
+ pool_foreach (vui, vum->vhost_user_interfaces) {
next_timeout = timeout;
for (qid = 0; qid < VHOST_VRING_MAX_N / 2; qid += 2)
{
@@ -1154,7 +1154,7 @@ vhost_user_send_interrupt_process (vlib_main_t * vm,
if ((next_timeout < timeout) && (next_timeout > 0.0))
timeout = next_timeout;
}
- });
+ }
/* *INDENT-ON* */
break;
@@ -1205,7 +1205,7 @@ vhost_user_process (vlib_main_t * vm,
timeout = 3.0;
/* *INDENT-OFF* */
- pool_foreach (vui, vum->vhost_user_interfaces, {
+ pool_foreach (vui, vum->vhost_user_interfaces) {
if (vui->unix_server_index == ~0) { //Nothing to do for server sockets
if (vui->clib_file_index == ~0)
@@ -1273,7 +1273,7 @@ vhost_user_process (vlib_main_t * vm,
}
}
}
- });
+ }
/* *INDENT-ON* */
}
return 0;
@@ -1408,9 +1408,9 @@ vhost_user_exit (vlib_main_t * vm)
vlib_worker_thread_barrier_sync (vlib_get_main ());
/* *INDENT-OFF* */
- pool_foreach (vui, vum->vhost_user_interfaces, {
+ pool_foreach (vui, vum->vhost_user_interfaces) {
vhost_user_delete_if (vnm, vm, vui->sw_if_index);
- });
+ }
/* *INDENT-ON* */
vlib_worker_thread_barrier_release (vlib_get_main ());
return 0;
@@ -1832,9 +1832,8 @@ vhost_user_dump_ifs (vnet_main_t * vnm, vlib_main_t * vm,
if (!out_vuids)
return -1;
- pool_foreach (vui, vum->vhost_user_interfaces,
- vec_add1 (hw_if_indices, vui->hw_if_index);
- );
+ pool_foreach (vui, vum->vhost_user_interfaces)
+ vec_add1 (hw_if_indices, vui->hw_if_index);
for (i = 0; i < vec_len (hw_if_indices); i++)
{
@@ -2110,9 +2109,8 @@ show_vhost_user_command_fn (vlib_main_t * vm,
}
if (vec_len (hw_if_indices) == 0)
{
- pool_foreach (vui, vum->vhost_user_interfaces,
- vec_add1 (hw_if_indices, vui->hw_if_index);
- );
+ pool_foreach (vui, vum->vhost_user_interfaces)
+ vec_add1 (hw_if_indices, vui->hw_if_index);
}
vlib_cli_output (vm, "Virtio vhost-user interfaces");
vlib_cli_output (vm, "Global:\n coalesce frames %d time %e",
@@ -2509,9 +2507,8 @@ vhost_user_unmap_all (void)
if (vum->dont_dump_vhost_user_memory)
{
- pool_foreach (vui, vum->vhost_user_interfaces,
- unmap_all_mem_regions (vui);
- );
+ pool_foreach (vui, vum->vhost_user_interfaces)
+ unmap_all_mem_regions (vui);
}
}