- q = &vd->dma->queues;
- q->tx.cfg.desc_address = vmxnet3_dma_addr (vm, vd, txq->tx_desc);
- q->tx.cfg.comp_address = vmxnet3_dma_addr (vm, vd, txq->tx_comp);
- q->tx.cfg.num_desc = txq->size;
- q->tx.cfg.num_comp = txq->size;
- for (rid = 0; rid < VMXNET3_RX_RING_SIZE; rid++)
- {
- q->rx.cfg.desc_address[rid] = vmxnet3_dma_addr (vm, vd,
+ vec_foreach_index (qid, vd->txqs)
+ {
+ vmxnet3_txq_t *txq = vec_elt_at_index (vd->txqs, qid);
+
+ tx->cfg.desc_address = vmxnet3_dma_addr (vm, vd, txq->tx_desc);
+ tx->cfg.comp_address = vmxnet3_dma_addr (vm, vd, txq->tx_comp);
+ tx->cfg.num_desc = txq->size;
+ tx->cfg.num_comp = txq->size;
+ tx++;
+ }
+
+ vec_foreach_index (qid, vd->rxqs)
+ {
+ vmxnet3_rxq_t *rxq = vec_elt_at_index (vd->rxqs, qid);
+
+ for (rid = 0; rid < VMXNET3_RX_RING_SIZE; rid++)
+ {
+ rx->cfg.desc_address[rid] = vmxnet3_dma_addr (vm, vd,