Skip to contentSkip to conversation

hash: fix broken compatability with 2.0

PATCH In review Stephen Hemminger 2 participants 2 messages Sep 22, 2015 – Oct 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hash: fix broken compatability with 2.0

Version 2.1 must retain source code compatability with 2.0, all structure fields should be retained. If a field is no longer used it should have been marked as deprecated.

Fixes 661e75ef8cac ("hash: rename unused field")
---
 lib/librte_hash/rte_hash.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/librte_hash/rte_hash.h +2 -1
index 175c0bb..47d6e4d 100644
@@ -69,7 +69,8 @@ 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 reserved;		/**< Unused field. Should be set to 0 */
+	uint32_t num_buckets		/**< Unused in current algorithm */
+		__attribute__((deprecated));
 	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. */
Signature · 1 line
2.1.4
#1 lore raw

2015-09-22 16:12, Stephen Hemminger:

Quoted 7 lines

Version 2.1 must retain source code compatability with 2.0, all structure fields should be retained. If a field is no longer used it should have been marked as deprecated.

Fixes 661e75ef8cac ("hash: rename unused field")

This rollback would be only useful for a 2.1 release.