Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-28 Thread Michel Machado
On 08/26/2018 11:12 PM, Honnappa Nagarahalli wrote: On 08/23/2018 08:33 PM, Wang, Yipeng1 wrote: I think with Honnappa suggested "uint32_t* next", we may need a little bit tricks to make it work with the extra linked list. The performance may not be optimal though comparing to your original appr

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-26 Thread Honnappa Nagarahalli
Guarch, Pablo Subject: Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries On 08/23/2018 08:33 PM, Wang, Yipeng1 wrote: > I think with Honnappa suggested "uint32_t* next", we may need a little > bit tricks to make it work with the extra linked list. >

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-25 Thread Michel Machado
On 08/23/2018 08:33 PM, Wang, Yipeng1 wrote: I think with Honnappa suggested "uint32_t* next", we may need a little bit tricks to make it work with the extra linked list. The performance may not be optimal though comparing to your original approach. Is this important to your use case? It i

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-23 Thread Wang, Yipeng1
1 >; Wiles, Keith >; Gobriel, Sameh ; Tai, >Charlie ; Stephen Hemminger >; nd >Subject: RE: [dpdk-dev] [PATCH v2] hash table: add an iterator over >conflicting entries > > > >-Original Message- >From: Michel Machado >Sent: Tuesday, August 21, 2018 7:42 AM

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-21 Thread Honnappa Nagarahalli
Hemminger ; nd Subject: Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries On 08/21/2018 01:10 AM, Honnappa Nagarahalli wrote: > On 08/17/2018 03:41 PM, Honnappa Nagarahalli wrote: >> Can you elaborate more on using ' struct rte_conflict_iterator_state'

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-21 Thread Michel Machado
On 08/17/2018 03:41 PM, Honnappa Nagarahalli wrote: Can you elaborate more on using ' struct rte_conflict_iterator_state' as the argument for the API? If the API signature is changed to: rte_hash_iterate_conflict_entries (const struct rte_hash *h, void **key, void **data, const hash_sig_t sig,

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-21 Thread Michel Machado
On 08/21/2018 01:10 AM, Honnappa Nagarahalli wrote: On 08/17/2018 03:41 PM, Honnappa Nagarahalli wrote: Can you elaborate more on using ' struct rte_conflict_iterator_state' as the argument for the API? If the API signature is changed to: rte_hash_iterate_conflict_entries (const struct rte_ha

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-21 Thread Michel Machado
On 08/17/2018 03:41 PM, Honnappa Nagarahalli wrote: Do we also need to have 'rte_hash_iterate_conflict_entries_with_hash' API? I may have not understood the question. We are already working with the hash (i.e. sig). Did you mean something else? Let me elaborate. For the API 'rte_hash_loo

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-21 Thread Michel Machado
On 08/16/2018 10:33 PM, Honnappa Nagarahalli wrote: +/* Get the primary bucket index given the precomputed hash value. */ +static inline uint32_t rte_hash_get_primary_bucket(const struct +rte_hash *h, hash_sig_t sig) { + return sig & h->bucket_bitmask; +} + +/* Get the secondary bucket inde

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-20 Thread Honnappa Nagarahalli
Hemminger ; nd Subject: Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries On 08/17/2018 03:41 PM, Honnappa Nagarahalli wrote: > Can you elaborate more on using ' struct rte_conflict_iterator_state' as the > argument for the API? > > If the API s

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-17 Thread Honnappa Nagarahalli
Hemminger ; nd Subject: Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries On 08/16/2018 10:33 PM, Honnappa Nagarahalli wrote: > +/* Get the primary bucket index given the precomputed hash value. */ > +static inline uint32_t rte_hash_get_primary_bucket(const

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-16 Thread Honnappa Nagarahalli
; Wang, Yipeng1 ; Wiles, Keith ; Gobriel, Sameh ; Tai, Charlie ; Stephen Hemminger ; Fu, Qiaobin Subject: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries Function rte_hash_iterate_conflict_entries() iterates over the entries that conflict with an incoming entry

[dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-16 Thread Fu, Qiaobin
Function rte_hash_iterate_conflict_entries() iterates over the entries that conflict with an incoming entry. Iterating over conflicting entries enables one to decide if the incoming entry is more valuable than the entries already in the hash table. This is particularly useful after an insertion fa