net/avf: fix Rx interrupt mapping
authorJingjing Wu <jingjing.wu@intel.com>
Fri, 11 May 2018 15:09:48 +0000 (23:09 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:32:23 +0000 (22:32 +0100)
Vector used for rx mapping is different if WB_ON_ITR
is supported. The mapping table need to be updated.

Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Cc: stable@dpdk.org
drivers/net/avf/avf_ethdev.c

index a1ae3a2..0ef1f17 100644 (file)
@@ -339,17 +339,18 @@ static int avf_config_rx_queues_irqs(struct rte_eth_dev *dev,
                AVF_WRITE_FLUSH(hw);
                /* map all queues to the same interrupt */
                for (i = 0; i < dev->data->nb_rx_queues; i++)
-                       vf->rxq_map[0] |= 1 << i;
+                       vf->rxq_map[vf->msix_base] |= 1 << i;
        } else {
                if (!rte_intr_allow_others(intr_handle)) {
                        vf->nb_msix = 1;
                        vf->msix_base = AVF_MISC_VEC_ID;
                        for (i = 0; i < dev->data->nb_rx_queues; i++) {
-                               vf->rxq_map[0] |= 1 << i;
+                               vf->rxq_map[vf->msix_base] |= 1 << i;
                                intr_handle->intr_vec[i] = AVF_MISC_VEC_ID;
                        }
                        PMD_DRV_LOG(DEBUG,
-                                   "vector 0 are mapping to all Rx queues");
+                                   "vector %u are mapping to all Rx queues",
+                                   vf->msix_base);
                } else {
                        /* If Rx interrupt is reuquired, and we can use
                         * multi interrupts, then the vec is from 1