table: remove experimental CRC API for some arches
Checks
Commit Message
x86 and ARM architectures provide a non-experimental implementation for
rte_crc32_u64().
Experimental API rte_crc32_u64_generic() was only exported for other
arches.
Leaving this API exposed could result in portability issues: an
application using rte_crc32_u64_generic() would not compile on x86 or
ARM.
Move this symbol code in the only caller of the table library, and
remove this symbol.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/table/rte_table_hash_func.h | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
@@ -14,23 +14,6 @@ extern "C" {
#include <rte_compat.h>
#include <rte_common.h>
-__rte_experimental
-static inline uint64_t
-rte_crc32_u64_generic(uint64_t crc, uint64_t value)
-{
- int i;
-
- crc = (crc & 0xFFFFFFFFLLU) ^ value;
- for (i = 63; i >= 0; i--) {
- uint64_t mask;
-
- mask = -(crc & 1LLU);
- crc = (crc >> 1LLU) ^ (0x82F63B78LLU & mask);
- }
-
- return crc;
-}
-
#if defined(RTE_ARCH_X86_64)
#include <x86intrin.h>
@@ -48,7 +31,17 @@ rte_crc32_u64(uint64_t crc, uint64_t v)
static inline uint64_t
rte_crc32_u64(uint64_t crc, uint64_t v)
{
- return rte_crc32_u64_generic(crc, v);
+ int i;
+
+ crc = (crc & 0xFFFFFFFFLLU) ^ v;
+ for (i = 63; i >= 0; i--) {
+ uint64_t mask;
+
+ mask = -(crc & 1LLU);
+ crc = (crc >> 1LLU) ^ (0x82F63B78LLU & mask);
+ }
+
+ return crc;
}
#endif