From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH] hash: new function to retrieve a key given its position Date: Thu, 16 Jun 2016 10:50:26 +0100 Message-ID: <20160616095026.GD11016@bricha3-MOBL3> References: <576261C6.2050600@ericsson.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: pablo.de.lara.guarch@intel.com, Juan Antonio Montesinos Delgado , dev@dpdk.org To: Yari Adan Petralanda Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 638F4C498 for ; Thu, 16 Jun 2016 11:50:31 +0200 (CEST) Content-Disposition: inline In-Reply-To: <576261C6.2050600@ericsson.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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