[ovs-dev] [PATCH v3] ofp-actions: Implement writing to metadata field

2012-08-14 Thread Joe Stringer
In OpenFlow 1.1, we add support for OFPIT_WRITE_METADATA. This allows us to write to the metadata field. Internally it is represented using ofpact_metadata. We introduce NXAST_WRITE_METADATA to handle writing to the metadata field in OpenFlow 1.0+. This structure reflects OFPIT_WRITE_METADATA. Wh

Re: [ovs-dev] Threaded userspace datapath

2012-08-14 Thread Giuseppe Lettieri
Il giorno 10/ago/2012, alle ore 19:20, Ben Pfaff ha scritto: > ... >> The datapath thread goes to 100% CPU in my tests, but this is >> expected, since everything is being done in software and no real I/O >> is being performed. The main thread goes to ~65%, and this is less >> expected (at least,

[ovs-dev] [PATCH 00/16] generic hashtable implementation

2012-08-14 Thread Sasha Levin
There are quite a few places in the kernel which implement a hashtable in a very similar way. Instead of having implementations of a hashtable all over the kernel, we can re-use the code. New changes since the RFC: - Addressed last comments about previous patches. - RCU support. - Simplified t

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

2012-08-14 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 --- include/linux/hashtable.h | 284 + 1 files changed, 284 insertions(+), 0 de

[ovs-dev] [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Sasha Levin
Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Signed-off-by: Sasha Levin --- kernel/user.c | 33 + 1 files changed, 13 insertions(+), 20 deletions(-) diff --git a/kernel/user.c b/kernel/us

[ovs-dev] [PATCH 03/16] mm,ksm: use new hashtable implementation

2012-08-14 Thread Sasha Levin
Switch ksm to use the new hashtable implementation. This reduces the amount of generic unrelated code in the ksm module. Signed-off-by: Sasha Levin --- mm/ksm.c | 33 +++-- 1 files changed, 15 insertions(+), 18 deletions(-) diff --git a/mm/ksm.c b/mm/ksm.c index 47

[ovs-dev] [PATCH 04/16] workqueue: use new hashtable implementation

2012-08-14 Thread Sasha Levin
Switch workqueues to use the new hashtable implementation. This reduces the amount of generic unrelated code in the workqueues. Signed-off-by: Sasha Levin --- kernel/workqueue.c | 86 +--- 1 files changed, 15 insertions(+), 71 deletions(-) diff

[ovs-dev] [PATCH 05/16] mm/huge_memory: use new hashtable implementation

2012-08-14 Thread Sasha Levin
Switch hugemem to use the new hashtable implementation. This reduces the amount of generic unrelated code in the hugemem. This also removes the dymanic allocation of the hash table. The size of the table is constant so there's no point in paying the price of an extra dereference when accessing

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

2012-08-14 Thread Sasha Levin
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 files changed, 11 insertions(+), 16 deletions(-) diff --git a/kernel/tracep

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

2012-08-14 Thread Sasha Levin
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 files changed, 10 insertions(+), 11 deletions(-) diff --git a/net/9p/error.c b/net/9p/error.c in

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

2012-08-14 Thread Sasha Levin
Switch elevator to use the new hashtable implementation. This reduces the amount of generic unrelated code in the elevator. This also removes the dymanic allocation of the hash table. The size of the table is constant so there's no point in paying the price of an extra dereference when accessin

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

2012-08-14 Thread Sasha Levin
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 files changed, 9 insertions(+), 11 deletions(-) diff --git a/net/sunrpc/cache.c b

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

2012-08-14 Thread Sasha Levin
Switch dlm to use the new hashtable implementation. This reduces the amount of generic unrelated code in the dlm. Signed-off-by: Sasha Levin --- fs/dlm/lowcomms.c | 47 +-- 1 files changed, 13 insertions(+), 34 deletions(-) diff --git a/fs/dlm/lowco

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

2012-08-14 Thread Sasha Levin
Switch l2tp to use the new hashtable implementation. This reduces the amount of generic unrelated code in l2tp. Signed-off-by: Sasha Levin --- net/l2tp/l2tp_core.c| 132 +-- net/l2tp/l2tp_core.h|8 ++-- net/l2tp/l2tp_debugfs.c | 19 +++--

[ovs-dev] [PATCH 12/16] dm: use new hashtable implementation

2012-08-14 Thread Sasha Levin
Switch dm to use the new hashtable implementation. This reduces the amount of generic unrelated code in the dm. Signed-off-by: Sasha Levin --- drivers/md/dm-snap.c | 24 --- drivers/md/persistent-data/dm-block-manager.c |1 - .../persistent-da

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

2012-08-14 Thread Sasha Levin
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 | 58 +-- 1 files changed, 28 insertions(+), 30 deletions(-) diff --git a/fs/lock

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

2012-08-14 Thread Sasha Levin
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 | 20 +- net/rds/connection.c | 102 ++ 2 files changed, 55 insertions(+),

[ovs-dev] [PATCH 15/16] openvswitch: use new hashtable implementation

2012-08-14 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 | 30 +- 1 files changed, 13 insertions(+), 17 deletions(-) diff --git a/net/openvs

[ovs-dev] [PATCH 16/16] tracing output: use new hashtable implementation

2012-08-14 Thread Sasha Levin
Switch tracing to use the new hashtable implementation. This reduces the amount of generic unrelated code in the tracing module. Signed-off-by: Sasha Levin --- kernel/trace/trace_output.c | 20 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/kernel/trace/t

Re: [ovs-dev] [PATCH] Adding Nicira vendor extension action NXAST_DEC_TTL_CNT_IDS.

2012-08-14 Thread Ben Pfaff
First, some high-level comments. We definitely need a new action at the OpenFlow protocol level, and NXAST_DEC_TTL_CNT_IDS is fine. But at higher levels I do not think that we need to make a sharp distinction. In particular: - I think that instead of "dec_ttl_cnt_ids=1:2", we could have the

Re: [ovs-dev] Threaded userspace datapath

2012-08-14 Thread Ben Pfaff
On Tue, Aug 14, 2012 at 05:33:00PM +0200, Giuseppe Lettieri wrote: > Il giorno 10/ago/2012, alle ore 19:20, Ben Pfaff ha scritto: > > > ... > >> The datapath thread goes to 100% CPU in my tests, but this is > >> expected, since everything is being done in software and no real I/O > >> is being pe

Re: [ovs-dev] [PATCH v4 01/10] ofp-actions: allow ofpacts_put_openflow10() return error

2012-08-14 Thread Ben Pfaff
On Thu, Aug 02, 2012 at 12:24:06AM +0900, Isaku Yamahata wrote: > When OF11+ only actions is introduced, ofpacts_put_openflow10() will be > unable to handle all ofp-actions. So allow it return error in that case. > > Signed-off-by: Isaku Yamahata I'd prefer to make it possible for OpenFlow 1.0 t

Re: [ovs-dev] [PATCH v4 02/10] ofp-actions: allow ofpacts_to_openflow11_{actions, instructions} return error

2012-08-14 Thread Ben Pfaff
On Thu, Aug 02, 2012 at 12:24:07AM +0900, Isaku Yamahata wrote: > When OF1.2+ only actions are introduced, > ofpacts_put_openflow11_{actions, instructions}() will be unable to handle all > ofp-actions. For such cases, allow it return error. > > Signed-off-by: Isaku Yamahata Again, I'd prefer to

Re: [ovs-dev] [PATCH v4 03/10] ofp-actions: export OVSINST_OFPIT11_xxx

2012-08-14 Thread Ben Pfaff
On Thu, Aug 02, 2012 at 12:24:08AM +0900, Isaku Yamahata wrote: > They will be used by ofp-parser.c. > > Signed-off-by: Isaku Yamahata Applied, thank you! ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH v4 04/10] ofp-actions: sort OVSINST_OFPIT11_xxx value in execution order

2012-08-14 Thread Ben Pfaff
On Thu, Aug 02, 2012 at 12:24:09AM +0900, Isaku Yamahata wrote: > This order is used by parser from text string to check if the instruction > is given in this order. > > Signed-off-by: Isaku Yamahata Applied, thank you! ___ dev mailing list dev@openvsw

Re: [ovs-dev] [PATCH v4 05/10] ofp-actions/instruction: helper functions for intructions

2012-08-14 Thread Ben Pfaff
On Thu, Aug 02, 2012 at 12:24:10AM +0900, Isaku Yamahata wrote: > This patch introduces helper functions > - to cast > - to convert from/to text > > Signed-off-by: Isaku Yamahata I think that ofpact_instruction_name_from_type() might better be written to simply index 'type' into inst_info[]. Bu

Re: [ovs-dev] [PATCH 00/16] generic hashtable implementation

2012-08-14 Thread J. Bruce Fields
On Tue, Aug 14, 2012 at 06:24:34PM +0200, Sasha Levin wrote: > SUNRPC/cache: use new hashtable implementation .. > lockd: use new hashtable implementation FWIW, these look fine (and I ran them through some nfs tests and didn't see any problems). --b. __

[ovs-dev] [bond docs 1/4] vswitch.xml: active-backup and balance-slb bonds must be one-sided.

2012-08-14 Thread Ben Pfaff
It doesn't work to hook up an active-backup bond on one switch to an active-backup bond on another switch, because they might pick different active interfaces and therefore not pass any traffic. For balance-slb the results shouldn't be as obviously bad, but balance-slb is definitely not designed c

[ovs-dev] [bond docs 2/4] vswitch.xml: Document that active-backup works OK with multiple switches.

2012-08-14 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- vswitchd/vswitch.xml |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 480fd63..4a0225c 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -820,7 +820,8 @@ active-backup

[ovs-dev] [bond docs 3/4] vswitch.xml: Generalize "carrier" to cover miimon also.

2012-08-14 Thread Ben Pfaff
I believe that saying "carrier" here excludes the miimon case, which we'd like to include also. Signed-off-by: Ben Pfaff --- vswitchd/vswitch.xml |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 4a0225c..ebbfba8 10064

[ovs-dev] [bond docs 4/4] vswitch.xml: balance-tcp can be rebalanced too.

2012-08-14 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- vswitchd/vswitch.xml |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index ebbfba8..f7b9f01 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -962,12 +962,10 @@

Re: [ovs-dev] [bond docs 1/4] vswitch.xml: active-backup and balance-slb bonds must be one-sided.

2012-08-14 Thread Ethan Jackson
> For balance-slb the results shouldn't be as obviously bad, but balance-slb > is definitely not designed considering that situation, so this commit > generalizes the advice across balance-slb also. FWIW balance-slb can't work for the same reason. They could choose different active interfaces, in

Re: [ovs-dev] [bond docs 1/4] vswitch.xml: active-backup and balance-slb bonds must be one-sided.

2012-08-14 Thread Ben Pfaff
On Tue, Aug 14, 2012 at 01:40:04PM -0700, Ethan Jackson wrote: > > For balance-slb the results shouldn't be as obviously bad, but balance-slb > > is definitely not designed considering that situation, so this commit > > generalizes the advice across balance-slb also. > > FWIW balance-slb can't wor

[ovs-dev] [PATCH] bridge: Write certain statistics to the database instantly.

2012-08-14 Thread Ethan Jackson
Traditionally the bridge has written interface and port statistics to the database in a rate limited fashion. This makes a lot of sense for statistics which are either constantly changing, or are expensive to collect. However, some statistics were rate limited which have neither of these properti

Re: [ovs-dev] [PATCH] Adding Nicira vendor extension action NXAST_DEC_TTL_CNT_IDS.

2012-08-14 Thread Mehak Mahajan
Thanks for the comments Ben. I will send out a new patch after addressing your concerns. thanx! mehak On Tue, Aug 14, 2012 at 9:33 AM, Ben Pfaff wrote: > First, some high-level comments. We definitely need a new action at > the OpenFlow protocol level, and NXAST_DEC_TTL_CNT_IDS is fine. But >

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

2012-08-14 Thread NeilBrown
On Tue, 14 Aug 2012 18:24:35 +0200 Sasha Levin wrote: > +static inline void hash_init_size(struct hlist_head *hashtable, int bits) > +{ > + int i; > + > + for (i = 0; i < HASH_SIZE(bits); i++) > + INIT_HLIST_HEAD(hashtable + i); > +} This seems like an inefficient way to do

Re: [ovs-dev] [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Eric W. Biederman
Sasha Levin writes: > Switch user_ns to use the new hashtable implementation. This reduces the > amount of > generic unrelated code in user_ns. Two concerns here. 1) When adding a new entry you recompute the hash where previously that was not done. I believe that will slow down adding of ne

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

2012-08-14 Thread Sasha Levin
On 08/15/2012 01:25 AM, NeilBrown wrote: > On Tue, 14 Aug 2012 18:24:35 +0200 Sasha Levin > wrote: > > >> +static inline void hash_init_size(struct hlist_head *hashtable, int bits) >> +{ >> +int i; >> + >> +for (i = 0; i < HASH_SIZE(bits); i++) >> +INIT_HLIST_HEAD(hashtable +

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

2012-08-14 Thread Tejun Heo
Hello, (Sasha, would it be possible to change your MUA so that it breaks long lines. It's pretty difficult to reply to.) On Wed, Aug 15, 2012 at 02:24:49AM +0200, Sasha Levin wrote: > The hashtable uses hlist. hlist provides us with an entire family of > init functions which I'm supposed to use

Re: [ovs-dev] [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Sasha Levin
On 08/15/2012 01:52 AM, Eric W. Biederman wrote: > Sasha Levin writes: > >> Switch user_ns to use the new hashtable implementation. This reduces the >> amount of >> generic unrelated code in user_ns. > > Two concerns here. > 1) When adding a new entry you recompute the hash where previously tha

Re: [ovs-dev] [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Eric W. Biederman
Sasha Levin writes: > On 08/15/2012 01:52 AM, Eric W. Biederman wrote: >> Sasha Levin writes: >> >>> Switch user_ns to use the new hashtable implementation. This reduces the >>> amount of >>> generic unrelated code in user_ns. >> >> Two concerns here. >> 1) When adding a new entry you recompu

Re: [ovs-dev] Threaded userspace datapath

2012-08-14 Thread Ed Maste
> There may be some confusion about numbering. OpenFlow says that the > port number of the "local port" is 65534 (OFPP_LOCAL). The datapaths, > on the other hand, use port number 0 for the "local port". There is > supposed to be translation going on at the interface between the > datapath and th

Re: [ovs-dev] [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Sasha Levin
On 08/15/2012 03:08 AM, Eric W. Biederman wrote: >> I can offer the following: I'll write a small module that will hash 1...1 >> > into a hashtable which uses 7 bits (just like user_ns) and post the >> > distribution >> > we'll get. > That won't hurt. I think 1-100 then 1000-1100 may actually

Re: [ovs-dev] [PATCH v4 05/10] ofp-actions/instruction: helper functions for intructions

2012-08-14 Thread Isaku Yamahata
On Tue, Aug 14, 2012 at 10:02:24AM -0700, Ben Pfaff wrote: > On Thu, Aug 02, 2012 at 12:24:10AM +0900, Isaku Yamahata wrote: > > This patch introduces helper functions > > - to cast > > - to convert from/to text > > > > Signed-off-by: Isaku Yamahata > > I think that ofpact_instruction_name_from_

[ovs-dev] STT

2012-08-14 Thread Learner Study
Hello, I have following questions: 1. Are there any plans to support STT overlay in OVS? 2. Are there any compliance reports available for OVS wrt support for OpenFlow 1.0, and supported overlays such as capwap, GRE implementation. Could someone point me to any available data? Thanks in advance

Re: [ovs-dev] [PATCH v4 01/10] ofp-actions: allow ofpacts_put_openflow10() return error

2012-08-14 Thread Isaku Yamahata
On Tue, Aug 14, 2012 at 09:43:16AM -0700, Ben Pfaff wrote: > On Thu, Aug 02, 2012 at 12:24:06AM +0900, Isaku Yamahata wrote: > > When OF11+ only actions is introduced, ofpacts_put_openflow10() will be > > unable to handle all ofp-actions. So allow it return error in that case. > > > > Signed-off-b

Re: [ovs-dev] [PATCH v4 02/10] ofp-actions: allow ofpacts_to_openflow11_{actions, instructions} return error

2012-08-14 Thread Isaku Yamahata
On Tue, Aug 14, 2012 at 09:46:05AM -0700, Ben Pfaff wrote: > On Thu, Aug 02, 2012 at 12:24:07AM +0900, Isaku Yamahata wrote: > > When OF1.2+ only actions are introduced, > > ofpacts_put_openflow11_{actions, instructions}() will be unable to handle > > all > > ofp-actions. For such cases, allow it

Re: [ovs-dev] STT

2012-08-14 Thread Jesse Gross
On Tue, Aug 14, 2012 at 7:05 PM, Learner Study wrote: > Hello, > > I have following questions: > > 1. Are there any plans to support STT overlay in OVS? There has been some work in the past but some additional infrastructure is necessary to support it first. > 2. Are there any compliance reports

Re: [ovs-dev] [PATCH v3] ofp-actions: Implement writing to metadata field

2012-08-14 Thread Isaku Yamahata
Basically it looks good. One minor comment inline. On Wed, Aug 15, 2012 at 12:28:47AM +1200, Joe Stringer wrote: > diff --git a/lib/ofp-actions.h b/lib/ofp-actions.h > index 272b8e8..a16c04a 100644 > --- a/lib/ofp-actions.h > +++ b/lib/ofp-actions.h ... > @@ -311,6 +311,15 @@ struct ofpact_fin_tim

Re: [ovs-dev] [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Eric W. Biederman
Sasha Levin writes: > On 08/15/2012 03:08 AM, Eric W. Biederman wrote: >>> I can offer the following: I'll write a small module that will hash >>> 1...1 >>> > into a hashtable which uses 7 bits (just like user_ns) and post the >>> > distribution >>> > we'll get. >> That won't hurt. I think

Re: [ovs-dev] [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Mathieu Desnoyers
* Eric W. Biederman (ebied...@xmission.com) wrote: > Sasha Levin writes: > > > On 08/15/2012 03:08 AM, Eric W. Biederman wrote: > >>> I can offer the following: I'll write a small module that will hash > >>> 1...1 > >>> > into a hashtable which uses 7 bits (just like user_ns) and post the >