From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <olivier.matz@6wind.com>
Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67])
 by dpdk.org (Postfix) with ESMTP id 6A39A374E
 for <dev@dpdk.org>; Thu,  7 Sep 2017 10:39:31 +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 <olivier.matz@6wind.com>)
 id 1dpsQr-0004JV-Ro; Thu, 07 Sep 2017 10:45:07 +0200
Received: by droids-corp.org (sSMTP sendmail emulation);
 Thu, 07 Sep 2017 10:39:24 +0200
Date: Thu, 7 Sep 2017 10:39:24 +0200
From: Olivier MATZ <olivier.matz@6wind.com>
To: santosh <santosh.shukla@caviumnetworks.com>
Cc: dev@dpdk.org, thomas@monjalon.net, jerin.jacob@caviumnetworks.com,
 hemant.agrawal@nxp.com
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
Content-Disposition: inline
In-Reply-To: <318a36fa-7c20-d13e-5c91-8a8887c65a99@caviumnetworks.com>
User-Agent: NeoMutt/20170113 (1.7.2)
Subject: Re: [dpdk-dev] [PATCH v5 5/8] mempool: get the mempool capability
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Sep 2017 08:39:31 -0000

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