DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, maxime.coquelin@redhat.com
Subject: Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
Date: Tue, 2 Apr 2019 08:26:19 -0700	[thread overview]
Message-ID: <20190402082619.4ea83500@shemminger-XPS-13-9360> (raw)
Message-ID: <20190402152619.72Zh2ZhKb7CiN-gPtufiq8VVE1CW5Mq-pCyiMtkaAXI@z> (raw)
In-Reply-To: <4147107.f6clCcuQYr@xps>

On Wed, 27 Mar 2019 12:14:44 +0100
Thomas Monjalon <thomas@monjalon.net> 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 <stephen@networkplumber.org>
> > ---
> >  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).


> Should we advertise such API change?

No. Since constant is always less intrusive than previous version
all cases will work the same.

  parent reply	other threads:[~2019-04-02 15:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 19:59 Stephen Hemminger
2019-03-21 19:59 ` Stephen Hemminger
2019-03-22 18:09 ` Maxime Coquelin
2019-03-22 18:09   ` Maxime Coquelin
2019-04-03 16:17   ` Thomas Monjalon
2019-04-03 16:17     ` Thomas Monjalon
2019-03-27 11:14 ` Thomas Monjalon
2019-03-27 11:14   ` Thomas Monjalon
2019-04-02 15:26   ` Stephen Hemminger [this message]
2019-04-02 15:26     ` Stephen Hemminger
2019-04-02 16:05     ` Thomas Monjalon
2019-04-02 16:05       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190402082619.4ea83500@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).