diff options
Diffstat (limited to 'src/plugins/vmxnet3/output.c')
-rw-r--r-- | src/plugins/vmxnet3/output.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/vmxnet3/output.c b/src/plugins/vmxnet3/output.c index 2a6418dfa44..5c48549e60d 100644 --- a/src/plugins/vmxnet3/output.c +++ b/src/plugins/vmxnet3/output.c @@ -108,8 +108,7 @@ VNET_DEVICE_CLASS_TX_FN (vmxnet3_device_class) (vlib_main_t * vm, u16 space_left; u16 n_left = frame->n_vectors; vmxnet3_txq_t *txq; - u32 thread_index = vm->thread_index; - u16 qid = thread_index, produce; + u16 qid = vm->thread_index % vd->num_tx_queues, produce; if (PREDICT_FALSE (!(vd->flags & VMXNET3_DEVICE_F_LINK_UP))) { @@ -119,7 +118,7 @@ VNET_DEVICE_CLASS_TX_FN (vmxnet3_device_class) (vlib_main_t * vm, return (0); } - txq = vec_elt_at_index (vd->txqs, qid % vd->num_tx_queues); + txq = vec_elt_at_index (vd->txqs, qid); clib_spinlock_lock_if_init (&txq->lock); vmxnet3_txq_release (vm, vd, txq); @@ -202,8 +201,7 @@ VNET_DEVICE_CLASS_TX_FN (vmxnet3_device_class) (vlib_main_t * vm, } if (PREDICT_TRUE (produce != txq->tx_ring.produce)) - vmxnet3_reg_write_inline (vd, 0, VMXNET3_REG_TXPROD, - txq->tx_ring.produce); + vmxnet3_reg_write_inline (vd, 0, txq->reg_txprod, txq->tx_ring.produce); clib_spinlock_unlock_if_init (&txq->lock); |