net/bnxt: change MSI-X vector to queue mapping
authorRahul Gupta <rahul.gupta@broadcom.com>
Thu, 10 Oct 2019 01:41:49 +0000 (18:41 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:08 +0000 (16:43 +0200)
DPDK PCIe-VFIO framework configures base MSIX vector for interrupts
which is supported by other h/w. In case of bnxt, base MSIX vector
starts with the RX completion queue 0. To comply with the DPDK
framework We need to increase the map index by 1 so that RXTX
completion queues events can be delivered to appropriate event listeners
by kernel VFIO.

Fixes: bd0a14c99f65 ("net/bnxt: use dedicated CPR for async events")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_irq.h
drivers/net/bnxt/bnxt_ring.c

index 5020cd3..0803658 100644 (file)
@@ -58,6 +58,9 @@
 #define BNXT_NUM_ASYNC_CPR(bp) 1
 #endif
 
+#define BNXT_MISC_VEC_ID               RTE_INTR_VEC_ZERO_OFFSET
+#define BNXT_RX_VEC_START              RTE_INTR_VEC_RXTX_OFFSET
+
 /* Chimp Communication Channel */
 #define GRCPF_REG_CHIMP_CHANNEL_OFFSET         0x0
 #define GRCPF_REG_CHIMP_COMM_TRIGGER           0x100
index 1b56e08..ad8a1df 100644 (file)
@@ -6,9 +6,6 @@
 #ifndef _BNXT_IRQ_H_
 #define _BNXT_IRQ_H_
 
-#define BNXT_MISC_VEC_ID               RTE_INTR_VEC_ZERO_OFFSET
-#define BNXT_RX_VEC_START              RTE_INTR_VEC_RXTX_OFFSET
-
 struct bnxt_irq {
        rte_intr_callback_fn    handler;
        unsigned int            vector;
index 886029c..19af727 100644 (file)
@@ -406,7 +406,7 @@ static int bnxt_alloc_cmpl_ring(struct bnxt *bp, int queue_index,
 {
        struct bnxt_ring *cp_ring = cpr->cp_ring_struct;
        uint32_t nq_ring_id = HWRM_NA_SIGNATURE;
-       int cp_ring_index = queue_index + BNXT_NUM_ASYNC_CPR(bp);
+       int cp_ring_index = queue_index + BNXT_RX_VEC_START;
        struct bnxt_cp_ring_info *nqr = bp->rxtx_nq_ring;
        uint8_t ring_type;
        int rc = 0;