From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 9277E2BAE for ; Thu, 20 Apr 2017 10:57:45 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 20 Apr 2017 01:57:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,225,1488873600"; d="scan'208";a="91710864" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 20 Apr 2017 01:57:44 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 01:57:44 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 01:57:44 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0319.002; Thu, 20 Apr 2017 16:57:42 +0800 From: "Zhang, Qi Z" To: "Xing, Beilei" , "Wu, Jingjing" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2] net/i40e: fix testpmd setup error when bulk is disabled Thread-Index: AQHSubPD9VBTfM+9Dkm0FChV18BEj6HN9IFw Date: Thu, 20 Apr 2017 08:57:41 +0000 Message-ID: <039ED4275CED7440929022BC67E706115308DBC1@SHSMSX103.ccr.corp.intel.com> References: <1492678296-115636-1-git-send-email-beilei.xing@intel.com> In-Reply-To: <1492678296-115636-1-git-send-email-beilei.xing@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix testpmd setup error when bulk is disabled 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: Thu, 20 Apr 2017 08:57:46 -0000 > -----Original Message----- > From: Xing, Beilei > Sent: Thursday, April 20, 2017 4:52 PM > To: Wu, Jingjing ; Zhang, Qi Z > Cc: dev@dpdk.org > Subject: [PATCH v2] net/i40e: fix testpmd setup error when bulk is disabl= ed >=20 > Testpmd failed to start when > CONFIG_RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC > is disabled, the root cause is the length of sw_ring and queue are incorr= ect > with the above configuration. >=20 > Fixes: 0be295312966 ("net/i40e: fix compile error") >=20 > Signed-off-by: Beilei Xing > --- > v2 change: > Correct the length of queue when BULK is disabled. >=20 > drivers/net/i40e/i40e_rxtx.c | 6 ------ > 1 file changed, 6 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c = index > e5471b1..9f697d7 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -1791,13 +1791,11 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev > *dev, > /* Allocate the maximun number of RX ring hardware descriptor. */ > len =3D I40E_MAX_RING_DESC; >=20 > -#ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC > /** > * Allocating a little more memory because vectorized/bulk_alloc Rx > * functions doesn't check boundaries each time. > */ > len +=3D RTE_PMD_I40E_RX_MAX_BURST; > -#endif >=20 > ring_size =3D RTE_ALIGN(len * sizeof(union i40e_rx_desc), > I40E_DMA_MEM_ALIGN); > @@ -1816,11 +1814,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev > *dev, > rxq->rx_ring_phys_addr =3D rte_mem_phy2mch(rz->memseg_id, > rz->phys_addr); > rxq->rx_ring =3D (union i40e_rx_desc *)rz->addr; >=20 > -#ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC > len =3D (uint16_t)(nb_desc + RTE_PMD_I40E_RX_MAX_BURST); -#else > - len =3D nb_desc; > -#endif >=20 > /* Allocate the software ring. */ > rxq->sw_ring =3D > -- > 2.5.5 Acked-by: Qi Zhang