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

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > Switch tracepoints to use the new hashtable implementation. This reduces the > amount of > generic unrelated code in the tracepoints. > > Signed-off-by: Sasha Levin > --- > kernel/tracepoint.c | 27 +++ > 1 file changed, 1

Re: [ovs-dev] [PATCH v7 07/16] net, 9p: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > Switch 9p error table to use the new hashtable implementation. This reduces > the amount of > generic unrelated code in 9p. > > Signed-off-by: Sasha Levin > --- > net/9p/error.c | 21 ++--- > 1 file changed, 10 insertions(+), 11 d

Re: [ovs-dev] [PATCH v7 08/16] block, elevator: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: [...] > @@ -96,6 +97,8 @@ struct elevator_type > struct list_head list; > }; > > +#define ELV_HASH_BITS 6 > + > /* > * each queue has an elevator_queue associated with it > */ > @@ -105,7 +108,7 @@ struct elevator_queue > void *elev

Re: [ovs-dev] [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > Switch cache to use the new hashtable implementation. This reduces the amount > of > generic unrelated code in the cache implementation. > > Signed-off-by: Sasha Levin > --- > net/sunrpc/cache.c | 20 +--- > 1 file changed, 9 inse

Re: [ovs-dev] [PATCH v7 10/16] dlm: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: [...] > @@ -158,34 +159,21 @@ static int dlm_allow_conn; > static struct workqueue_struct *recv_workqueue; > static struct workqueue_struct *send_workqueue; > > -static struct hlist_head connection_hash[CONN_HASH_SIZE]; > +static struct hlist_head

Re: [ovs-dev] [PATCH v7 11/16] net, l2tp: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: [...] > -/* Session hash global list for L2TPv3. > - * The session_id SHOULD be random according to RFC3931, but several > - * L2TP implementations use incrementing session_ids. So we do a real > - * hash on the session_id, rather than a simple bitm

Re: [ovs-dev] [PATCH v7 10/16] dlm: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: > * Sasha Levin (levinsasha...@gmail.com) wrote: > [...] > > @@ -158,34 +159,21 @@ static int dlm_allow_conn; > > static struct workqueue_struct *recv_workqueue; > > static struct workqueue_struct *send_workqueue; > > > > -static struc

Re: [ovs-dev] [PATCH v7 13/16] lockd: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > Switch lockd to use the new hashtable implementation. This reduces the amount > of > generic unrelated code in lockd. > > Signed-off-by: Sasha Levin > --- > fs/lockd/svcsubs.c | 66 > +- > 1 fi

Re: [ovs-dev] [PATCH v7 14/16] net, rds: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > Switch rds to use the new hashtable implementation. This reduces the amount of > generic unrelated code in rds. > > Signed-off-by: Sasha Levin > --- > net/rds/bind.c | 28 +- > net/rds/connection.c | 102 > +

Re: [ovs-dev] [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

Re: [ovs-dev] [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Linus Torvalds
On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers wrote: > > So defining e.g.: > > #include > > #define DFR_HASH_BITS (PAGE_SHIFT - ilog2(BITS_PER_LONG)) > > would keep the intended behavior in all cases: use one page for the hash > array. Well, since that wasn't true before either because of

Re: [ovs-dev] [PATCH 4/8] User-Space MPLS actions and matches

2012-10-29 Thread Isaku Yamahata
I needed the following patch to pass unit tests. >From 55e62f64c984accf578a3ae8e1b315b7752c7ebe Mon Sep 17 00:00:00 2001 Message-Id: <55e62f64c984accf578a3ae8e1b315b7752c7ebe.1351522305.git.yamah...@valinux.co.jp> From: Isaku Yamahata Date: Mon, 29 Oct 2012 23:43:25 +0900 Subject: [PATCH] unitte

Re: [ovs-dev] [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Linus Torvalds (torva...@linux-foundation.org) wrote: > On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers > wrote: > > > > So defining e.g.: > > > > #include > > > > #define DFR_HASH_BITS (PAGE_SHIFT - ilog2(BITS_PER_LONG)) > > > > would keep the intended behavior in all cases: use one page f

Re: [ovs-dev] [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread J. Bruce Fields
On Mon, Oct 29, 2012 at 11:13:43AM -0400, Mathieu Desnoyers wrote: > * Linus Torvalds (torva...@linux-foundation.org) wrote: > > On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers > > wrote: > > > > > > So defining e.g.: > > > > > > #include > > > > > > #define DFR_HASH_BITS (PAGE_SHIFT - ilog2(

Re: [ovs-dev] [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* J. Bruce Fields (bfie...@fieldses.org) wrote: > On Mon, Oct 29, 2012 at 11:13:43AM -0400, Mathieu Desnoyers wrote: > > * Linus Torvalds (torva...@linux-foundation.org) wrote: > > > On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers > > > wrote: > > > > > > > > So defining e.g.: > > > > > > > > #

Re: [ovs-dev] [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: [ovs-dev] [PATCH v7 10/16] dlm: use new hashtable implementation

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 9:07 AM, Mathieu Desnoyers wrote: > * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: >> * Sasha Levin (levinsasha...@gmail.com) wrote: >> [...] >> > @@ -158,34 +159,21 @@ static int dlm_allow_conn; >> > static struct workqueue_struct *recv_workqueue; >> > stati

Re: [ovs-dev] [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: [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 10/16] dlm: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > On Mon, Oct 29, 2012 at 9:07 AM, Mathieu Desnoyers > wrote: > > * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: > >> * Sasha Levin (levinsasha...@gmail.com) wrote: > >> [...] > >> > @@ -158,34 +159,21 @@ static int dlm_allow_conn; > >> >

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 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
* 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

[ovs-dev] [PATCH] netdev-vport: Warn users that pmtud is deprecated

2012-10-29 Thread Ansis Atteka
This is a complementary patch to the other one I sent out previously. The pupose of it is to make it more obvious that tunnel pmtud is deprecated and will be removed soon. Requested-by: Jesse Gross Signed-off-by: Ansis Atteka --- NEWS |4 +++- lib/netdev-vport.c |4 +++

Re: [ovs-dev] [PATCH v7 10/16] dlm: use new hashtable implementation

2012-10-29 Thread David Teigland
On Mon, Oct 29, 2012 at 12:07:10PM -0400, Mathieu Desnoyers wrote: > I'm fine with turning a direct + modulo mapping into a dispersed hash as > long as there are no underlying assumptions about sequentiality of value > accesses. > > If the access pattern would happen to be typically sequential, th

Re: [ovs-dev] [PATCH] netdev-vport: Warn users that pmtud is deprecated

2012-10-29 Thread Ben Pfaff
On Mon, Oct 29, 2012 at 06:22:54PM +0200, Ansis Atteka wrote: > This is a complementary patch to the other one I sent out previously. > The pupose of it is to make it more obvious that tunnel pmtud is > deprecated and will be removed soon. > > Requested-by: Jesse Gross > Signed-off-by: Ansis Atte

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 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Andrew Morton
On Mon, 29 Oct 2012 07:49:42 -0700 Linus Torvalds wrote: > Because there's no reason to believe that '9' is in any way a worse > random number than something page-shift-related, is there? 9 is much better than PAGE_SHIFT. PAGE_SIZE can vary by a factor of 16, depending on config. Everyone thi

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: > >> >> + > >>

[ovs-dev] [PATCH] ovs-vsctl: Allow command-specific options to mingle with global options.

2012-10-29 Thread Ben Pfaff
Until now, a command like "ovs-vsctl --may-exist add-br br0" yielded a confusing error message. Users had to realize that the correct form was "ovs-vsctl -- --may-exist add-br br0", but instead they often reported a bug or gave up in frustration. Even though the behavior was documented, it was co

Re: [ovs-dev] [PATCH 1/8] flow: Set ttl in flow_compose().

2012-10-29 Thread Ben Pfaff
On Sat, Oct 27, 2012 at 03:05:55PM +0900, Simon Horman wrote: > From: Justin Pettit > > Thanks to Ben Pfaff for immediately pinpointing the likely location of > the issue. > > Signed-off-by: Justin Pettit > Signed-off-by: Simon Horman I applied this one to master.

Re: [ovs-dev] [PATCH 3/8] nx-match: Do not check pre-requisites for load actions

2012-10-29 Thread Ben Pfaff
On Sat, Oct 27, 2012 at 03:05:57PM +0900, Simon Horman wrote: > There are (or at least will be) cases where this check can produce false > positives. For example, a flow which matches a non-MPLS packet and then > applies an MPLS push action followed by an action to load the MPLS label. So, I reme

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 7:35 AM, Mathieu Desnoyers wrote: > * Sasha Levin (levinsasha...@gmail.com) wrote: >> Switch tracepoints to use the new hashtable implementation. This reduces the >> amount of >> generic unrelated code in the tracepoints. >> >> Signed-off-by: Sasha Levin >> --- >> kernel

Re: [ovs-dev] [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: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > On Mon, Oct 29, 2012 at 7:35 AM, Mathieu Desnoyers > wrote: > > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> Switch tracepoints to use the new hashtable implementation. This reduces > >> the amount of > >> generic unrelated code in the trace

Re: [ovs-dev] [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: [ovs-dev] [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: [ovs-dev] [PATCH 4/8] User-Space MPLS actions and matches

2012-10-29 Thread Ben Pfaff
On Sat, Oct 27, 2012 at 03:05:58PM +0900, Simon Horman wrote: > This patch implements use-space datapath and non-datapath code > to match and use the datapath API set out in Leo Alterman's patch > "user-space datapath: Add basic MPLS support to kernel". > > The resulting MPLS implementation suppor

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Josh Triplett
On Mon, Oct 29, 2012 at 01:29:24PM -0400, Sasha Levin wrote: > On Mon, Oct 29, 2012 at 7:35 AM, Mathieu Desnoyers > wrote: > > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> Switch tracepoints to use the new hashtable implementation. This reduces > >> the amount of > >> generic unrelated cod

Re: [ovs-dev] [PATCH] netdev-vport: Warn users that pmtud is deprecated

2012-10-29 Thread Jesse Gross
On Mon, Oct 29, 2012 at 9:22 AM, Ansis Atteka wrote: > This is a complementary patch to the other one I sent out previously. > The pupose of it is to make it more obvious that tunnel pmtud is > deprecated and will be removed soon. > > Requested-by: Jesse Gross > Signed-off-by: Ansis Atteka Look

Re: [ovs-dev] [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: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 2:31 PM, Josh Triplett wrote: > On Mon, Oct 29, 2012 at 01:29:24PM -0400, Sasha Levin wrote: >> On Mon, Oct 29, 2012 at 7:35 AM, Mathieu Desnoyers >> wrote: >> > * Sasha Levin (levinsasha...@gmail.com) wrote: >> >> Switch tracepoints to use the new hashtable implementation

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > On Mon, Oct 29, 2012 at 2:31 PM, Josh Triplett wrote: > > On Mon, Oct 29, 2012 at 01:29:24PM -0400, Sasha Levin wrote: > >> On Mon, Oct 29, 2012 at 7:35 AM, Mathieu Desnoyers > >> wrote: > >> > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> >>

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Tejun Heo
On Mon, Oct 29, 2012 at 02:53:19PM -0400, Mathieu Desnoyers wrote: > The argument about hash_init being useful to add magic values in the > future only works for the cases where a hash table is declared with > DECLARE_HASHTABLE(). It's completely pointless with DEFINE_HASHTABLE(), > because we coul

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Tejun Heo
On Mon, Oct 29, 2012 at 11:58:14AM -0700, Tejun Heo wrote: > On Mon, Oct 29, 2012 at 02:53:19PM -0400, Mathieu Desnoyers wrote: > > The argument about hash_init being useful to add magic values in the > > future only works for the cases where a hash table is declared with > > DECLARE_HASHTABLE(). I

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 2:53 PM, Mathieu Desnoyers wrote: > * Sasha Levin (levinsasha...@gmail.com) wrote: >> On Mon, Oct 29, 2012 at 2:31 PM, Josh Triplett wrote: >> > On Mon, Oct 29, 2012 at 01:29:24PM -0400, Sasha Levin wrote: >> >> On Mon, Oct 29, 2012 at 7:35 AM, Mathieu Desnoyers >> >> wro

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Tejun Heo (t...@kernel.org) wrote: > On Mon, Oct 29, 2012 at 11:58:14AM -0700, Tejun Heo wrote: > > On Mon, Oct 29, 2012 at 02:53:19PM -0400, Mathieu Desnoyers wrote: > > > The argument about hash_init being useful to add magic values in the > > > future only works for the cases where a hash tabl

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Tejun Heo
On Mon, Oct 29, 2012 at 03:09:36PM -0400, Sasha Levin wrote: > The other thing is whether hash_init() should be called for hashtables > that were created with DEFINE_HASHTABLE(). That point was raised by > Neil Brown last time this series went around, and it seems that no one > objected to the poin

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > On Mon, Oct 29, 2012 at 2:53 PM, Mathieu Desnoyers > wrote: > > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> On Mon, Oct 29, 2012 at 2:31 PM, Josh Triplett > >> wrote: > >> > On Mon, Oct 29, 2012 at 01:29:24PM -0400, Sasha Levin wrote: > >>

Re: [ovs-dev] [PATCH v7 06/16] tracepoint: use new hashtable implementation

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 3:12 PM, Tejun Heo wrote: > On Mon, Oct 29, 2012 at 03:09:36PM -0400, Sasha Levin wrote: >> The other thing is whether hash_init() should be called for hashtables >> that were created with DEFINE_HASHTABLE(). That point was raised by >> Neil Brown last time this series went

[ovs-dev] [PATCH] ovs-ctl.in: Do not fail 'restart'.

2012-10-29 Thread Gurucharan Shetty
ovs-ctl restart is called by the debian package upgrade. We do not want to fail the package upgrade just because restoring of flows failed. The error message will still be printed on the console. Bug #13730. Signed-off-by: Gurucharan Shetty --- utilities/ovs-ctl.in |3 ++- 1 file changed, 2

[ovs-dev] JOIN in this new home based business MCA!!!

2012-10-29 Thread Hu$tleMann
http://www.reverbnation.com/widget_code/html_widget/artist_2782324?widget_id=51&posted_by=artist_2782324&pwc[design]=default&pwc[background_color]=%2333&pwc[size]=custom"; width="525" height="350" frameborder="0" scrolling="no"> http://getweeklypaychecks.com/cp1.php?id=1620&campaign=videolin

Re: [ovs-dev] [PATCH] datapath: Fix sparse warning for symbol 'BUILD_BUG_ON_NOT_POWER_OF_2'

2012-10-29 Thread Pravin Shelar
On Fri, Oct 26, 2012 at 2:29 PM, Jesse Gross wrote: > On Thu, Oct 25, 2012 at 1:28 PM, Pravin Shelar wrote: >> On Thu, Oct 25, 2012 at 1:19 PM, Ben Pfaff wrote: >>> On Sat, Oct 27, 2012 at 01:07:24PM -0700, Pravin B Shelar wrote: Signed-off-by: Pravin B Shelar >>> >>> I'm curious, what war

Re: [ovs-dev] [PATCH] datapath: Add Upstream id for GRE type.

2012-10-29 Thread Pravin Shelar
On Fri, Oct 26, 2012 at 11:32 AM, Jesse Gross wrote: > On Sat, Oct 27, 2012 at 1:06 PM, Pravin B Shelar wrote: >> diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h >> index 89feb61..d4a043c 100644 >> --- a/include/linux/openvswitch.h >> +++ b/include/linux/openvswitch.h >> @@

Re: [ovs-dev] [PATCH v2] datapath: Remove tunnel header caching.

2012-10-29 Thread Pravin Shelar
On Fri, Oct 26, 2012 at 5:15 PM, Jesse Gross wrote: > On Thu, Oct 25, 2012 at 11:14 AM, Pravin B Shelar wrote: >> Tunnel caching was added to reduce CPU utilization on TX path >> by caching packet header, So performance gain is directly proportional >> to number of skbs transferred. But with help

Re: [ovs-dev] [PATCH] ovs-vsctl: Allow command-specific options to mingle with global options.

2012-10-29 Thread Adam Heath
On 10/29/2012 11:34 AM, Ben Pfaff wrote: > Until now, a command like "ovs-vsctl --may-exist add-br br0" yielded a > confusing error message. Users had to realize that the correct form was > "ovs-vsctl -- --may-exist add-br br0", but instead they often reported a > bug or gave up in frustration. E

Re: [ovs-dev] [PATCH] ovs-ctl.in: Do not fail 'restart'.

2012-10-29 Thread Ben Pfaff
On Mon, Oct 29, 2012 at 12:35:34PM -0700, Gurucharan Shetty wrote: > ovs-ctl restart is called by the debian package upgrade. > We do not want to fail the package upgrade just because > restoring of flows failed. > > The error message will still be printed on the console. > > Bug #13730. > Signed

Re: [ovs-dev] [Single DP 04/15] Use ODP ports in dpif layer and below.

2012-10-29 Thread Justin Pettit
On Thu, Oct 18, 2012 at 4:42 PM, Ben Pfaff wrote: > On Thu, Oct 18, 2012 at 12:51:49PM -0700, Justin Pettit wrote: > > The current code has a simple mapping between datapath and OpenFlow port > > numbers (1-to-1 other than the local port). > > The important fact is not really that the mapping is

Re: [ovs-dev] [Single DP 04/15] Use ODP ports in dpif layer and below.

2012-10-29 Thread Ben Pfaff
On Mon, Oct 29, 2012 at 02:11:51PM -0700, Justin Pettit wrote: > On Thu, Oct 18, 2012 at 4:42 PM, Ben Pfaff wrote: > > In ofproto_unixctl_trace(), it looks very much to me like the conversion > > to an ODP port in the argc == 6 case should not be happening, that is, > > that the ofp_port_to_odp_po

Re: [ovs-dev] [tests 20/22] ofproto-dpif: Fix "ofproto/trace" of flow for local port.

2012-10-29 Thread Justin Pettit
Acked-by: Justin Pettit Thanks, --Justin On Oct 25, 2012, at 5:02 PM, Ben Pfaff wrote: > The 'in_port' variable is an OpenFlow port, not an ODP port, so we should > not translate it to ODP. > > Signed-off-by: Ben Pfaff > --- > ofproto/ofproto-dpif.c |2 +- > 1 files changed, 1 insertion

Re: [ovs-dev] [Single DP 04/15] Use ODP ports in dpif layer and below.

2012-10-29 Thread Justin Pettit
Huh, somehow I missed it in that 22 patch series. I just reviewed that one patch. Thanks, --Justin On Oct 29, 2012, at 2:14 PM, Ben Pfaff wrote: > On Mon, Oct 29, 2012 at 02:11:51PM -0700, Justin Pettit wrote: >> On Thu, Oct 18, 2012 at 4:42 PM, Ben Pfaff wrote: >>> In ofproto_unixctl_trac

[ovs-dev] [PATCH v2] datapath: Add Upstream id for GRE type.

2012-10-29 Thread Pravin B Shelar
v1-v2: - Dropped userspace changes. --8<--cut here-->8-- Once GRE is upstream it will have new type to have continuous sequence of ids for vport type. Following patch adds this ID to have compatibility with it. Signed-off-by: Pravin B Shela

[ovs-dev] [PATCH v2] datapath: Fix sparse warning for symbol 'BUILD_BUG_ON_NOT_POWER_OF_2'

2012-10-29 Thread Pravin B Shelar
v1-v2: - Moved BUILD_BUG_ON_NOT_POWER_OF_2 symbol definition for bug.h --8<--cut here-->8-- BUILD_BUG_ON_NOT_POWER_OF_2 symbol is moved from kernel.h to bug.h in 3.4. Therefore sparse is giving warning: include/linux/bug.h:15:9: warning: pr

[ovs-dev] [PATCH v2] datapath: Deprecate CAPWAP support.

2012-10-29 Thread Pravin B Shelar
v1-v2: - Added userspace warning. - Added a NEWS item. --8<--cut here-->8-- The CAPWAP implementation is just the encapsulation format and therefore really not the full protocol. While there were some uses of it (primarily hardware s

[ovs-dev] [PATCH v2] datapath: enable encap for capwap.

2012-10-29 Thread Pravin B Shelar
v1-v2: - enable encap before incrementing count. --8<--cut here-->8-- kernel 3.5 added a switch to turn on UDP encap, capwap needs to enable it. Signed-off-by: Pravin B Shelar --- datapath/linux/compat/include/linux/udp.h |5 + dat

[ovs-dev] [PATCH v3] datapath: Remove tunnel header caching.

2012-10-29 Thread Pravin B Shelar
v2-v3: - Fixed according to comments from Jesse. - Dropped flow-refcount related changes, Jesse will post seperate patch for same. v1-v2: - Fixed capwap fragment case. - simplified tnl_send. --8<--cut here-->8

[ovs-dev] [PATCH v2] datapath: Add support for 3.6 kernel.

2012-10-29 Thread Pravin B Shelar
Signed-off-by: Pravin B Shelar --- datapath/datapath.c |4 ++-- datapath/tunnel.c | 33 +++-- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 65f4dc8..9c253e1 100644 --- a/datapath/datapath.c +++

Re: [ovs-dev] [Single DP 05/15] Allow the OpenFlow port to be requested for a port.

2012-10-29 Thread Justin Pettit
On Oct 18, 2012, at 9:30 PM, Ben Pfaff wrote: > The new comment on the ->port_add member function of ofproto_class > implies that the caller might pass in a NULL 'ofp_portp'. I don't think > that the implementation should have to bother with that possibility, > because ofproto_port_add(), by des

Re: [ovs-dev] [Single DP 04/15] Use ODP ports in dpif layer and below.

2012-10-29 Thread Justin Pettit
On Oct 22, 2012, at 3:24 PM, Ben Pfaff wrote: > On Thu, Oct 18, 2012 at 12:51:49PM -0700, Justin Pettit wrote: >> @@ -89,7 +91,7 @@ struct flow { >> uint8_t arp_tha[6]; /* ARP/ND target hardware address. */ >> uint8_t nw_ttl; /* IP TTL/Hop Limit. */ >> uint8_t nw_f

Re: [ovs-dev] [Single DP 06/15] ofproto: Add initialization function.

2012-10-29 Thread Justin Pettit
On Oct 19, 2012, at 10:53 AM, Ben Pfaff wrote: > Hmm, putting "return;" in an otherwise empty function isn't our usual > practice: > >> static void >> +init(const struct shash *iface_hints OVS_UNUSED) >> +{ >> +return; >> +} Removed >> @@ -319,6 +319,15 @@ struct ofproto_class { >> /* ## -

Re: [ovs-dev] [Single DP 07/15] tests: Define new ADD_OF_PORTS macro for ofproto tests.

2012-10-29 Thread Justin Pettit
On Oct 19, 2012, at 11:05 AM, Ben Pfaff wrote: > On Thu, Oct 18, 2012 at 12:51:52PM -0700, Justin Pettit wrote: >> A future commit will break the relation between OpenFlow and datapath >> port numbers. The new ADD_OF_PORTS macro adds an interface to a bridge >> and configures it such that both

Re: [ovs-dev] [PATCH] datapath: add ipv6 'set' action

2012-10-29 Thread Jesse Gross
On Sun, Oct 28, 2012 at 2:21 PM, Ansis Atteka wrote: > This patch adds ipv6 set action functionality. It allows to change > traffic class, flow label, hop-limit, ipv6 source and destination > address fields. > > Signed-off-by: Ansis Atteka Can you add an item to NEWS? I got a few sparse errors

Re: [ovs-dev] [tests 20/22] ofproto-dpif: Fix "ofproto/trace" of flow for local port.

2012-10-29 Thread Ben Pfaff
Thanks, I pushed it to master. On Mon, Oct 29, 2012 at 02:20:52PM -0700, Justin Pettit wrote: > Acked-by: Justin Pettit > > Thanks, > > --Justin > > > On Oct 25, 2012, at 5:02 PM, Ben Pfaff wrote: > > > The 'in_port' variable is an OpenFlow port, not an ODP port, so we should > > not transl

Re: [ovs-dev] [Single DP 04/15] Use ODP ports in dpif layer and below.

2012-10-29 Thread Ben Pfaff
Thanks for the review, I pushed the patch. On Mon, Oct 29, 2012 at 02:21:52PM -0700, Justin Pettit wrote: > Huh, somehow I missed it in that 22 patch series. I just reviewed > that one patch. > > Thanks, > > --Justin > > > On Oct 29, 2012, at 2:14 PM, Ben Pfaff wrote: > > > On Mon, Oct 29,

Re: [ovs-dev] [Single DP 05/15] Allow the OpenFlow port to be requested for a port.

2012-10-29 Thread Ben Pfaff
On Mon, Oct 29, 2012 at 02:59:46PM -0700, Justin Pettit wrote: > > It looks like the signed 64-bit value from the database gets truncated > > down to an unsigned 16-bit value in iface_do_create(). Actually in > > iface_create() too, in the initialization of 'ofp_port'. I'd check that > > it's in

Re: [ovs-dev] [PATCH 3/8] nx-match: Do not check pre-requisites for load actions

2012-10-29 Thread Simon Horman
On Mon, Oct 29, 2012 at 09:58:58AM -0700, Ben Pfaff wrote: > On Sat, Oct 27, 2012 at 03:05:57PM +0900, Simon Horman wrote: > > There are (or at least will be) cases where this check can produce false > > positives. For example, a flow which matches a non-MPLS packet and then > > applies an MPLS pu

Re: [ovs-dev] [PATCH 4/8] User-Space MPLS actions and matches

2012-10-29 Thread Simon Horman
On Mon, Oct 29, 2012 at 11:28:29AM -0700, Ben Pfaff wrote: > On Sat, Oct 27, 2012 at 03:05:58PM +0900, Simon Horman wrote: > > This patch implements use-space datapath and non-datapath code > > to match and use the datapath API set out in Leo Alterman's patch > > "user-space datapath: Add basic MPL

Re: [ovs-dev] [PATCH 4/8] User-Space MPLS actions and matches

2012-10-29 Thread Simon Horman
On Mon, Oct 29, 2012 at 11:52:23PM +0900, Isaku Yamahata wrote: > I needed the following patch to pass unit tests. Thanks, I have also noticed this. I believe that the need for this patch relates to the presence of the series "Run-Time Open Flow Version Configuration" and that the patch below is n

Re: [ovs-dev] [PATCH 4/8] User-Space MPLS actions and matches

2012-10-29 Thread Ben Pfaff
Can you post a revised version of at least this patch? Thanks. On Tue, Oct 30, 2012 at 10:12:28AM +0900, Simon Horman wrote: > On Mon, Oct 29, 2012 at 11:52:23PM +0900, Isaku Yamahata wrote: > > I needed the following patch to pass unit tests. > > Thanks, I have also noticed this. I believe that

Re: [ovs-dev] [PATCH] datapath: Add Upstream id for GRE type.

2012-10-29 Thread Jesse Gross
On Mon, Oct 29, 2012 at 12:57 PM, Pravin Shelar wrote: > On Fri, Oct 26, 2012 at 11:32 AM, Jesse Gross wrote: >> Also, did you look at the userspace code to see whether it can handle >> the transition by removing port types that it doesn't understand and >> recreating them? > > Yes, I checked it

Re: [ovs-dev] [PATCH v2] datapath: Fix sparse warning for symbol 'BUILD_BUG_ON_NOT_POWER_OF_2'

2012-10-29 Thread Jesse Gross
On Mon, Oct 29, 2012 at 2:32 PM, Pravin B Shelar wrote: > v1-v2: > - Moved BUILD_BUG_ON_NOT_POWER_OF_2 symbol definition for bug.h > --8<--cut here-->8-- > > BUILD_BUG_ON_NOT_POWER_OF_2 symbol is moved from kernel.h to > bug.h in 3.4. Theref

Re: [ovs-dev] [PATCH v2] datapath: Deprecate CAPWAP support.

2012-10-29 Thread Jesse Gross
On Mon, Oct 29, 2012 at 2:32 PM, Pravin B Shelar wrote: > diff --git a/NEWS b/NEWS > index fa0a249..99f7c4b 100644 > --- a/NEWS > +++ b/NEWS > @@ -43,6 +43,7 @@ v1.9.0 - xx xxx > - The autopath action. > - Interface type "null". > - Numeric values for reserved ports

Re: [ovs-dev] [PATCH v2] datapath: enable encap for capwap.

2012-10-29 Thread Jesse Gross
On Mon, Oct 29, 2012 at 2:32 PM, Pravin B Shelar wrote: > v1-v2: > - enable encap before incrementing count. > --8<--cut here-->8-- > > kernel 3.5 added a switch to turn on UDP encap, capwap needs > to enable it. > > Signed-off-by: Pravin B S

Re: [ovs-dev] [PATCH v2] datapath: Add support for 3.6 kernel.

2012-10-29 Thread Jesse Gross
On Mon, Oct 29, 2012 at 2:32 PM, Pravin B Shelar wrote: > Signed-off-by: Pravin B Shelar > --- > datapath/datapath.c |4 ++-- > datapath/tunnel.c | 33 +++-- > 2 files changed, 21 insertions(+), 16 deletions(-) > > diff --git a/datapath/datapath.c b/datapath/d

Re: [ovs-dev] [PATCH v2] datapath: Add support for 3.6 kernel.

2012-10-29 Thread Pravin Shelar
On Mon, Oct 29, 2012 at 7:21 PM, Jesse Gross wrote: > On Mon, Oct 29, 2012 at 2:32 PM, Pravin B Shelar wrote: >> Signed-off-by: Pravin B Shelar >> --- >> datapath/datapath.c |4 ++-- >> datapath/tunnel.c | 33 +++-- >> 2 files changed, 21 insertions(+), 16 de

Re: [ovs-dev] [PATCH] datapath: Add Upstream id for GRE type.

2012-10-29 Thread Pravin Shelar
On Mon, Oct 29, 2012 at 6:56 PM, Jesse Gross wrote: > On Mon, Oct 29, 2012 at 12:57 PM, Pravin Shelar wrote: >> On Fri, Oct 26, 2012 at 11:32 AM, Jesse Gross wrote: >>> Also, did you look at the userspace code to see whether it can handle >>> the transition by removing port types that it doesn't

Re: [ovs-dev] [PATCH v2] datapath: Fix sparse warning for symbol 'BUILD_BUG_ON_NOT_POWER_OF_2'

2012-10-29 Thread Pravin Shelar
On Mon, Oct 29, 2012 at 7:07 PM, Jesse Gross wrote: > On Mon, Oct 29, 2012 at 2:32 PM, Pravin B Shelar wrote: >> v1-v2: >> - Moved BUILD_BUG_ON_NOT_POWER_OF_2 symbol definition for bug.h >> --8<--cut here-->8-- >> >> BUILD_BUG_ON_NOT_POWER_O