Re: [ovs-dev] [of1.1 v3 00/13] third revision of OF1.1 patches

2012-06-27 Thread Ben Pfaff
On Tue, Jun 26, 2012 at 11:53:43PM -0700, Ben Pfaff wrote: > The first five patches here are ready for review. The rest need > work. I've indicated changes from v2 in the individual patches. > > This is also available from git://benpfaff.org/openvswitch in the > of1.1 branch. I pushed refinemen

Re: [ovs-dev] debugging "make check" failures

2012-06-27 Thread ravi kerur
Never mind, I figured it out. Thanks for the inputs. On Wed, Jun 27, 2012 at 11:11 AM, ravi kerur wrote: > Thanks Ethan. Core file generation is enabled. However, I do not see > any core files under failed test directory i.e > tests/testsuite.dir/0449. Is the generated core file available in that

Re: [ovs-dev] [PATCH 1/2] lib/ofp-actions: simplify ofpact_form_openflow1x()

2012-06-27 Thread Ben Pfaff
On Thu, Jun 28, 2012 at 01:47:42PM +0900, Isaku Yamahata wrote: > Define NXAST_ACTION instead of listing all OFPUTIL_NXAST_xxx. > > Signed-off-by: Isaku Yamahata That's a good idea, thank you. I folded this in to "ofp-actions: Add decoding and encoding OF1.1 instructions and actions." and trans

Re: [ovs-dev] [of1.1 v3 02/13] openflow: Move enums for "packet_out" and "flow_mod" to common header.

2012-06-27 Thread Ben Pfaff
On Thu, Jun 28, 2012 at 05:43:28PM +1200, Joe Stringer wrote: > On 28 June 2012 17:32, Ben Pfaff wrote: > > On Thu, Jun 28, 2012 at 05:30:33PM +1200, Joe Stringer wrote: > >> Reviewed-by: Joe Stringer > >> Signed-off-by: Ben Pfaff > >> --- > >> v4: Fix build errors, test failures. > > > > Er, ye

Re: [ovs-dev] [of1.1 v3 02/13] openflow: Move enums for "packet_out" and "flow_mod" to common header.

2012-06-27 Thread Joe Stringer
On 28 June 2012 17:32, Ben Pfaff wrote: > On Thu, Jun 28, 2012 at 05:30:33PM +1200, Joe Stringer wrote: >> Reviewed-by: Joe Stringer >> Signed-off-by: Ben Pfaff >> --- >> v4: Fix build errors, test failures. > > Er, yeah, oops.  I had already applied the same change locally, sorry > for wasting

Re: [ovs-dev] [of1.1 v3 02/13] openflow: Move enums for "packet_out" and "flow_mod" to common header.

2012-06-27 Thread Ben Pfaff
On Thu, Jun 28, 2012 at 05:30:33PM +1200, Joe Stringer wrote: > Reviewed-by: Joe Stringer > Signed-off-by: Ben Pfaff > --- > v4: Fix build errors, test failures. Er, yeah, oops. I had already applied the same change locally, sorry for wasting your time. _

Re: [ovs-dev] [of1.1 v3 02/13] openflow: Move enums for "packet_out" and "flow_mod" to common header.

2012-06-27 Thread Joe Stringer
Reviewed-by: Joe Stringer Signed-off-by: Ben Pfaff --- v4: Fix build errors, test failures. --- include/openflow/openflow-1.0.h|4 +--- include/openflow/openflow-1.1.h|4 +--- include/openflow/openflow-common.h |4 lib/ofp-util.c | 10 +- 4

Re: [ovs-dev] asking the example to use openflow protocol to limit the flow rate in openvswitch

2012-06-27 Thread Justin Pettit
What do you mean by hands-on? From NOX? I don't think it speaks OVSDB. I'd probably start off by using ovs-vsctl and ovs-ofctl to manually configure what you want. Translating from ovs-ofctl to OpenFlow should be pretty straight-forward, since the commands map pretty directly to OpenFlow. F

Re: [ovs-dev] asking the example to use openflow protocol to limit the flow rate in openvswitch

2012-06-27 Thread trinh tri
Thank you very much Mr. Petit for the prompt reply. Do you know any hand-on example to implement that?    Trinh Minh Tri - PhD Student, Department of Electrical Engineering Chulalongkorn University, Bangkok 10330, Thailand. Phone:0824566602 Email: no.

Re: [ovs-dev] asking the example to use openflow protocol to limit the flow rate in openvswitch

2012-06-27 Thread Justin Pettit
The configuration of QoS is done through the OVSDB protocol, which handle switch-level configuration. You can then use OpenFlow to direct flows to particular queues that you've configured through OVSDB. There are C and Python bindings to OVSDB (but I don't think NOX makes use of them) or you c

[ovs-dev] [PATCH 2/2] lib/ofp-actions: ofpacts_from_openflow11 doesn't put OFPACT_END

2012-06-27 Thread Isaku Yamahata
The logic of ofpacts_from_openflow11() should be same to ofpacts_from_openflow10(), so consolidate them. Thus the issue is fixed. Signed-off-by: Isaku Yamahata --- lib/ofp-actions.c | 44 +++- 1 files changed, 15 insertions(+), 29 deletions(-) diff --gi

