From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 8CFB3325F for ; Mon, 22 Jan 2018 13:22:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2018 04:22:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,396,1511856000"; d="scan'208";a="21599532" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.48]) ([10.237.220.48]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jan 2018 04:22:57 -0800 To: Ajit Khaparde , dev@dpdk.org References: <20180122062046.81908-1-ajit.khaparde@broadcom.com> <20180122062046.81908-2-ajit.khaparde@broadcom.com> From: Ferruh Yigit Message-ID: <5a97f8ad-5650-1bff-ab07-dfd182e0a01e@intel.com> Date: Mon, 22 Jan 2018 12:22:56 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180122062046.81908-2-ajit.khaparde@broadcom.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 1/5] net/bnxt: fix size of tx ring in HW 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, 22 Jan 2018 12:23:00 -0000 On 1/22/2018 6:20 AM, Ajit Khaparde wrote: > During Tx ring allocation, the actual ring size configured in the HW > ends up being twice the number of txd parameter specified to the driver. > The power of 2 ring size wrongly adds a +1 while sending the ring > create command to the FW. > > Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code") If you request this fix to be backported to the stable trees, please add following line in commit log just below "Fixes:" line: Cc: stable@dpdk.org > Signed-off-by: Ajit Khaparde > --- > drivers/net/bnxt/bnxt_txr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c > index ac77434b7..2f2c87119 100644 > --- a/drivers/net/bnxt/bnxt_txr.c > +++ b/drivers/net/bnxt/bnxt_txr.c > @@ -101,7 +101,7 @@ int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id) > if (ring == NULL) > return -ENOMEM; > txr->tx_ring_struct = ring; > - ring->ring_size = rte_align32pow2(txq->nb_tx_desc + 1); > + ring->ring_size = rte_align32pow2(txq->nb_tx_desc); > ring->ring_mask = ring->ring_size - 1; > ring->bd = (void *)txr->tx_desc_ring; > ring->bd_dma = txr->tx_desc_mapping; >