af_xdp: fix thread 0 and 1 using one txq slot
Type: fix
@@ -216,8 +216,8 @@ VNET_DEVICE_CLASS_TX_FN (af_xdp_device_class) (vlib_main_t * vm,
vnet_interface_output_runtime_t *ord = (void *) node->runtime_data;
af_xdp_device_t *ad = pool_elt_at_index (rm->devices, ord->dev_instance);
u32 thread_index = vm->thread_index;
- af_xdp_txq_t *txq =
- vec_elt_at_index (ad->txqs, (thread_index - 1) % ad->txq_num);
+ af_xdp_txq_t *txq = vec_elt_at_index (
+ ad->txqs, (thread_index - 1 + ad->txq_num) % ad->txq_num);
u32 *from;
u32 n, n_tx;
int i;