[ovs-dev] [PATCH 1/2] lib/ofp-actions: simplify ofpact_form_openflow1x()

2012-06-27 Thread Isaku Yamahata
Define NXAST_ACTION instead of listing all OFPUTIL_NXAST_xxx. Signed-off-by: Isaku Yamahata --- lib/ofp-actions.c | 45 + 1 files changed, 5 insertions(+), 40 deletions(-) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index d527dcd..ba9e61c 100

[ovs-dev] asking the example to use openflow protocol to limit the flow rate in openvswitch

2012-06-27 Thread trinh tri
Dear openvswitch dev! I'm trying to implement a system which can dynamically control the flow rate limiting of openvswitch. And would like control that rate from NOX controller via openflow protocol. Could you suggest me how to implement that system and is there any example about that system t

Re: [ovs-dev] [RFC v4 00/63] Preliminary Open Flow 1.2 Message Support

2012-06-27 Thread Simon Horman
On Wed, Jun 27, 2012 at 07:28:46AM -0700, Ben Pfaff wrote: > On Wed, Jun 27, 2012 at 05:19:36PM +0900, Simon Horman wrote: > > this series is based on v2 of your Open Flow 1.1 work. > > Please let me know if you feel that I should rebase on top of v3. > > It's probably not necessary, because my v3

Re: [ovs-dev] jhash2

2012-06-27 Thread Jesse Gross
On Wed, Jun 27, 2012 at 7:15 PM, Learner Study wrote: > Hello, > > I'm using ovs and would like to use my own algorithm for hash related > operations in ovs code base. > > I have identified that ovs_flow_hash() makes calls to jhash2() > function inside Linux kernel. Would it sufficient to replace

Re: [ovs-dev] [PATCH 2/2] Adds parsing of OpenFlow 1.1+ Metadata

2012-06-27 Thread Joe Stringer
Related -- I've been looking into implementing OFPIT_WRITE_METADATA on top of your work at git://benpfaff.org/openvswitch on the of1.1 branch, and I have some related thoughts. So, with the above patch, I have used reg_load to load (fully-masked) metadata. Am I correct in understanding that reg_lo

[ovs-dev] jhash2

2012-06-27 Thread Learner Study
Hello, I'm using ovs and would like to use my own algorithm for hash related operations in ovs code base. I have identified that ovs_flow_hash() makes calls to jhash2() function inside Linux kernel. Would it sufficient to replace jhash2 function w/ my own hash function (with exactly same semantic

Re: [ovs-dev] [PATCH 2/2] ofproto: Report nonexistent ports and queues as errors in queue stats.

2012-06-27 Thread Ben Pfaff
On Wed, Jun 27, 2012 at 02:25:55PM -0700, Pravin Shelar wrote: > >> I am seeing this test failure on my machine. > > > > OK, what's in the test's testsuite.log? > > > > I've reposted these two patches now. > > I do not see any failure with new patches. Oh, I see. Thanks, I'll push the new versio

Re: [ovs-dev] [queue-stats v2 2/2] ofproto: Report nonexistent ports and queues as errors in queue stats.

2012-06-27 Thread Ben Pfaff
You mentioned test failures before, but I didn't actually change anything in this version. Do you still get test failures? Thanks, Ben. On Wed, Jun 27, 2012 at 02:26:13PM -0700, Pravin Shelar wrote: > Looks good. > > On Wed, Jun 27, 2012 at 10:05 AM, Ben Pfaff wrote: > > Until now, Open vSwit

Re: [ovs-dev] [queue-stats v2 1/2] ovs-ofctl: Fix handling of unexpected replies in dump_stats_transaction().

2012-06-27 Thread Pravin Shelar
Looks good. Thanks, Pravin. On Wed, Jun 27, 2012 at 10:05 AM, Ben Pfaff wrote: > dump_stats_transaction() ignored errors and other non-stats replies to > its request and would continue to wait forever.  This fixes the problem. > > Signed-off-by: Ben Pfaff > --- > v1 was here: http://openvswitch

Re: [ovs-dev] [queue-stats v2 2/2] ofproto: Report nonexistent ports and queues as errors in queue stats.

2012-06-27 Thread Pravin Shelar
Looks good. On Wed, Jun 27, 2012 at 10:05 AM, Ben Pfaff wrote: > Until now, Open vSwitch has ignored missing ports and queues in most cases > in queue stats requests, simply returning an empty set of statistics. > It seems that it is better to report an error, so this commit does this. > > Report

Re: [ovs-dev] [PATCH 2/2] ofproto: Report nonexistent ports and queues as errors in queue stats.

2012-06-27 Thread Pravin Shelar
On Wed, Jun 27, 2012 at 10:05 AM, Ben Pfaff wrote: > On Tue, Jun 26, 2012 at 04:03:32PM -0700, Pravin Shelar wrote: >> On Mon, Jun 11, 2012 at 11:26 AM, Ben Pfaff wrote: >> > Until now, Open vSwitch has ignored missing ports and queues in most cases >> > in queue stats requests, simply returning

