[dpdk-dev] [PATCH] hash: new function to retrieve a key given its position

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Thu Jun 16 14:23:20 CEST 2016



> -----Original Message-----
> From: Yari Adan Petralanda [mailto:yari.adan.petralanda at ericsson.com]
> Sent: Thursday, June 16, 2016 9:23 AM
> To: Richardson, Bruce; De Lara Guarch, Pablo; Juan Antonio Montesinos
> Delgado
> Cc: dev at dpdk.org
> Subject: [PATCH] hash: new function to retrieve a key given its position
> 
> The function rte_hash_get_key_with_position is added in this patch.
> As the position returned when adding a key is frequently used as an
> offset into an array of user data, this function performs the operation
> of retrieving a key given this offset.
> 
> A possible use case would be to delete a key from the hash table when
> its entry in the array of data has certain value. For instance, the key
> could be a flow 5-tuple, and the value stored in the array a time stamp.
> 
> Signed-off-by: Juan Antonio Montesinos
> <juan.antonio.montesinos.delgado at ericsson.com>
> Signed-off-by: Yari Adan Petralanda <yari.adan.petralanda at ericsson.com>
> 
> ---
>   app/test/test_hash.c                 | 42
> ++++++++++++++++++++++++++++++++++++
>   lib/librte_hash/rte_cuckoo_hash.c    | 18 ++++++++++++++++
>   lib/librte_hash/rte_hash.h           | 18 ++++++++++++++++
>   lib/librte_hash/rte_hash_version.map |  7 ++++++
>   4 files changed, 85 insertions(+)
> 

[...]

> diff --git a/lib/librte_hash/rte_hash_version.map
> b/lib/librte_hash/rte_hash_version.map
> index 4f25436..19a7b26 100644
> --- a/lib/librte_hash/rte_hash_version.map
> +++ b/lib/librte_hash/rte_hash_version.map
> @@ -38,3 +38,10 @@ DPDK_2.2 {
>   	rte_hash_set_cmp_func;
> 
>   } DPDK_2.1;
> +
> +DPDK_16.04 {

This should be DPDK_16.07.

> +	global:
> +
> +	rte_hash_get_key_with_position;
> +
> +}; DPDK_2.2
> --
> 2.1.4
> 



More information about the dev mailing list