[dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Thu May 17 10:06:00 CEST 2018


Hi Vijaya,

> -----Original Message-----
> From: Vijaya Mohan Guvva [mailto:vguvva at caviumnetworks.com]
> Sent: Thursday, May 17, 2018 2:27 AM
> To: Richardson, Bruce <bruce.richardson at intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch at intel.com>
> Cc: dev at dpdk.org; Vijaya Mohan Guvva <vguvva at caviumnetworks.com>
> Subject: [PATCH V2] librte_hash: new hash del abi to return stored value
> 

You are actually adding new API, not ABI, so I would reword the commit message.

"hash: add API to return stored value at deletion" maybe?

I would add some information in the commit message and move the changelog (V1, V2 notes)
after the three dashes.
 
> V2:
> Adding another new interface rte_hash_del_key_data to delete key from hash
> table and return stored data.
> 
> V1:
> Add a new key delete interface rte_hash_del_key_with_hash_data to delete the
> key from hash and return the value stored. This is useful for hash users to free
> the data stored in the table after key delete and to avoid maintaining a user data
> array in the dpdk application.
> 
> Signed-off-by: Vijaya Mohan Guvva <vguvva at caviumnetworks.com>
> ---
>  lib/librte_hash/rte_cuckoo_hash.c | 30 +++++++++++++++++++++++---
>  lib/librte_hash/rte_hash.h        | 45
> +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 72 insertions(+), 3 deletions(-)

...

> +int32_t
> +rte_hash_del_key_with_hash_data(const struct rte_hash *h, const void *key,
> +				hash_sig_t sig, void **data);
> +
> +/**
>   * Remove a key from an existing hash table.
>   * This operation is not multi-thread safe
>   * and should only be called from one thread.
> --
> 1.8.3.1

You need to update the version.map file to add the two new functions
(you might need to wait until 18.05 is released, so you can use the 18.08 tag).



More information about the dev mailing list