From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 10BC21B1A7 for ; Mon, 8 Jan 2018 21:24:42 +0100 (CET) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id DA2D730C01B; Mon, 8 Jan 2018 12:24:40 -0800 (PST) Received: from C02PT1RBG8WP.dhcp.broadcom.net (c02pt1rbg8wp.dhcp.broadcom.net [10.136.50.173]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 758C9AC076B; Mon, 8 Jan 2018 12:24:40 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Mon, 8 Jan 2018 12:24:26 -0800 Message-Id: <20180108202437.56305-3-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.14.3 (Apple Git-98) In-Reply-To: <20180108202437.56305-1-ajit.khaparde@broadcom.com> References: <20180108202437.56305-1-ajit.khaparde@broadcom.com> Subject: [dpdk-dev] [PATCH 02/13] net/bnxt: fix double increment of idx during Tx ring alloc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 20:24:42 -0000 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") Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ring.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 0fa2f0c0d..e0ca0e7f3 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -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, -- 2.14.3 (Apple Git-98)