diff options
author | Damjan Marion <damarion@cisco.com> | 2019-08-20 17:51:22 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-09-24 20:55:40 +0000 |
commit | 6aba16230ca8065cf3fc2b608a31b349b5667be5 (patch) | |
tree | 21b1006fe4308fea540202478a09b3a799e15d39 /src/plugins/avf | |
parent | e73bd85033dfd3987e3a06967319102cc9a1e04d (diff) |
avf: fix init when num_rx_queues > num_tx_queues
Type: fix
Fixes: ae91180
Change-Id: Id93b0f4d23ad7022e341e305bbd93ef2fff5787d
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 017002ae357a05ca1ae1b7d8fbc7bbc8063c9e34)
Diffstat (limited to 'src/plugins/avf')
-rw-r--r-- | src/plugins/avf/device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/avf/device.c b/src/plugins/avf/device.c index d7e91d9aa09..b11de27e651 100644 --- a/src/plugins/avf/device.c +++ b/src/plugins/avf/device.c @@ -661,11 +661,11 @@ avf_op_config_vsi_queues (vlib_main_t * vm, avf_device_t * ad) i, rxq->max_pkt_size, rxq->ring_len, rxq->databuffer_size, rxq->dma_ring_addr); - avf_txq_t *q = vec_elt_at_index (ad->txqs, i); txq->vsi_id = ad->vsi_id; + txq->queue_id = i; if (i < vec_len (ad->txqs)) { - txq->queue_id = i; + avf_txq_t *q = vec_elt_at_index (ad->txqs, i); txq->ring_len = q->size; txq->dma_ring_addr = avf_dma_addr (vm, ad, (void *) q->descs); } @@ -857,8 +857,8 @@ avf_device_init (vlib_main_t * vm, avf_main_t * am, avf_device_t * ad, avf_adminq_init (vm, ad); - /* request more queues only if we need them */ - if ((error = avf_request_queues (vm, ad, tm->n_vlib_mains))) + if ((error = avf_request_queues (vm, ad, clib_max (tm->n_vlib_mains, + args->rxq_num)))) { /* we failed to get more queues, but still we want to proceed */ clib_error_free (error); |