Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-08-08 Thread Michel Machado
On 08/03/2018 11:24 AM, Stephen Hemminger wrote: Often for time based cleanup it is better to have a second linked list that is ordered by time value. Then the cleanup code can start at the oldest stop when it reaches the last item that could expire. That does mean having some form of lock and

Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-08-03 Thread Stephen Hemminger
On Wed, 1 Aug 2018 08:57:39 -0400 Michel Machado wrote: > On 07/31/2018 09:40 PM, Wang, Yipeng1 wrote: > > How about an API that is more universal? For example, an API such as > > "rte_iterate_conflict_entries". After an insertion failure, this function > > will iterate all entries that may co

Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-08-03 Thread Michel Machado
On 07/31/2018 09:40 PM, Wang, Yipeng1 wrote: How about an API that is more universal? For example, an API such as "rte_iterate_conflict_entries". After an insertion failure, this function will iterate all entries that may conflict with the newly inserted key and you could decide which entry t

Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-08-01 Thread Michel Machado
On 07/31/2018 10:57 AM, Wiles, Keith wrote: On Jul 31, 2018, at 1:09 AM, Fu, Qiaobin wrote: Hi Yipeng, Thanks for the feedbacks! On Jul 30, 2018, at 4:24 PM, Wang, Yipeng1 wrote: Hi, Qiaobin, Thanks for the patch. If I understand correctly your use case is to use hash table as a "cache

Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-07-31 Thread Wang, Yipeng1
] >Sent: Tuesday, July 31, 2018 8:33 AM >To: Wiles, Keith ; Fu, Qiaobin >Cc: Wang, Yipeng1 ; Richardson, Bruce >; De Lara Guarch, Pablo >; dev@dpdk.org; Doucette, Cody, Joseph >; Gobriel, Sameh >; Tai, Charlie >Subject: Re: [dpdk-dev] [PATCH] hash table: add a bucket ite

Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-07-31 Thread Wiles, Keith
--Original Message- >>> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Wiles, Keith >>> Sent: Sunday, July 29, 2018 6:17 AM >>> To: Qiaobin Fu >>> Cc: Richardson, Bruce ; De Lara Guarch, Pablo >>> ; dev@dpdk.org; >>> mic...@digirati.co

Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-07-30 Thread Fu, Qiaobin
Of Wiles, Keith >> Sent: Sunday, July 29, 2018 6:17 AM >> To: Qiaobin Fu >> Cc: Richardson, Bruce ; De Lara Guarch, Pablo >> ; dev@dpdk.org; >> mic...@digirati.com.br; douce...@bu.edu >> Subject: Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-07-30 Thread Wang, Yipeng1
ara Guarch, Pablo >; dev@dpdk.org; >mic...@digirati.com.br; douce...@bu.edu >Subject: Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function > > > >> On Jul 28, 2018, at 12:48 PM, Qiaobin Fu wrote: >> >> Function rte_hash_bucket_iterate() enables call

Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-07-29 Thread Wiles, Keith
> On Jul 28, 2018, at 12:48 PM, Qiaobin Fu wrote: > > Function rte_hash_bucket_iterate() enables callers to > incrementally iterate over the hash table bucket by bucket, > so that it can avoid creating hiccups and thrashing the cache > of the processor. > > This patch mainly deals with cases i

[dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-07-28 Thread Qiaobin Fu
Function rte_hash_bucket_iterate() enables callers to incrementally iterate over the hash table bucket by bucket, so that it can avoid creating hiccups and thrashing the cache of the processor. This patch mainly deals with cases in which the hash table is full and one needs to decide if the incomi

[dpdk-dev] [PATCH] hash table: add a bucket iterator function

2018-07-15 Thread Qiaobin Fu
Function rte_hash_bucket_iterate() enables callers to incrementally iterate over the hash table bucket by bucket, so that it can avoid creating hiccups and thrashing the cache of the processor. This patch mainly deals with cases in which the hash table is full and one needs to decide if the incomi