DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
@ 2019-03-21 19:59 Stephen Hemminger
  2019-03-21 19:59 ` Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Stephen Hemminger @ 2019-03-21 19:59 UTC (permalink / raw)
  To: dev; +Cc: 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>
---
 lib/librte_eal/common/include/rte_reciprocal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/rte_reciprocal.h b/lib/librte_eal/common/include/rte_reciprocal.h
index 3492c73bafea..63e16fde0aa8 100644
--- a/lib/librte_eal/common/include/rte_reciprocal.h
+++ b/lib/librte_eal/common/include/rte_reciprocal.h
@@ -77,7 +77,7 @@ mullhi_u64(uint64_t x, uint64_t y)
 }
 
 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)
 {
 	uint64_t t = mullhi_u64(a, R->m);
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-03-21 19:59 [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const Stephen Hemminger
@ 2019-03-21 19:59 ` Stephen Hemminger
  2019-03-22 18:09 ` Maxime Coquelin
  2019-03-27 11:14 ` Thomas Monjalon
  2 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2019-03-21 19:59 UTC (permalink / raw)
  To: dev; +Cc: 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>
---
 lib/librte_eal/common/include/rte_reciprocal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/rte_reciprocal.h b/lib/librte_eal/common/include/rte_reciprocal.h
index 3492c73bafea..63e16fde0aa8 100644
--- a/lib/librte_eal/common/include/rte_reciprocal.h
+++ b/lib/librte_eal/common/include/rte_reciprocal.h
@@ -77,7 +77,7 @@ mullhi_u64(uint64_t x, uint64_t y)
 }
 
 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)
 {
 	uint64_t t = mullhi_u64(a, R->m);
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-03-21 19:59 [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const 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-03-27 11:14 ` Thomas Monjalon
  2 siblings, 2 replies; 12+ messages in thread
From: Maxime Coquelin @ 2019-03-22 18:09 UTC (permalink / raw)
  To: Stephen Hemminger, dev



On 3/21/19 8:59 PM, Stephen Hemminger wrote:
> 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>
> ---
>   lib/librte_eal/common/include/rte_reciprocal.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/common/include/rte_reciprocal.h b/lib/librte_eal/common/include/rte_reciprocal.h
> index 3492c73bafea..63e16fde0aa8 100644
> --- a/lib/librte_eal/common/include/rte_reciprocal.h
> +++ b/lib/librte_eal/common/include/rte_reciprocal.h
> @@ -77,7 +77,7 @@ mullhi_u64(uint64_t x, uint64_t y)
>   }
>   
>   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)
>   {
>   	uint64_t t = mullhi_u64(a, R->m);
>   
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-03-22 18:09 ` Maxime Coquelin
@ 2019-03-22 18:09   ` Maxime Coquelin
  2019-04-03 16:17   ` Thomas Monjalon
  1 sibling, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2019-03-22 18:09 UTC (permalink / raw)
  To: Stephen Hemminger, dev



On 3/21/19 8:59 PM, Stephen Hemminger wrote:
> 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>
> ---
>   lib/librte_eal/common/include/rte_reciprocal.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/common/include/rte_reciprocal.h b/lib/librte_eal/common/include/rte_reciprocal.h
> index 3492c73bafea..63e16fde0aa8 100644
> --- a/lib/librte_eal/common/include/rte_reciprocal.h
> +++ b/lib/librte_eal/common/include/rte_reciprocal.h
> @@ -77,7 +77,7 @@ mullhi_u64(uint64_t x, uint64_t y)
>   }
>   
>   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)
>   {
>   	uint64_t t = mullhi_u64(a, R->m);
>   
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-03-21 19:59 [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const Stephen Hemminger
  2019-03-21 19:59 ` Stephen Hemminger
  2019-03-22 18:09 ` Maxime Coquelin
@ 2019-03-27 11:14 ` Thomas Monjalon
  2019-03-27 11:14   ` Thomas Monjalon
  2019-04-02 15:26   ` Stephen Hemminger
  2 siblings, 2 replies; 12+ messages in thread
From: Thomas Monjalon @ 2019-03-27 11:14 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, maxime.coquelin

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()?

Should we advertise such API change?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-03-27 11:14 ` Thomas Monjalon
@ 2019-03-27 11:14   ` Thomas Monjalon
  2019-04-02 15:26   ` Stephen Hemminger
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2019-03-27 11:14 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, maxime.coquelin

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()?

Should we advertise such API change?



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-03-27 11:14 ` Thomas Monjalon
  2019-03-27 11:14   ` Thomas Monjalon
@ 2019-04-02 15:26   ` Stephen Hemminger
  2019-04-02 15:26     ` Stephen Hemminger
  2019-04-02 16:05     ` Thomas Monjalon
  1 sibling, 2 replies; 12+ messages in thread
From: Stephen Hemminger @ 2019-04-02 15:26 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, maxime.coquelin

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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-04-02 15:26   ` Stephen Hemminger
@ 2019-04-02 15:26     ` Stephen Hemminger
  2019-04-02 16:05     ` Thomas Monjalon
  1 sibling, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2019-04-02 15:26 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, maxime.coquelin

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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-04-02 15:26   ` Stephen Hemminger
  2019-04-02 15:26     ` Stephen Hemminger
@ 2019-04-02 16:05     ` Thomas Monjalon
  2019-04-02 16:05       ` Thomas Monjalon
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2019-04-02 16:05 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, maxime.coquelin

02/04/2019 17:26, Stephen Hemminger:
> 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).

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-04-02 16:05     ` Thomas Monjalon
@ 2019-04-02 16:05       ` Thomas Monjalon
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2019-04-02 16:05 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, maxime.coquelin

02/04/2019 17:26, Stephen Hemminger:
> 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).

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



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  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
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2019-04-03 16:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Maxime Coquelin

22/03/2019 19:09, Maxime Coquelin:
> On 3/21/19 8:59 PM, Stephen Hemminger wrote:
> > 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>
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const
  2019-04-03 16:17   ` Thomas Monjalon
@ 2019-04-03 16:17     ` Thomas Monjalon
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2019-04-03 16:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Maxime Coquelin

22/03/2019 19:09, Maxime Coquelin:
> On 3/21/19 8:59 PM, Stephen Hemminger wrote:
> > 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>
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Applied, thanks



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-04-03 16:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 19:59 [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const 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
2019-04-02 15:26     ` Stephen Hemminger
2019-04-02 16:05     ` Thomas Monjalon
2019-04-02 16:05       ` Thomas Monjalon

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).