> -----Original Message-----
> From: Wang, Yipeng1
> Sent: Friday, July 6, 2018 8:47 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>
> Cc: dev@dpdk.org; Wang, Yipeng1 <yipeng1.w...@intel.com>; Richardson,
> Bruce <bruce.richard...@intel.com>; honnappa.nagaraha...@arm.com;
> vgu...@caviumnetworks.com; brijesh.s.si...@gmail.com
> Subject: [PATCH v3 4/8] hash: make duplicated code into functions
>
> This commit refactors the hash table lookup/add/del code to remove some code
> duplication. Processing on primary bucket can also apply to secondary bucket
> with same code.
>
> Signed-off-by: Yipeng Wang <yipeng1.w...@intel.com>
> ---
> lib/librte_hash/rte_cuckoo_hash.c | 186
> +++++++++++++++++++-------------------
...
> @@ -838,41 +830,45 @@ __rte_hash_del_key_with_hash(const struct rte_hash
> *h, const void *key,
> if (rte_hash_cmp_eq(key, k->key, h) == 0) {
> remove_entry(h, bkt, i);
>
> + ret = bkt->key_idx[i] - 1;
> + bkt->key_idx[i] = EMPTY_SLOT;
> /*
> * Return index where key is stored,
> * subtracting the first dummy index
> */
> - ret = bkt->key_idx[i] - 1;
> - bkt->key_idx[i] = EMPTY_SLOT;
Actually, this change doesn't look needed, right?
It looks like you are just moving the two lines before the comment.
Apart from this,
Acked-by: Pablo de Lara <pablo.de.lara.gua...@intel.com>