Re: [ovs-dev] [RFC v4 00/63] Preliminary Open Flow 1.2 Message Support

2012-06-27 Thread Ben Pfaff
I found one patch that I was able to apply cleanly to master and push (I followed up separately to that one). If there are any other patches that are well suited for this (or that could easily be made suited for it) let me know, so that we can pick off a little of this stuff early. Thanks, Ben.

Re: [ovs-dev] [PATCH 16/63] openflow: Add Open Flow 1.2 to ofp_to_string__()

2012-06-27 Thread Ben Pfaff
On Wed, Jun 27, 2012 at 05:19:52PM +0900, Simon Horman wrote: > Signed-off-by: Simon Horman I pushed this one to master as follows: --8<--cut here-->8-- From: Simon Horman Date: Wed, 27 Jun 2012 17:19:52 +0900 Subject: [PATCH] openflow: Add Open

Re: [ovs-dev] [worker v2 10/14] vlog: Use worker process to write to log file.

2012-06-27 Thread Ethan Jackson
Thanks, looks good. Ethan On Wed, Jun 27, 2012 at 11:25 AM, Ben Pfaff wrote: > Writes to regular files under Unix-like kernels, including Linux, typically > block until the write is complete, regardless of O_NONBLOCK.  When the I/O > subsystem is busy, this can cause indefinite delays.  We have

Re: [ovs-dev] [worker v2 08/14] worker: New library for breaking a daemon into multiple processes.

2012-06-27 Thread Ethan Jackson
All of this makes sense, thanks. Ethan On Wed, Jun 27, 2012 at 11:25 AM, Ben Pfaff wrote: > ovs-vswitchd is effectively a "soft real-time" process, because flows that > do not get set up quickly lead to packet loss or retransmission.  We've > done our best to keep it from blocking unnecessarily,

Re: [ovs-dev] [PATCH] ovs-ctl: Add additional options to strace wrapper.

2012-06-27 Thread Ben Pfaff
On Wed, Jun 27, 2012 at 01:44:00PM -0700, Ethan Jackson wrote: > It's useful to know how long each system call took, and at what > time each system call happened. In addition this patch causes > strace to print strings more fully allowing log messages to be seen > in the output. > > Signed-off-by

[ovs-dev] [PATCH] ovs-ctl: Add additional options to strace wrapper.

2012-06-27 Thread Ethan Jackson
It's useful to know how long each system call took, and at what time each system call happened. In addition this patch causes strace to print strings more fully allowing log messages to be seen in the output. Signed-off-by: Ethan Jackson --- utilities/ovs-lib.in |2 +- 1 file changed, 1 ins

[ovs-dev] [worker v2 14/14] system-stats: Run as part of worker process.

2012-06-27 Thread Ben Pfaff
The stats gathering can be time-consuming in some cases, so it's better to do it in the worker process. Signed-off-by: Ben Pfaff --- vswitchd/bridge.c | 59 - vswitchd/system-stats.c | 160 +-- vswitchd/system-stats.h |6 +-

[ovs-dev] [worker v2 13/14] system-stats: Use "smap" instead of "shash".

2012-06-27 Thread Ben Pfaff
"smap" is now the appropriate data structure for a string-to-string map. Also changes ovsdb_datum_from_shash() into ovsdb_datum_from_smap() since system-stats related code was the only client. Signed-off-by: Ben Pfaff --- lib/ovsdb-data.c| 19 --- lib/ovsdb-data.h|

[ovs-dev] [worker v2 12/14] smap: New function smap_steal().

2012-06-27 Thread Ben Pfaff
An upcoming commit will add a caller. Signed-off-by: Ben Pfaff --- lib/smap.c | 12 lib/smap.h |3 ++- 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/lib/smap.c b/lib/smap.c index e612ac7..ff78598 100644 --- a/lib/smap.c +++ b/lib/smap.c @@ -125,6 +125,18 @@ s

[ovs-dev] [worker v2 11/14] smap: New functions smap_from_json(), smap_to_json().

2012-06-27 Thread Ben Pfaff
These will acquire a caller in an upcoming commit. Signed-off-by: Ben Pfaff --- lib/smap.c | 36 lib/smap.h |5 + 2 files changed, 41 insertions(+), 0 deletions(-) diff --git a/lib/smap.c b/lib/smap.c index 8665321..e612ac7 100644 --- a/lib/smap.c

[ovs-dev] [worker v2 10/14] vlog: Use worker process to write to log file.

2012-06-27 Thread Ben Pfaff
Writes to regular files under Unix-like kernels, including Linux, typically block until the write is complete, regardless of O_NONBLOCK. When the I/O subsystem is busy, this can cause indefinite delays. We have actually observed "write" calls sleep for 5 seconds or more for this reason. Delegati

[ovs-dev] [worker v2 09/14] vlog: Use system calls instead of stdio to write log files.

2012-06-27 Thread Ben Pfaff
This will be easier to deal with in an upcoming commit that will use a subprocess to do asynchronous log I/O. Signed-off-by: Ben Pfaff --- lib/vlog.c | 24 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/vlog.c b/lib/vlog.c index 108c84e..bcfec7b 1

