avf: fix simultaneous txq wrap and tx retry
Type: fix
Fixes:
Ticket:
@@ -376,7 +376,7 @@ VNET_DEVICE_CLASS_TX_FN (avf_device_class) (vlib_main_t * vm,
u32 thread_index = vm->thread_index;
u8 qid = thread_index;
avf_txq_t *txq = vec_elt_at_index (ad->txqs, qid % ad->num_queue_pairs);
- u16 next = txq->next;
+ u16 next;
u16 mask = txq->size - 1;
u32 *buffers = vlib_frame_vector_args (frame);
u16 n_enq, n_left, n_desc, *slot;
@@ -387,6 +387,7 @@ VNET_DEVICE_CLASS_TX_FN (avf_device_class) (vlib_main_t * vm,
n_left = frame->n_vectors;
retry:
+ next = txq->next;
/* release consumed bufs */
if (txq->n_enqueued)
{
