From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ctbri.com.cn (unknown [219.142.69.33]) by dpdk.org (Postfix) with ESMTP id 6DFBA5683 for ; Fri, 4 Dec 2015 04:11:56 +0100 (CET) Received: from localhost.localdomain ([10.9.63.134]) by mail.ctbri.com.cn (Lotus Domino Release 8.5.3FP1) with ESMTP id 2015120411115345-177926 ; Fri, 4 Dec 2015 11:11:53 +0800 From: Yu Nemo Wenbin To: dev@dpdk.org Date: Fri, 4 Dec 2015 11:11:42 +0800 Message-Id: <1449198703-8585-2-git-send-email-yuwb_bjy@ctbri.com.cn> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449198703-8585-1-git-send-email-yuwb_bjy@ctbri.com.cn> References: <1447895712-12159-1-git-send-email-yuwb_bjy@ctbri.com.cn> <1449198703-8585-1-git-send-email-yuwb_bjy@ctbri.com.cn> X-MIMETrack: Itemize by SMTP Server on mailserver/ctbri(Release 8.5.3FP1|March 07, 2012) at 2015/12/04 11:11:53, Serialize by Router on mailserver/ctbri(Release 8.5.3FP1|March 07, 2012) at 2015/12/04 11:11:57, Serialize complete at 2015/12/04 11:11:57 X-TNEFEvaluated: 1 Subject: [dpdk-dev] [PATCH v3 2/3] hash: add rte_hash_set_cmp_func() function. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:11:56 -0000 Add this function to DPDK_2.2 and modified the comments of rte_hash_set_cmp_func(). Signed-off-by: Yu Nemo Wenbin --- lib/librte_hash/rte_hash.h | 4 ++-- lib/librte_hash/rte_hash_version.map | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index 8378a42..dfca5ef 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -66,7 +66,7 @@ typedef uint32_t hash_sig_t; typedef uint32_t (*rte_hash_function)(const void *key, uint32_t key_len, uint32_t init_val); -/** Type of function used to compare the key. It works like the memcmp() */ +/** Type of function used to compare the hash key. */ typedef int (*rte_hash_cmp_eq_t)(const void *key1, const void *key2, size_t key_len); /** @@ -108,7 +108,7 @@ rte_hash_create(const struct rte_hash_parameters *params); /** * Set the rte_hash_set_cmp_func. - * Set the new hash compare function if the default one is not suitable enough. + * Set a new hash compare function other than the default one. * * @note Function pointer does not work with multi-process, so don't use it * in multi-process mode. diff --git a/lib/librte_hash/rte_hash_version.map b/lib/librte_hash/rte_hash_version.map index 3bc1e2c..1aa94f9 100644 --- a/lib/librte_hash/rte_hash_version.map +++ b/lib/librte_hash/rte_hash_version.map @@ -30,6 +30,12 @@ DPDK_2.1 { rte_hash_lookup_data; rte_hash_lookup_with_hash_data; rte_hash_reset; - rte_hash_set_cmp_func; } DPDK_2.0; + +DPDK_2.2 { + global: + + rte_hash_set_cmp_func; + +} DPDK_2.1; -- 1.9.1