[dpdk-dev] [PATCH] hash: rename unused field to "reserved"

Bruce Richardson bruce.richardson at intel.com
Mon Jul 13 18:25:51 CEST 2015


The cuckoo hash has a fixed number of entries per bucket, so the
configuration parameter for this is unused. We change this field in the
parameters struct to "reserved" to indicate that there is now no such
parameter value, while at the same time keeping ABI consistency.

Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")

Suggested-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 lib/librte_hash/rte_hash.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
index 68109d5..1cddc07 100644
--- a/lib/librte_hash/rte_hash.h
+++ b/lib/librte_hash/rte_hash.h
@@ -75,7 +75,7 @@ typedef uint32_t (*rte_hash_function)(const void *key, uint32_t key_len,
 struct rte_hash_parameters {
 	const char *name;		/**< Name of the hash. */
 	uint32_t entries;		/**< Total hash table entries. */
-	uint32_t bucket_entries;        /**< Bucket entries. */
+	uint32_t reserved;		/**< Unused field. Should be set to 0 */
 	uint32_t key_len;		/**< Length of hash key. */
 	rte_hash_function hash_func;	/**< Primary Hash function used to calculate hash. */
 	uint32_t hash_func_init_val;	/**< Init value used by hash_func. */
-- 
2.4.3



More information about the dev mailing list