summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/memif/device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/memif/device.c b/src/plugins/memif/device.c
index fcbdc0d89ae..8e902feac08 100644
--- a/src/plugins/memif/device.c
+++ b/src/plugins/memif/device.c
@@ -388,11 +388,12 @@ VNET_DEVICE_CLASS_TX_FN (memif_device_class) (vlib_main_t * vm,
{
ASSERT (tx_queues > 0);
mq = vec_elt_at_index (mif->tx_queues, thread_index % tx_queues);
- clib_spinlock_lock_if_init (&mif->lockp);
}
else
mq = vec_elt_at_index (mif->tx_queues, thread_index);
+ clib_spinlock_lock_if_init (&mif->lockp);
+
from = vlib_frame_vector_args (frame);
n_left = frame->n_vectors;
if (mif->flags & MEMIF_IF_FLAG_ZERO_COPY)