summaryrefslogtreecommitdiffstats
path: root/lib/librte_vhost/vhost.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_vhost/vhost.c')
-rw-r--r--lib/librte_vhost/vhost.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 3c3f6a42..36fdfb55 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -202,6 +202,8 @@ alloc_vring_queue_pair(struct virtio_net *dev, uint32_t qp_idx)
dev->virtqueue[virt_tx_q_idx] = virtqueue + VIRTIO_TXQ;
init_vring_queue_pair(dev, qp_idx);
+ rte_spinlock_init(&dev->virtqueue[virt_rx_q_idx]->access_lock);
+ rte_spinlock_init(&dev->virtqueue[virt_tx_q_idx]->access_lock);
dev->virt_qp_nb += 1;