net/iavf: fix vector mapping with queue
authorJingjing Wu <jingjing.wu@intel.com>
Thu, 28 Jan 2021 15:00:21 +0000 (23:00 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:12 +0000 (18:16 +0100)
Fix the vector mapping with queue by changing the recircle when
exceeds RX_VEC_START + nb_msix;

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/iavf/iavf_ethdev.c

index 5309427..b206572 100644 (file)
@@ -610,15 +610,15 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
                        /* If Rx interrupt is reuquired, and we can use
                         * multi interrupts, then the vec is from 1
                         */
-                       vf->nb_msix = RTE_MIN(vf->vf_res->max_vectors,
-                                             intr_handle->nb_efd);
+                       vf->nb_msix = RTE_MIN(intr_handle->nb_efd,
+                                (uint16_t)(vf->vf_res->max_vectors - 1));
                        vf->msix_base = IAVF_RX_VEC_START;
                        vec = IAVF_RX_VEC_START;
                        for (i = 0; i < dev->data->nb_rx_queues; i++) {
                                qv_map[i].queue_id = i;
                                qv_map[i].vector_id = vec;
                                intr_handle->intr_vec[i] = vec++;
-                               if (vec >= vf->nb_msix)
+                               if (vec >= vf->nb_msix + IAVF_RX_VEC_START)
                                        vec = IAVF_RX_VEC_START;
                        }
                        vf->qv_map = qv_map;