[ovs-dev] [worker v2 08/14] worker: New library for breaking a daemon into multiple processes.

2012-06-27 Thread Ben Pfaff
ovs-vswitchd is effectively a "soft real-time" process, because flows that do not get set up quickly lead to packet loss or retransmission. We've done our best to keep it from blocking unnecessarily, but some operations unavoidably block. This new library allows a daemon to break itself up into a

[ovs-dev] [worker v2 07/14] vlog: Add VLOG_ABORT() to log and call abort().

2012-06-27 Thread Ben Pfaff
Whereas VLOG_FATAL() eventually calls exit(1), VLOG_ABORT() eventually calls abort(). The key difference is that abort() will cause a "monitor" process to restart, where exit(1) will cause it to exit along with the monitored process. Signed-off-by: Ben Pfaff --- lib/util.c |9 +++-- lib

[ovs-dev] [worker v2 06/14] daemon: Factor out code into new function daemonize_post_detach().

2012-06-27 Thread Ben Pfaff
This code will have another user in an upcoming commit. Signed-off-by: Ben Pfaff --- lib/daemon.c | 27 ++- lib/daemon.h |1 + 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/daemon.c b/lib/daemon.c index a2eff07..84ed614 100644 --- a/lib/daemon.

[ovs-dev] [worker v2 05/14] daemon: Factor out code into new function fork_and_wait_for_startup().

2012-06-27 Thread Ben Pfaff
This function will be useful in an upcoming commit. Signed-off-by: Ben Pfaff --- lib/daemon.c | 33 +++-- lib/daemon.h |2 ++ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/lib/daemon.c b/lib/daemon.c index ecca606..a2eff07 100644 --- a/lib/daem

[ovs-dev] [worker v2 04/14] util: Introduce "subprogram_name" to identify subprocesses and threads.

2012-06-27 Thread Ben Pfaff
This will be more useful later when we introduces "worker" subprocesses. I don't have any current plans to introduce threading, but I can't think of a disadvantage to wording this in a general manner. Signed-off-by: Ben Pfaff --- NEWS |4 +++- lib/daemon.c |

[ovs-dev] [worker v2 03/14] socket-util: Add functions for sending fds over Unix domain sockets.

2012-06-27 Thread Ben Pfaff
These will be used in upcoming commits. This commit also adds corresponding definitions to the "sparse" header, so that sparse still works. Signed-off-by: Ben Pfaff --- include/sparse/sys/socket.h | 31 + lib/socket-util.c | 255 +++ lib/

[ovs-dev] [worker v2 02/14] socket-util: New function xset_nonblocking().

2012-06-27 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/fatal-signal.c |4 ++-- lib/process.c |6 +++--- lib/signals.c |6 +++--- lib/socket-util.c |8 lib/socket-util.h |2 ++ 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lib/fatal-signal.c b/lib/fatal-signal.

[ovs-dev] [worker v2 01/14] socket-util: Remove 'passcred' parameter from make_unix_socket().

2012-06-27 Thread Ben Pfaff
Nothing in the tree ever tries to send or receive credentials over a Unix domain socket so there's no point in configuring them to be received. Signed-off-by: Ben Pfaff --- lib/socket-util.c| 15 ++- lib/socket-util.h|4 ++-- lib/stream-unix.c|4 ++--

[ovs-dev] [worker v2 00/14] Implement "worker process" to avoid blocking flow setup

2012-06-27 Thread Ben Pfaff
ovs-vswitchd occasionally needs to do some activities that may block in the kernel unavoidably. This patch series changes ovs-vswitchd to do these activities in a separate "worker process". This second version of the patch series applies feedback from Ethan and revises patch 11 and 12 into patche

Re: [ovs-dev] debugging "make check" failures

2012-06-27 Thread ravi kerur
Thanks Ethan. Core file generation is enabled. However, I do not see any core files under failed test directory i.e tests/testsuite.dir/0449. Is the generated core file available in that directory or some place else? or it could be that ovs-vswitchd didn't segfault at all? openvswitch# ulimit -a c

Re: [ovs-dev] [worker 11/12] shash: New functions smap_from_json(), smap_to_json().

2012-06-27 Thread Ben Pfaff
This patch and patch 12 need some revision for the new "smap" data structure. I'll send out revised versions in a bit. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [worker 10/12] vlog: Use worker process to write to log file.

2012-06-27 Thread Ben Pfaff
On Tue, Jun 26, 2012 at 06:31:33PM -0700, Ethan Jackson wrote: > Looks good to me. > > I would prefer vlog_async_inited be initialized to false, though I'm > not sure if the C sped requires it. You would know better than me. It's not required (static variables are initialized to zero) but I don'

Re: [ovs-dev] [worker 08/12] worker: New library for breaking a daemon into multiple processes.

2012-06-27 Thread Ben Pfaff
On Tue, Jun 26, 2012 at 06:17:17PM -0700, Ethan Jackson wrote: > Looks good to me, couple of questions. > > From worker_start() it looks to me like worker_main() never exists? > What if a user wants to ask ovs-vswitchd to exit cleanly using appctl? > Will the child process simply be killed? work

Re: [ovs-dev] [PATCH 2/2] ofproto: Report nonexistent ports and queues as errors in queue stats.

