From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v5 5/8] mempool: get the mempool capability Date: Thu, 7 Sep 2017 10:39:24 +0200 Message-ID: <20170907083923.xaungspaexx2rqvf@neon> References: <20170815060743.21076-1-santosh.shukla@caviumnetworks.com> <20170906112834.32378-1-santosh.shukla@caviumnetworks.com> <20170906112834.32378-6-santosh.shukla@caviumnetworks.com> <20170907075903.jyohovh3h3mabvnz@neon> <318a36fa-7c20-d13e-5c91-8a8887c65a99@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com To: santosh Return-path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 6A39A374E for ; Thu, 7 Sep 2017 10:39:31 +0200 (CEST) Content-Disposition: inline In-Reply-To: <318a36fa-7c20-d13e-5c91-8a8887c65a99@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Sep 07, 2017 at 01:45:58PM +0530, santosh wrote: > > The API is correct, but the flags should simply be returned, not or-ed. > > I think it should be kept as simple as possible: a function called > > get_somthing() is expected to return it without doing anything else. > > Sorry if I wasn't clear in my previous message. > > > > If there is a need to do a OR with mp->flags, it has to be done in the caller, > > i.e. rte_mempool_populate_default(). > > > pl. confirm : you want below approach: > > unsigned int flags; > rte_mempool_ops_get_capabilities(mp, &flags) > mp->flags |= flags; > > is that okay with you? i'll queue in v6 > yes, thanks