summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2015-12-14 23:00:17 +0100
committerDamjan Marion <damarion@cisco.com>2015-12-14 23:16:17 +0100
commit539cff0356a26db4043012402f867a6c0e990bee (patch)
treea4249a6d7bb1e3b7796274cce95d1311714ff50d /vnet
parentf9bd620dc5299180cb639c4c6f91fadf6b860b08 (diff)
Fix vhost-user input interface handling
Change-Id: I2d4b819d959fa2ab0a2eebccb1d574bc5e1a6a6d Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/devices/virtio/vhost-user.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/vnet/vnet/devices/virtio/vhost-user.c b/vnet/vnet/devices/virtio/vhost-user.c
index 4df025c21b6..20a4c021c6a 100644
--- a/vnet/vnet/devices/virtio/vhost-user.c
+++ b/vnet/vnet/devices/virtio/vhost-user.c
@@ -987,11 +987,9 @@ vhost_user_input (vlib_main_t * vm,
for(i = 0; i < vec_len(vum->vhost_user_interfaces); i++ )
{
vui = vec_elt_at_index(vum->vhost_user_interfaces, i);
- if (!vui->is_up ||
+ if (vui->is_up &&
(i % dm->input_cpu_count) == (cpu_index - dm->input_cpu_first_index))
- continue;
- n_rx_packets +=
- vhost_user_if_input (vm, vum, vui, node);
+ n_rx_packets += vhost_user_if_input (vm, vum, vui, node);
}
return n_rx_packets;
}