2012-06-27 Thread Ben Pfaff
On Tue, Jun 26, 2012 at 04:03:32PM -0700, Pravin Shelar wrote: > On Mon, Jun 11, 2012 at 11:26 AM, Ben Pfaff wrote: > > Until now, Open vSwitch has ignored missing ports and queues in most cases > > in queue stats requests, simply returning an empty set of statistics. > > It seems that it is bette

[ovs-dev] [queue-stats v2 2/2] ofproto: Report nonexistent ports and queues as errors in queue stats.

2012-06-27 Thread Ben Pfaff
Until now, Open vSwitch has ignored missing ports and queues in most cases in queue stats requests, simply returning an empty set of statistics. It seems that it is better to report an error, so this commit does this. Reported-by: Prabina Pattnaik Signed-off-by: Ben Pfaff --- v1 was here: http:/

[ovs-dev] [queue-stats v2 1/2] ovs-ofctl: Fix handling of unexpected replies in dump_stats_transaction().

2012-06-27 Thread Ben Pfaff
dump_stats_transaction() ignored errors and other non-stats replies to its request and would continue to wait forever. This fixes the problem. Signed-off-by: Ben Pfaff --- v1 was here: http://openvswitch.org/pipermail/dev/2012-June/017779.html v2: Fix dumb assumption that all replies are queue s

Re: [ovs-dev] [PATCH 1/2] ovs-ofctl: Fix handling of unexpected replies in dump_stats_transaction().

2012-06-27 Thread Ben Pfaff
On Tue, Jun 26, 2012 at 04:00:00PM -0700, Pravin Shelar wrote: > On Mon, Jun 11, 2012 at 11:26 AM, Ben Pfaff wrote: > > dump_stats_transaction() ignored errors and other non-stats replies to > > its request and would continue to wait forever.  This fixes the problem. > > > > Signed-off-by: Ben Pfa

Re: [ovs-dev] [PATCH 1/1] xenserver: Improve efficiency of code by using get_all_records_where()

2012-06-27 Thread Ben Pfaff
Thanks, pushed to master. Let me know if you need it on any other branches. On Wed, Jun 27, 2012 at 05:30:13PM +0100, Dominic Curran wrote: > Rob wrote it. > I read through it and OK'd it. > > Thanks > dom > > > -Original Message- > > From: Ben Pfaff [mailto:b...@nicira.com] > > Sent: 2

Re: [ovs-dev] [PATCH 1/1] xenserver: Improve efficiency of code by using get_all_records_where()

2012-06-27 Thread Dominic Curran
Rob wrote it. I read through it and OK'd it. Thanks dom > -Original Message- > From: Ben Pfaff [mailto:b...@nicira.com] > Sent: 27 June 2012 17:26 > To: Dominic Curran > Cc: dev@openvswitch.org; Rob Hoes > Subject: Re: [ovs-dev] [PATCH 1/1] xenserver: Improve efficiency of > code by using

Re: [ovs-dev] [PATCH 1/1] xenserver: Improve efficiency of code by using get_all_records_where()

2012-06-27 Thread Ben Pfaff
On Wed, Jun 27, 2012 at 04:14:21PM +0100, Dominic Curran wrote: > Replace the get_record() for network references which caused as many > slave-to-master calls as there are Network records plus one. > The get_all_records_where() call gets exactly what is needed with a single > call. > > Signed-off-

[ovs-dev] [PATCH 1/1] xenserver: Improve efficiency of code by using get_all_records_where()

2012-06-27 Thread Dominic Curran
Replace the get_record() for network references which caused as many slave-to-master calls as there are Network records plus one. The get_all_records_where() call gets exactly what is needed with a single call. Signed-off-by: Rob Hoes Acked-by: Dominic Curran --- .../usr_share_openvswitch_scrip

Re: [ovs-dev] [RFC v4 00/63] Preliminary Open Flow 1.2 Message Support

2012-06-27 Thread Ben Pfaff
On Wed, Jun 27, 2012 at 05:19:36PM +0900, Simon Horman wrote: > this series is based on v2 of your Open Flow 1.1 work. > Please let me know if you feel that I should rebase on top of v3. It's probably not necessary, because my v3 is so preliminary, and the patches that are close to being ready are

Re: [ovs-dev] [PATCH] lib/meta-flow: introduce a macro, CASE_MFF_REGS, to catch "case MFF_REG:"

2012-06-27 Thread Ben Pfaff
On Wed, Jun 27, 2012 at 04:21:32PM +0900, Isaku Yamahata wrote: > Introduce a macro instead for > With this macro, the code is a bit reduced. > test: compile-tested and unit tests passed. > > Signed-off-by: Isaku Yamahata Thanks. I made some adjustments to suit my idea of style and pushed this.

Re: [ovs-dev] [of1.1 v3 01/13] nicira-ext: Fix typo in comment.

2012-06-27 Thread Ben Pfaff
Thanks, I pushed this one. On Wed, Jun 27, 2012 at 08:25:12PM +1200, Joe Stringer wrote: > Seems that I missed this one. Looks good. > > On 27 June 2012 18:53, Ben Pfaff wrote: > > Signed-off-by: Ben Pfaff > > --- > > v3: New patch. > > --- > >  include/openflow/nicira-ext.h |    2 +- > >  1 fi

