From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const Date: Tue, 02 Apr 2019 18:05:52 +0200 Message-ID: <5398787.mRi1Xo3jJQ@xps> References: <20190321195910.11140-1-stephen@networkplumber.org> <4147107.f6clCcuQYr@xps> <20190402082619.4ea83500@shemminger-XPS-13-9360> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, maxime.coquelin@redhat.com To: Stephen Hemminger Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id DC6454C8F for ; Tue, 2 Apr 2019 18:05:55 +0200 (CEST) In-Reply-To: <20190402082619.4ea83500@shemminger-XPS-13-9360> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 02/04/2019 17:26, Stephen Hemminger: > On Wed, 27 Mar 2019 12:14:44 +0100 > Thomas Monjalon wrote: > > > 21/03/2019 20:59, Stephen Hemminger: > > > The divisor is not modified here. Doesn't really matter for optimizaton > > > since the function is inline already; but helps with expressing > > > intent. > > > > > > Signed-off-by: Stephen Hemminger > > > --- > > > static __rte_always_inline uint64_t > > > -rte_reciprocal_divide_u64(uint64_t a, struct rte_reciprocal_u64 *R) > > > +rte_reciprocal_divide_u64(uint64_t a, const struct rte_reciprocal_u64 *R) > > > > Why not doing the same change for rte_reciprocal_divide()? > It doesn't make sense for rte_reciprocal_divide since rte_reciprocal_divide > is call by value (ie doesn't take a pointer). Oh, you're right. > > Should we advertise such API change? > > No. Since constant is always less intrusive than previous version > all cases will work the same. Yes OK