net/bnxt: fix double increment of idx during Tx ring alloc
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Mon, 8 Jan 2018 20:24:26 +0000 (12:24 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
We are incrementing idx twice while allocating Tx rings.
Since this is passed to the firmware, it may cause unexpected behavior.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ring.c

index 0fa2f0c..e0ca0e7 100644 (file)
@@ -362,9 +362,6 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
                struct bnxt_ring *ring = txr->tx_ring_struct;
                unsigned int idx = i + 1 + bp->rx_cp_nr_rings;
 
-               /* Account for AGG Rings. AGG ring cnt = Rx Cmpl ring cnt */
-               idx += bp->rx_cp_nr_rings;
-
                /* Tx cmpl */
                rc = bnxt_hwrm_ring_alloc(bp, cp_ring,
                                        HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL,