From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BE8B51B729 for ; Fri, 22 Mar 2019 19:10:00 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D68E0882FF; Fri, 22 Mar 2019 18:09:59 +0000 (UTC) Received: from [10.36.112.59] (ovpn-112-59.ams2.redhat.com [10.36.112.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 279315C234; Fri, 22 Mar 2019 18:09:58 +0000 (UTC) To: Stephen Hemminger , dev@dpdk.org References: <20190321195910.11140-1-stephen@networkplumber.org> From: Maxime Coquelin Message-ID: <719a6842-d8ca-a78e-945d-89eaca1a6626@redhat.com> Date: Fri, 22 Mar 2019 19:09:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190321195910.11140-1-stephen@networkplumber.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 22 Mar 2019 18:09:59 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Mar 2019 18:10:01 -0000 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 > --- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 71BBCA00E6 for ; Fri, 22 Mar 2019 19:10:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1CDB31B731; Fri, 22 Mar 2019 19:10:02 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BE8B51B729 for ; Fri, 22 Mar 2019 19:10:00 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D68E0882FF; Fri, 22 Mar 2019 18:09:59 +0000 (UTC) Received: from [10.36.112.59] (ovpn-112-59.ams2.redhat.com [10.36.112.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 279315C234; Fri, 22 Mar 2019 18:09:58 +0000 (UTC) To: Stephen Hemminger , dev@dpdk.org References: <20190321195910.11140-1-stephen@networkplumber.org> From: Maxime Coquelin Message-ID: <719a6842-d8ca-a78e-945d-89eaca1a6626@redhat.com> Date: Fri, 22 Mar 2019 19:09:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190321195910.11140-1-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 22 Mar 2019 18:09:59 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] rte_reciprocal: make arg to rte_reciprocal_divide_u64 const X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190322180956.jh1jpe_6uLx6MZMCn6CiAYPZDJiH6996uawO4VOcMD8@z> 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 > --- > 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