From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 2CFC5199B1 for ; Thu, 7 Sep 2017 10:57:38 +0200 (CEST) Received: from lfbn-1-18623-73.w90-103.abo.wanadoo.fr ([90.103.154.73] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dpsiO-0004KF-DZ; Thu, 07 Sep 2017 11:03:14 +0200 Received: by droids-corp.org (sSMTP sendmail emulation); Thu, 07 Sep 2017 10:57:30 +0200 Date: Thu, 7 Sep 2017 10:57:30 +0200 From: Olivier MATZ To: santosh Cc: dev@dpdk.org, thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com Message-ID: <20170907085729.vqnjv5qsl2m2bnnw@neon> References: <20170815060743.21076-1-santosh.shukla@caviumnetworks.com> <20170906112834.32378-1-santosh.shukla@caviumnetworks.com> <20170906112834.32378-8-santosh.shukla@caviumnetworks.com> <20170907081349.nznr2qv6f5pgs3ti@neon> <772eb46d-77ed-918f-7b9e-6fbd2d804b2c@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <772eb46d-77ed-918f-7b9e-6fbd2d804b2c@caviumnetworks.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v5 7/8] mempool: introduce block size align flag 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, 07 Sep 2017 08:57:38 -0000 On Thu, Sep 07, 2017 at 01:57:57PM +0530, santosh wrote: > > On Thursday 07 September 2017 01:43 PM, Olivier MATZ wrote: > > On Wed, Sep 06, 2017 at 04:58:33PM +0530, Santosh Shukla wrote: > >> --- a/lib/librte_mempool/rte_mempool.h > >> +++ b/lib/librte_mempool/rte_mempool.h > >> @@ -271,6 +271,10 @@ struct rte_mempool { > >> * Note: This flag should not be passed by application. > >> */ > >> #define MEMPOOL_F_CAPA_PHYS_CONTIG 0x0040 > >> +/** > >> + * Align object start address to total elem size > >> + */ > >> +#define MEMPOOL_F_BLK_ALIGNED_OBJECTS 0x0080 > > Same than with the other flag: since the meaning of this flag is not obvious > > when we read the name, it has to be clearly described. > > - say that it's virtual address > > - say that it implies MEMPOOL_F_CAPA_PHYS_CONTIG > > - say that it can be advertised by a driver and the application should > > not pass it > > > > And, since it shall not be passed by an application, I suggest to add > > _CAPA too (i.e. MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS). > > > Ok, I will elaborate on FLAG description in v6, > and Rename to MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS. > > Can you please suggest are you ok with > checking MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS | _PHYS_CONTIG > in _xmem_size()/_usage(), asked in v4 [1] for same patch. > > [1] http://dpdk.org/dev/patchwork/patch/27600/ > yes, I'm ok with your proposition: - MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS and _PHYS_CONTIG are capa flags, not set by application but by the handler - the help says that _BLK_ALIGNED_OBJECTS implies _PHYS_CONTIG - test both (_BLK_ALIGNED_OBJECTS | _PHYS_CONTIG) in _xmem_size()/_usage()