enum rte_hash_sig_compare_function is only used internally. This patch move it out of the public ABI and into the C file.
Signed-off-by: Yoan Picchi <yoan.pic...@arm.com> --- lib/hash/rte_cuckoo_hash.c | 10 ++++++++++ lib/hash/rte_cuckoo_hash.h | 10 +--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c index d87aa52b5b..e1d50e7d40 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -33,6 +33,16 @@ RTE_LOG_REGISTER_DEFAULT(hash_logtype, INFO); #include "rte_cuckoo_hash.h" +/* Enum used to select the implementation of the signature comparison function to use + * eg: A system supporting SVE might want to use a NEON or scalar implementation. + */ +enum rte_hash_sig_compare_function { + RTE_HASH_COMPARE_SCALAR = 0, + RTE_HASH_COMPARE_SSE, + RTE_HASH_COMPARE_NEON, + RTE_HASH_COMPARE_NUM +}; + /* Mask of all flags supported by this version */ #define RTE_HASH_EXTRA_FLAGS_MASK (RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT | \ RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD | \ diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h index a528f1d1a0..26a992419a 100644 --- a/lib/hash/rte_cuckoo_hash.h +++ b/lib/hash/rte_cuckoo_hash.h @@ -134,14 +134,6 @@ struct rte_hash_key { char key[0]; }; -/* All different signature compare functions */ -enum rte_hash_sig_compare_function { - RTE_HASH_COMPARE_SCALAR = 0, - RTE_HASH_COMPARE_SSE, - RTE_HASH_COMPARE_NEON, - RTE_HASH_COMPARE_NUM -}; - /** Bucket structure */ struct __rte_cache_aligned rte_hash_bucket { uint16_t sig_current[RTE_HASH_BUCKET_ENTRIES]; @@ -199,7 +191,7 @@ struct __rte_cache_aligned rte_hash { /**< Custom function used to compare keys. */ enum cmp_jump_table_case cmp_jump_table_idx; /**< Indicates which compare function to use. */ - enum rte_hash_sig_compare_function sig_cmp_fn; + unsigned int sig_cmp_fn; /**< Indicates which signature compare function to use. */ uint32_t bucket_bitmask; /**< Bitmask for getting bucket index from hash signature. */ -- 2.34.1