From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A92E9A0C41; Sat, 9 Oct 2021 06:43:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E19440040; Sat, 9 Oct 2021 06:43:17 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id EB9A64003C; Sat, 9 Oct 2021 06:43:15 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10131"; a="312829844" X-IronPort-AV: E=Sophos;i="5.85,360,1624345200"; d="scan'208";a="312829844" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2021 21:43:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,360,1624345200"; d="scan'208";a="440856104" Received: from irsmsx601.ger.corp.intel.com ([163.33.146.7]) by orsmga003.jf.intel.com with ESMTP; 08 Oct 2021 21:43:13 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by irsmsx601.ger.corp.intel.com (163.33.146.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sat, 9 Oct 2021 05:43:11 +0100 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.012; Sat, 9 Oct 2021 12:43:08 +0800 From: "Zhang, Qi Z" To: "Wang, Haiyue" , "Meunier, Julien" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Richardson, Bruce" Thread-Topic: [PATCH v2] net/ixgbe: fix RxQ/TxQ release Thread-Index: AQHXtGMRdOx3jeT94E+jx1+yizpIGavKJ3VA Date: Sat, 9 Oct 2021 04:43:08 +0000 Message-ID: References: <20210927171815.16216-1-julien.meunier@nokia.com> <20210928081238.16782-1-julien.meunier@nokia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix RxQ/TxQ release X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: dev On Behalf Of Wang, Haiyue > Sent: Tuesday, September 28, 2021 8:19 PM > To: Meunier, Julien ; dev@dpdk.org > Cc: stable@dpdk.org; Richardson, Bruce > Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix RxQ/TxQ release >=20 > > -----Original Message----- > > From: Julien Meunier > > Sent: Tuesday, September 28, 2021 16:13 > > To: dev@dpdk.org > > Cc: stable@dpdk.org; Richardson, Bruce ; > > Wang, Haiyue > > Subject: [PATCH v2] net/ixgbe: fix RxQ/TxQ release > > > > On the vector implementation, during the tear-down, the mbufs not > > drained in the RxQ and TxQ are freed based on an algorithm which > > supposed that the number of descriptors is a power of 2 (max_desc). > > Based on this hypothesis, this algorithm uses a bitmask in order to > > detect an index overflow during the iteration, and to restart the loop > > from 0. > > > > However, there is no such power of 2 requirement in the ixgbe for the > > number of descriptors in the RxQ / TxQ. The only requirement is to > > have a number correctly aligned. > > > > If a user requested to configure a number of descriptors which is not > > a power of 2, as a consequence, during the tear-down, it was possible > > to be in an infinite loop, and to never reach the exit loop condition. > > > > By removing the bitmask and changing the loop method, we can avoid > > this issue, and allow the user to configure a RxQ / TxQ which is not a > > power of 2. > > > > Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx") > > Cc: bruce.richardson@intel.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Julien Meunier > > --- > > drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > >=20 > Acked-by: Haiyue Wang Applied to dpdk-next-net-intel. Thanks Qi >=20 > > -- > > 2.17.1