Re: [ovs-dev] [RFC v4 00/63] Preliminary Open Flow 1.2 Message Support

2012-06-27 Thread Simon Horman
On Wed, Jun 27, 2012 at 05:19:36PM +0900, Simon Horman wrote: > Hi Ben, > > this series is based on v2 of your Open Flow 1.1 work. > Please let me know if you feel that I should rebase on top of v3. > > Also, I apologise for not having reviewed v3 of your patches yet, > I will try to get to it be

[ovs-dev] [PATCH 63/63] Local Hack: Allow Open Flow 1.2 session to be negotiated

2012-06-27 Thread Simon Horman
* request OFP12_VERSION * Reset ofconn to OF1.2 * Allow OF1.2 to be used as a dump protocol --- lib/ofp-util.c| 1 + lib/vconn.c | 14 +++--- ofproto/connmgr.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index fe3d911..

[ovs-dev] [PATCH 61/63] ovs-util: Enable decoding of Open Flow 1.1 & 1.2 Queue Stats Response

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial post --- lib/ofp-util.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 99d4269..fe3d911 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -966,6 +966,8 @@ static const struct ofputil_msg_type ofputil_m

[ovs-dev] [PATCH 62/63] ovs-ofpctl: Enable queue-stats for Open Flow 1.1 & 1.2

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial Post --- utilities/ovs-ofctl.c | 41 - 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 252d94f..f26356e 100644 --- a/utilities/ovs-ofctl.c +++

[ovs-dev] [PATCH 57/63] ofp-print: Enable display of Open Flow 1.1 & 1.2 Queue Status Reply Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial Post --- lib/ofp-print.c | 63 ++--- 1 file changed, 47 insertions(+), 16 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index e80c597..ac905a7 100644 --- a/lib/ofp-print.c +++ b/lib/o

[ovs-dev] [PATCH 60/63] ovs-print: Enable display of Open Flow 1.1 & 1.2 Queue Stats Response

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial Post --- lib/ofp-print.c | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index ac905a7..356ade3 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1351,13

[ovs-dev] [PATCH 53/63] ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port Reply Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial Post --- lib/ofp-print.c | 85 + 1 file changed, 62 insertions(+), 23 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 9c40efe..8473a03 100644 --- a/lib/ofp-print.c +++ b/lib/o

[ovs-dev] [PATCH 59/63] ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Queue Stats Request Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial Post --- lib/ofp-util.c| 4 ofproto/ofproto.c | 33 + 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index f430dc3..99d4269 100644 --- a/lib/ofp-util.c +++ b/l

[ovs-dev] [PATCH 58/63] ofp-util: Allow encoding of Open Flow 1.1 & 1.2 Queue Stats Reply Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial Post --- ofproto/ofproto.c | 40 ++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 6d54b5a..4c5fe9b 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto

[ovs-dev] [PATCH 56/63] ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Port Status Response Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial post --- lib/ofp-util.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index e8d96ff..f430dc3 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -960,6 +960,8 @@ static const struct ofputil_msg_type ofputil_m

[ovs-dev] [PATCH 55/63] ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Port Status Request Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial Post --- lib/ofp-util.c| 4 ofproto/ofproto.c | 27 --- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index fdded88..e8d96ff 100644 --- a/lib/ofp-util.c +++ b/lib/ofp

[ovs-dev] [PATCH 52/63] ofp-util: Pass vconn to fetch_port_by_features()

2012-06-27 Thread Simon Horman
Pass vconn to fetch_port_by_features() and callers. In some cases this will reduce the number of connections that ovs-ofputil sets up. It should not alter the behaviour of ovs-ofputil. Signed-off-by: Simon Horman --- v5 * Initial post --- utilities/ovs-ofctl.c | 41 ++-

[ovs-dev] [PATCH 54/63] ofp-print: Allow display of Open Flow 1.1 & 1.2 Port Status Request Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial Post --- lib/ofp-print.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 8473a03..e80c597 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1074,8 +1074,23 @@ stati

[ovs-dev] [PATCH 51/63] ovs-ofputil: Make str_to_port_no() aware of invalid ports

2012-06-27 Thread Simon Horman
Open Flow 1.1 and 1.2 make use of 32 bit ports, however Open vSwtich maps them to 16 bits. Make ovs-ofputl aware of this. Also, only accept ports that fit into 16 bits for Open Flow 1.0. Signed-off-by: Simon Horman --- v5 * Initial post --- utilities/ovs-ofctl.c | 38 +

[ovs-dev] [PATCH 49/63] ofp-util: Allow encoding of Open Flow 1.1 & 1.2 Port Statistics Reply Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * Initial post --- ofproto/ofproto.c | 64 +-- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index d70208d..c71ec14 100644 --- a/ofproto

[ovs-dev] [PATCH 48/63] ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Table Statistics Request Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Manual rebase * Add OFPST_TABLE entry for Open Flow 1.1 and 1.2 to ofputil_msg_types, this wires-up decoding of table statistics messages. v4 * Initial post Fix dump-tables --- include/openflow/openflow-1.1.h | 4 ++ include/openflow/openflow-1.2.h |

