From 9cd270a67856eb8d4ae43e5c84ff5390c6cb4eed Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Tue, 21 Jul 2015 15:10:19 +0100 Subject: [PATCH] hash: move struct field to keep ABI stable In order to keep the ABI consistent with the old hash library, hash_func_init_val field has been moved, so it remains at the same offset as previously, since hash_func and hash_func_init_val are fields accessed by the public function rte_hash_hash and must keep the same offset as older versions. Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation") Signed-off-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index dec18ce066..5cf4af6988 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -105,8 +105,8 @@ struct rte_hash { uint32_t num_buckets; /**< Number of buckets in table. */ uint32_t key_len; /**< Length of hash key. */ rte_hash_function hash_func; /**< Function used to calculate hash. */ - rte_hash_cmp_eq_t rte_hash_cmp_eq; /**< Function used to compare keys. */ uint32_t hash_func_init_val; /**< Init value used by hash_func. */ + rte_hash_cmp_eq_t rte_hash_cmp_eq; /**< Function used to compare keys. */ uint32_t bucket_bitmask; /**< Bitmask for getting bucket index from hash signature. */ uint32_t key_entry_size; /**< Size of each key entry. */ -- 2.20.1