From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH v13 1/3] mempool: support external mempool operations Date: Fri, 17 Jun 2016 12:18:36 +0200 Message-ID: <5763CE7C.2030909@6wind.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: viktorin@rehivetech.com, jerin.jacob@caviumnetworks.com, shreyansh.jain@nxp.com To: David Hunt , dev@dpdk.org Return-path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id DABC9CC76 for ; Fri, 17 Jun 2016 12:18:51 +0200 (CEST) In-Reply-To: <1466080236-112618-2-git-send-email-david.hunt@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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