eal: make u64 reciprocal divisor const
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 21 Mar 2019 19:59:10 +0000 (12:59 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 3 Apr 2019 16:32:41 +0000 (18:32 +0200)
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>
lib/librte_eal/common/include/rte_reciprocal.h

index 3492c73..63e16fd 100644 (file)
@@ -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);