From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B23A64559B; Fri, 5 Jul 2024 19:45:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CDEA42FB1; Fri, 5 Jul 2024 19:45:44 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id CBE2542F7F for ; Fri, 5 Jul 2024 19:45:32 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3FC781477; Fri, 5 Jul 2024 10:45:57 -0700 (PDT) Received: from ampere-altra-2-3.austin.arm.com (ampere-altra-2-3.austin.arm.com [10.118.14.97]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 265403F73B; Fri, 5 Jul 2024 10:45:32 -0700 (PDT) From: Yoan Picchi To: Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin Cc: dev@dpdk.org, nd@arm.com, Yoan Picchi Subject: [PATCH v11 1/7] hash: make compare signature function enum private Date: Fri, 5 Jul 2024 17:45:20 +0000 Message-Id: <20240705174526.3035295-2-yoan.picchi@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240705174526.3035295-1-yoan.picchi@arm.com> References: <20231020165159.1649282-1-yoan.picchi@arm.com> <20240705174526.3035295-1-yoan.picchi@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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