Re: [ovs-dev] [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > On Mon, Oct 29, 2012 at 12:14 PM, Mathieu Desnoyers > wrote: > > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers > >> wrote: > >> > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> >> + > >>

Re: [ovs-dev] [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 12:14 PM, Mathieu Desnoyers wrote: > * Sasha Levin (levinsasha...@gmail.com) wrote: >> On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers >> wrote: >> > * Sasha Levin (levinsasha...@gmail.com) wrote: >> >> + >> >> + for (i = 0; i < sz; i++) >> >> + INIT_HLI

Re: [ovs-dev] [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Tejun Heo (t...@kernel.org) wrote: > Hello, > > On Mon, Oct 29, 2012 at 12:14:12PM -0400, Mathieu Desnoyers wrote: > > Most of the calls to this initialization function apply it on zeroed > > memory (static/kzalloc'd...), which makes it useless. I'd actually be in > > favor of removing those red

Re: [ovs-dev] [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Tejun Heo
Hello, On Mon, Oct 29, 2012 at 12:14:12PM -0400, Mathieu Desnoyers wrote: > Most of the calls to this initialization function apply it on zeroed > memory (static/kzalloc'd...), which makes it useless. I'd actually be in > favor of removing those redundant calls (as I pointed out in another > email

Re: [ovs-dev] [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers > wrote: > > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> + > >> + for (i = 0; i < sz; i++) > >> + INIT_HLIST_HEAD(&ht[sz]); > > > > ouch. How did this work ? Has it been test

Re: [ovs-dev] [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers wrote: > * Sasha Levin (levinsasha...@gmail.com) wrote: >> + >> + for (i = 0; i < sz; i++) >> + INIT_HLIST_HEAD(&ht[sz]); > > ouch. How did this work ? Has it been tested at all ? > > sz -> i Funny enough, it works perfectly. Gene

Re: [ovs-dev] [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > This hashtable implementation is using hlist buckets to provide a simple > hashtable to prevent it from getting reimplemented all over the kernel. > > Signed-off-by: Sasha Levin > --- > > Sorry for the long delay, I was busy with a bunch of person

[ovs-dev] [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-28 Thread Sasha Levin
This hashtable implementation is using hlist buckets to provide a simple hashtable to prevent it from getting reimplemented all over the kernel. Signed-off-by: Sasha Levin --- Sorry for the long delay, I was busy with a bunch of personal things. Changes since v6: - Use macros that point to in