From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id EC2DECCFA for ; Fri, 17 Jun 2016 12:47:45 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 17 Jun 2016 03:47:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,483,1459839600"; d="scan'208";a="1004118643" Received: from dhunt5-mobl.ger.corp.intel.com (HELO [10.237.220.29]) ([10.237.220.29]) by fmsmga002.fm.intel.com with ESMTP; 17 Jun 2016 03:47:43 -0700 To: Olivier Matz , dev@dpdk.org References: <1465976824-83823-1-git-send-email-david.hunt@intel.com> <1466080236-112618-1-git-send-email-david.hunt@intel.com> <1466080236-112618-2-git-send-email-david.hunt@intel.com> <5763CE7C.2030909@6wind.com> Cc: viktorin@rehivetech.com, jerin.jacob@caviumnetworks.com, shreyansh.jain@nxp.com From: "Hunt, David" Message-ID: <5763D54F.6010902@intel.com> Date: Fri, 17 Jun 2016 11:47:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <5763CE7C.2030909@6wind.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v13 1/3] mempool: support external mempool operations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 10:47:46 -0000 On 17/6/2016 11:18 AM, Olivier Matz wrote: > Hi David, > > While testing Lazaros' patch, I found an issue in this series. > I the test application is started with --no-huge, it does not work, > the mempool_autotest does not work. Please find the exaplanation > below: > > On 06/16/2016 02:30 PM, David Hunt wrote: >> @@ -386,9 +352,9 @@ rte_mempool_populate_phys(struct rte_mempool *mp, char *vaddr, >> int ret; >> >> /* create the internal ring if not already done */ >> - if ((mp->flags & MEMPOOL_F_RING_CREATED) == 0) { >> - ret = rte_mempool_ring_create(mp); >> - if (ret < 0) >> + if ((mp->flags & MEMPOOL_F_POOL_CREATED) == 0) { >> + ret = rte_mempool_ops_alloc(mp); >> + if (ret != 0) >> return ret; >> } >> > Previously, the function rte_mempool_ring_create(mp) was setting the > MEMPOOL_F_RING_CREATED flag. Now it is not set. I think we could > set it just after the "return ret". > > When started with --no-huge, the mempool memory is allocated in > several chunks (one per page), so it tries to allocate the ring for > each chunk. > > Regards, > Olivier OK, Will do. ret = rte_mempool_ops_alloc(mp); if (ret != 0) return ret; + mp->flags |= MEMPOOL_F_POOL_CREATED; Rgds, Dave.