Re: [PATCH v7 15/16] openvswitch: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Tejun Heo (t...@kernel.org) wrote: > Hello, > > On Mon, Oct 29, 2012 at 02:16:48PM -0400, Mathieu Desnoyers wrote: > > This is just one example in an attempt to show why different hash table > > users may have different constraints: for a hash table entirely > > populated by keys generated inter

Re: [PATCH v7 15/16] openvswitch: use new hashtable implementation

2012-10-29 Thread Tejun Heo
Hello, On Mon, Oct 29, 2012 at 02:16:48PM -0400, Mathieu Desnoyers wrote: > This is just one example in an attempt to show why different hash table > users may have different constraints: for a hash table entirely > populated by keys generated internally by the kernel, a random seed > might not be

Re: [PATCH v7 15/16] openvswitch: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > On Mon, Oct 29, 2012 at 11:59 AM, Mathieu Desnoyers > wrote: > > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> Hi Mathieu, > >> > >> On Mon, Oct 29, 2012 at 9:29 AM, Mathieu Desnoyers > >> wrote: > >> > * Sasha Levin (levinsasha...@gmail.com)

Re: [PATCH v7 15/16] openvswitch: use new hashtable implementation

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 11:59 AM, Mathieu Desnoyers wrote: > * Sasha Levin (levinsasha...@gmail.com) wrote: >> Hi Mathieu, >> >> On Mon, Oct 29, 2012 at 9:29 AM, Mathieu Desnoyers >> wrote: >> > * Sasha Levin (levinsasha...@gmail.com) wrote: >> > [...] >> >> -static struct hlist_head *hash_bucket

Re: [PATCH v7 15/16] openvswitch: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > Hi Mathieu, > > On Mon, Oct 29, 2012 at 9:29 AM, Mathieu Desnoyers > wrote: > > * Sasha Levin (levinsasha...@gmail.com) wrote: > > [...] > >> -static struct hlist_head *hash_bucket(struct net *net, const char *name) > >> -{ > >> - unsigned int

Re: [PATCH v7 15/16] openvswitch: use new hashtable implementation

2012-10-29 Thread Sasha Levin
Hi Mathieu, On Mon, Oct 29, 2012 at 9:29 AM, Mathieu Desnoyers wrote: > * Sasha Levin (levinsasha...@gmail.com) wrote: > [...] >> -static struct hlist_head *hash_bucket(struct net *net, const char *name) >> -{ >> - unsigned int hash = jhash(name, strlen(name), (unsigned long) net); >> - r

Re: [PATCH v7 15/16] openvswitch: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: [...] > -static struct hlist_head *hash_bucket(struct net *net, const char *name) > -{ > - unsigned int hash = jhash(name, strlen(name), (unsigned long) net); > - return &dev_table[hash & (VPORT_HASH_BUCKETS - 1)]; > -} > - > /** > * ovs_v

[PATCH v7 15/16] openvswitch: use new hashtable implementation

2012-10-28 Thread Sasha Levin
Switch openvswitch to use the new hashtable implementation. This reduces the amount of generic unrelated code in openvswitch. Signed-off-by: Sasha Levin --- net/openvswitch/vport.c | 34 +- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/net/openv