[ovs-dev] [PATCH 47/63] nxast: Use ofp11_aggregate_stats_reply for NXAST replies

2012-06-27 Thread Simon Horman
I am unsure of the overall merit if this change, but it does allow to avoid a small amount of code duplication. Signed-off-by: Simon Horman --- v5 * Manual rebase v4 * Manual rebase * Use an extra level of indirection for the msg argument of ofputil_encode_aggregate_stats_reply__ as the valu

[ovs-dev] [PATCH 46/63] ofp-print: Enable display of Open Flow 1.1 & 1.2 Table Stats Reply Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial post --- lib/ofp-print.c | 162 +++- 1 file changed, 148 insertions(+), 14 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index cb1ff3a..7a373e7 100644 --- a/lib/ofp-print.c +++ b/lib/

[ovs-dev] [PATCH 50/63] ovs-ofctl: Make dump-ports aware of different Open Flow versions

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial post --- utilities/ovs-ofctl.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index a4361bd..146522c 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/

[ovs-dev] [PATCH 45/63] ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Flow Aggregate Statistics Response Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Manual rebase * Place OFPST12_REPLY(OFPST11_AGGREGATE,... below OFPST12_REPLY(OFPST11_FLOW... This is consistent with the ordering for Open Flow 1.0. v4 * Use OFPUTIL_OFPST11_AGGREGATE_REPLY as code for Open Flow 1.1 and 1.2 messages. * Don't explicitl

[ovs-dev] [PATCH 42/63] ofp-util: Allow decoding of Open Flow 1.2 Flow Statistics Request Messages

2012-06-27 Thread Simon Horman
Allow decoding of Open Flow 1.1 and 1.2 flow and aggregate flow statistics request messages. Signed-off-by: Simon Horman --- v5 * Manual rebase v4 * Use OFPG11_ANY in place of OFPG_ANY. The value is the same, but it seems to make sense to use the Open Flow 1.1 constant when working with Op

[ovs-dev] [PATCH 39/63] ofp-util: Enable decoding of more Open Flow 1.1 and 1.2 messages

2012-06-27 Thread Simon Horman
Enable the decoding of some Open Flow 1.2 and 1.1 messages which have the same wire-format and thus decoders as Open Flow 1.0. Signed-off-by: Simon Horman --- v5 * Add OFPST_PORT_DESC reply for Open Flow 1.1 and 1.2 v4 * Consistently use OFPT12 to initialise elements of ofputil_msg_types for

[ovs-dev] [PATCH 43/63] openflow: Rename ofp_aggregate_stats_reply as ofp10_aggregate_stats_reply

2012-06-27 Thread Simon Horman
Open Flow 1.0 uses a different alignment of members to Open Flow 1.1 and 1.2. For this reason I would like to add a struct ofp11_aggregate_stats_reply in a subsequent patch. In preparation for that rename ofp_aggregate_stats_reply. Signed-off-by: Simon Horman --- v5 * No change v4 * No change

[ovs-dev] [PATCH 41/63] ofp-util: Allow decoding of Open Flow 1.2 Flow Statistics Response Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Manual rebase * Use padded_match_len parameter of ofputil_pull_ofp12_match() to obtain the length of a match. Using the remaining length of the message only works for the last flow. v4 * Don't explicitly pill the pad of the header of the message. This

[ovs-dev] [PATCH 40/63] ofp-util: Allow encoding of Open Flow 1.2 Flow Statistics Response Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * Do not manually add header pad, it is handled by ofputil_postappend_stats_reply() v3 * Initial post --- lib/ofp-util.c| 24 ++-- lib/ofp-util.h| 3 ++- ofproto/ofproto.c | 2 +- 3 files changed, 25 insertions(

[ovs-dev] [PATCH 37/63] ofp-util: Prepare Packet Out encoder for other Open Flow versions

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * Manual rebase v3 * Add protocol variable to do_probe(). Previously this was added by a separate patch. v2 * No change --- lib/learning-switch.c | 4 ++-- lib/ofp-util.c| 30 ++ lib/ofp-util.h|

[ovs-dev] [PATCH 35/63] ofp-util: Prepare Packet Out decoder for other Open Flow versions

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * No change v3 * Differentiate versions using oh->version rather than relying on a separate code for each version of the Packet Out message. v2 * No change --- lib/ofp-print.c | 4 ++-- lib/ofp-util.c| 35 +++-

[ovs-dev] [PATCH 44/63] ofp-print: Allow display of Open Flow 1.1 & 1.2 Flow Aggregate Statistics Response Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Initial Post * Broken out of "ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Flow Aggregate Statistics Response Messages" * Do not modify packet data ofp_print_ofpst_aggregate_reply --- lib/ofp-print.c | 33 +++-- 1 file change

[ovs-dev] [PATCH 34/63] ofp-util: Allow decoding of Open Flow 1.2 Packet In Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Manual rebase v4 * No change v3 * Add OF1.2 entry to to ofputil_msg_types * Make OF1.2 the first option in the if statement in ofputil_decode_packet_in() * Rename o11pi as opi, which is consistent with the style used elsewhere * Rebase v2 * No change ---

[ovs-dev] [PATCH 38/63] ofp-util: Allow encoding of Open Flow 1.1 and 1.2 Packet Out Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * Manual rebase v3 * Correct title: this patch relates to Packet Out not Packet In * Correct decoding of buffer_id, it is 32bits wide not 16bits wide * Add decoding of stats reply messages v2 * No change --- lib/ofp-util.c | 10 +- 1

[ovs-dev] [PATCH 33/63] ofp-util: Allow encoding of Open Flow 1.2 Packet In Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * No change v3 * Add protocol parameter to ofputil_encode_packet_in(). This allows packet_in_format to be ignored for Open Flow 1.2. v2 * Update for new ofputil_put_match() implementation --- lib/ofp-util.c| 76 +

[ovs-dev] [PATCH 23/63] ofp-util: Add ofputil_ofp12_decode_match()

2012-06-27 Thread Simon Horman
This may be used by both ofputil_decode_flow_mod() and ofputil_decode_packet_in() Signed-off-by: Simon Horman --- v5 * Add padded_match_len parameter to ofputil_pull_ofp12_match() and __ofputil_pull_ofp11_match(). This will be used when decoding messages that need to know the match length

[ovs-dev] [PATCH 36/63] ofp-util: Allow decoding of Open Flow 1.1 and 1.2 Packet Out Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * No change v3 * Manual rebase * Correct title: This patch relates to Packet Out not Packet In * Use OFPT_PACKET_OUT instead of OFPT11_PACKET_OUT, it seems easier to use a single code and differentiate using the version in the ofp_header *

[ovs-dev] [PATCH 31/63] ofp-util: Update OFPC_COMMON and add ofputil_capabilities_mask

2012-06-27 Thread Simon Horman
There are capabilities which are present in one, two and three of Open Flow 1.0, 1.1 and 1.2. Update OFPC_COMMON to only include capabilities that are prsent in all three Open Flow versions and add ofputil_capabilities_mask() to return the mask of capabilities for each version. This does not cover

[ovs-dev] [PATCH 32/63] ofp-util: Allow decoding of Open Flow 1.2 Features Reply Messages

2012-06-27 Thread Simon Horman
Open Flow 1.2, like Open Flow 1.1, has OFPC11_GROUP_STATS. All other Open Flow 1.2 capabilities are handled by ofputil_capabilities_mask() which is used by both ofputil_decode_switch_features() and ofputil_encode_switch_features(). No update to ofputil_encode_switch_features() is required to supp

[ovs-dev] [PATCH 29/63] ofp-util: Allow decoding of Open Flow 1.2 Port Mod Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * No change v3 * No change v2 * No change --- lib/ofp-util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 1b56981..ae89225 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -83

[ovs-dev] [PATCH 26/63] ofp-util: Allow decoding of Open Flow 1.2 Flow Removed Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Manual rebase v4 * No change v3 * No change *v3 Initial post --- lib/ofp-util.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 6fb21c7..71e5cd9 100644 --- a/lib/ofp-ut

[ovs-dev] [PATCH 28/63] ofp-util: Allow encoding of Open Flow 1.2 Port Mod Messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * Manual rebase v3 * No change v2 * No change --- lib/ofp-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 92bcc84..1b56981 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -3

[ovs-dev] [PATCH 25/63] ofp-util: Allow encoding of Open Flow 1.2 Flow Removed messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * No change v4 * Manual rebase v3 * No change v2 * Use ofputil_put_match() --- lib/ofp-util.c | 17 + 1 file changed, 17 insertions(+) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index e915292..6fb21c7 100644 --- a/lib/ofp-util.c +++ b/lib

[ovs-dev] [PATCH 24/63] ofp-util: Allow decoding of Open Flow 1.2 Flow Mod messages

2012-06-27 Thread Simon Horman
Signed-off-by: Simon Horman --- v5 * Manual rebase v4 * No change v3 * No change v2 * No change --- lib/ofp-util.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 7caf096..e915292 100644 --- a/lib/ofp-util.c +++ b/li

[ovs-dev] [PATCH 30/63] ofp-util: Update ofputil_capabilities for Open Flow 1.2

2012-06-27 Thread Simon Horman
* OFPUTIL_C_ARP_MATCH_IP is not present in Open Flow 1.2. * OFPUTIL_C_PORT_BLOCKED is new in Open Flow 1.2. Otherwise the Open Flow 1.2 capabilities are the same as those of Open Flow 1.1. Signed-off-by: Simon Horman --- v5 * No change v4 * No change v3 * No change v2 * No change --- lib/o

[ovs-dev] [PATCH 20/63] learning-switch: Call ofputil_encode_flow_mod() with correct protocol

2012-06-27 Thread Simon Horman
Empirically it appears that process_packet_in() should call ofputil_encode_flow_mod() with protocol as defived from rconn rather than sw->protocol. Signed-off-by: Simon Horman --- v5 * Actually retrieve protocol from rconn. This patch was dependent on a subsequent patch. v4 * No change v3 *

  1   2   >