summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/node.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-04-02 11:45:08 +0000
committerDamjan Marion <dmarion@me.com>2019-04-03 14:42:37 +0000
commit09a3bc50b581c72693ff6270da20a68f5781a468 (patch)
treeff87100fec6d34d0bb2301445dcd4c7024884cd7 /src/vnet/devices/virtio/node.c
parent692f9b1205be8e61c0782b0711ec2393f8203e3e (diff)
virtio: Add support for multiqueue
Change-Id: Id71ffa77e977651f219ac09d1feef334851209e1 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/node.c')
-rw-r--r--src/vnet/devices/virtio/node.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vnet/devices/virtio/node.c b/src/vnet/devices/virtio/node.c
index b2f8d04861e..686d90c3d00 100644
--- a/src/vnet/devices/virtio/node.c
+++ b/src/vnet/devices/virtio/node.c
@@ -225,7 +225,7 @@ virtio_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
vnet_main_t *vnm = vnet_get_main ();
u32 thread_index = vm->thread_index;
uword n_trace = vlib_get_trace_count (vm, node);
- virtio_vring_t *vring = vec_elt_at_index (vif->vrings, 0);
+ virtio_vring_t *vring = vec_elt_at_index (vif->rxq_vrings, qid);
u32 next_index = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
const int hdr_sz = vif->virtio_net_hdr_sz;
u32 *to_next = 0;
@@ -364,15 +364,15 @@ VLIB_NODE_FN (virtio_input_node) (vlib_main_t * vm,
foreach_device_and_queue (dq, rt->devices_and_queues)
{
- virtio_if_t *mif;
- mif = vec_elt_at_index (nm->interfaces, dq->dev_instance);
- if (mif->flags & VIRTIO_IF_FLAG_ADMIN_UP)
+ virtio_if_t *vif;
+ vif = vec_elt_at_index (nm->interfaces, dq->dev_instance);
+ if (vif->flags & VIRTIO_IF_FLAG_ADMIN_UP)
{
- if (mif->gso_enabled)
- n_rx += virtio_device_input_inline (vm, node, frame, mif,
+ if (vif->gso_enabled)
+ n_rx += virtio_device_input_inline (vm, node, frame, vif,
dq->queue_id, 1);
else
- n_rx += virtio_device_input_inline (vm, node, frame, mif,
+ n_rx += virtio_device_input_inline (vm, node, frame, vif,
dq->queue_id, 0);
}
}