[PATCH v3 7/7] hash: use abstracted bit count functions
Tyler Retzlaff
roretzla at linux.microsoft.com
Wed Nov 8 00:38:20 CET 2023
Use rte_popcount64 instead of __builtin_popcountl where the argument
type passed to the intrinsic was 64-bits.
Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
lib/hash/rte_cuckoo_hash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index 19ee53a..ccdc3b9 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -2357,7 +2357,7 @@ struct rte_hash *
__rte_hash_lookup_bulk(h, keys, num_keys, positions, hit_mask, data);
/* Return number of hits */
- return __builtin_popcountl(*hit_mask);
+ return rte_popcount64(*hit_mask);
}
@@ -2474,7 +2474,7 @@ struct rte_hash *
positions, hit_mask, data);
/* Return number of hits */
- return __builtin_popcountl(*hit_mask);
+ return rte_popcount64(*hit_mask);
}
int32_t
--
1.8.3.1
More information about the dev
mailing list