summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/virtio')
-rw-r--r--src/vnet/devices/virtio/cli.c5
-rw-r--r--src/vnet/devices/virtio/pci.c4
-rw-r--r--src/vnet/devices/virtio/vhost_user.c27
-rw-r--r--src/vnet/devices/virtio/virtio_api.c15
-rw-r--r--src/vnet/devices/virtio/virtio_process.c4
5 files changed, 25 insertions, 30 deletions
diff --git a/src/vnet/devices/virtio/cli.c b/src/vnet/devices/virtio/cli.c
index 05f9eab18cf..a78336997e2 100644
--- a/src/vnet/devices/virtio/cli.c
+++ b/src/vnet/devices/virtio/cli.c
@@ -231,9 +231,8 @@ show_virtio_pci_fn (vlib_main_t * vm, unformat_input_t * input,
if (vec_len (hw_if_indices) == 0)
{
- pool_foreach (vif, vim->interfaces,
- vec_add1 (hw_if_indices, vif->hw_if_index);
- );
+ pool_foreach (vif, vim->interfaces)
+ vec_add1 (hw_if_indices, vif->hw_if_index);
}
else if (show_device_config)
{
diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c
index 785ca4839c5..93ea70b3b53 100644
--- a/src/vnet/devices/virtio/pci.c
+++ b/src/vnet/devices/virtio/pci.c
@@ -1352,7 +1352,7 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args)
u32 interrupt_count = 0;
/* *INDENT-OFF* */
- pool_foreach (vif, vim->interfaces, ({
+ pool_foreach (vif, vim->interfaces) {
if (vif->pci_addr.as_u32 == args->addr)
{
args->rv = VNET_API_ERROR_ADDRESS_IN_USE;
@@ -1363,7 +1363,7 @@ virtio_pci_create_if (vlib_main_t * vm, virtio_pci_create_if_args_t * args)
" PCI address in use");
return;
}
- }));
+ }
/* *INDENT-ON* */
pool_get (vim->interfaces, vif);
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);
}
}
diff --git a/src/vnet/devices/virtio/virtio_api.c b/src/vnet/devices/virtio/virtio_api.c
index bd72284fd78..4d0b663b3dd 100644
--- a/src/vnet/devices/virtio/virtio_api.c
+++ b/src/vnet/devices/virtio/virtio_api.c
@@ -232,14 +232,13 @@ static void
if (!reg)
return;
- pool_foreach (vif, vmx->interfaces, (
- {
- if (vif->type == VIRTIO_IF_TYPE_PCI)
- {
- virtio_pci_send_sw_interface_details
- (am, reg, vif, mp->context);}
- }
- ));
+ pool_foreach (vif, vmx->interfaces)
+ {
+ if (vif->type == VIRTIO_IF_TYPE_PCI)
+ {
+ virtio_pci_send_sw_interface_details (am, reg, vif, mp->context);
+ }
+ }
}
#define vl_msg_name_crc_list
diff --git a/src/vnet/devices/virtio/virtio_process.c b/src/vnet/devices/virtio/virtio_process.c
index 7a25611bb95..1689459f1cc 100644
--- a/src/vnet/devices/virtio/virtio_process.c
+++ b/src/vnet/devices/virtio/virtio_process.c
@@ -46,7 +46,7 @@ virtio_send_interrupt_process (vlib_main_t * vm,
case ~0:
/* *INDENT-OFF* */
- pool_foreach (vif, vim->interfaces, {
+ pool_foreach (vif, vim->interfaces) {
if (vif->packet_coalesce || vif->packet_buffering)
{
virtio_vring_t *vring;
@@ -59,7 +59,7 @@ virtio_send_interrupt_process (vlib_main_t * vm,
RX_QUEUE_ACCESS (vring->queue_id));
}
}
- });
+ }
/* *INDENT-ON* */
break;