Thread (1 message) 1 message, 1 author, 2016-06-16

Re: [PATCH] hash: new function to retrieve a key given its position

From: Bruce Richardson <hidden>
Date: 2016-06-16 09:50:31

On Thu, Jun 16, 2016 at 10:22:30AM +0200, Yari Adan Petralanda wrote:
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.
I have my doubts that this will work. With cuckoo hashing, a hash table entry
can change position multiple times after it is added, as the table is reorganised
to make room for new entries.

Regards,
/Bruce
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help