[ovs-dev] [PATCH] ofp-parse: Ignore "idle_age" when parsing a flow string.

2013-02-01 Thread Justin Pettit
It should be possible to feed to output of "ovs-ofctl dump-flows" to "ovs-ofctl add-flows". However, some of the metadata needs to be ignored. "idle_age" was recently added to the output of "ovs-ofctl dump-flows", but it was not ignored like the other metadata. This commit ignores it. Signed-of

[ovs-dev] lookups in OVS data path

2013-02-01 Thread SDN learn
Hello OVS experts, I'm new to OVS and trying to understand a few things... 1. When packet comes in, there is a lookup for outer-IP/L4 in vport-gre.c (for GRE overlay). Then GRE key is matched. Finally, at some point later, there is a look up for inner IP/L4 before inner IP/L4/payload is sent to "

Re: [ovs-dev] [PATCH 0/2] Add support for LISP into Open vSwitch

2013-02-01 Thread Kyle Mestery (kmestery)
On Jan 29, 2013, at 9:13 PM, Kyle Mestery (kmestery) wrote: > On Jan 29, 2013, at 6:47 PM, Jesse Gross wrote: >> On Tue, Jan 29, 2013 at 3:27 PM, Kyle Mestery (kmestery) >> wrote: >>> On Jan 29, 2013, at 5:19 PM, Jesse Gross wrote: The other area that I'm somewhat concerned about is with u

Re: [ovs-dev] [PATCH] ofp-parse: Ignore "idle_age" when parsing a flow string.

2013-02-01 Thread Ben Pfaff
On Fri, Feb 01, 2013 at 12:14:56AM -0800, Justin Pettit wrote: > It should be possible to feed to output of "ovs-ofctl dump-flows" to > "ovs-ofctl add-flows". However, some of the metadata needs to be > ignored. "idle_age" was recently added to the output of "ovs-ofctl > dump-flows", but it was n

Re: [ovs-dev] lookups in OVS data path

2013-02-01 Thread Jesse Gross
On Fri, Feb 1, 2013 at 2:19 AM, SDN learn wrote: > Hello OVS experts, > > I'm new to OVS and trying to understand a few things... > > 1. When packet comes in, there is a lookup for outer-IP/L4 in vport-gre.c > (for GRE overlay). Then GRE key is matched. > Finally, at some point later, there is a l

Re: [ovs-dev] [PATCH 0/2] Add support for LISP into Open vSwitch

2013-02-01 Thread Jesse Gross
On Fri, Feb 1, 2013 at 6:30 AM, Kyle Mestery (kmestery) wrote: > On Jan 29, 2013, at 9:13 PM, Kyle Mestery (kmestery) > wrote: >> On Jan 29, 2013, at 6:47 PM, Jesse Gross wrote: >>> On Tue, Jan 29, 2013 at 3:27 PM, Kyle Mestery (kmestery) >>> wrote: On Jan 29, 2013, at 5:19 PM, Jesse Gros

Re: [ovs-dev] [PATCH 0/2] Add support for LISP into Open vSwitch

2013-02-01 Thread Kyle Mestery (kmestery)
On Feb 1, 2013, at 12:03 PM, Jesse Gross wrote: > On Fri, Feb 1, 2013 at 6:30 AM, Kyle Mestery (kmestery) > wrote: >> On Jan 29, 2013, at 9:13 PM, Kyle Mestery (kmestery) >> wrote: >>> On Jan 29, 2013, at 6:47 PM, Jesse Gross wrote: On Tue, Jan 29, 2013 at 3:27 PM, Kyle Mestery (kmestery)

Re: [ovs-dev] [test log scan 1/5] netlink-socket: Don't bother logging SO_RCVBUFFORCE failure as non-root.

2013-02-01 Thread Ben Pfaff
I applied this to master. On Fri, Aug 17, 2012 at 06:21:29PM -0700, Ethan Jackson wrote: > Looks good, thanks. > > Ethan > > On Fri, Aug 17, 2012 at 4:34 PM, Ben Pfaff wrote: > > Some Open vSwitch utilities can do useful work when they are not run as > > root. Without this commit, these utilit

[ovs-dev] [test log scan v2 1/6] tests: Fix error path in netflow test.

2013-02-01 Thread Ben Pfaff
Otherwise, if the test bails out before finishing, the test-netflow daemon doesn't get killed and the test hangs. Signed-off-by: Ben Pfaff --- tests/ofproto-dpif.at |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 3eec9

[ovs-dev] [test log scan v2 0/6] fail tests that log errors

2013-02-01 Thread Ben Pfaff
This is the second version of a patch series that I originally sent out on Aug. 17, 2012. The first version only attracted a review for the first patch. Ben Pfaff (6): tests: Fix error path in netflow test. poll-loop: Reduce high-CPU log messages from WARN to INFO. bond: Reduce log level fr

[ovs-dev] [test log scan v2 2/6] poll-loop: Reduce high-CPU log messages from WARN to INFO.

2013-02-01 Thread Ben Pfaff
These can happen occasionally in normal circumstances. Signed-off-by: Ben Pfaff --- lib/poll-loop.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/poll-loop.c b/lib/poll-loop.c index fca1dfa..9855306 100644 --- a/lib/poll-loop.c +++ b/lib/poll-loop.c @@ -165,8 +1

[ovs-dev] [test log scan v2 4/6] tests: Set explicit bond mode in LACP test.

2013-02-01 Thread Ben Pfaff
This avoids a log warning: bridge|WARN|port bond: Using the default bond_mode active-backup. Note that in previous versions, the default bond_mode was balance-slb This warning is harmless, but I'm trying to add checks for "warn" and higher severity log messages to the tests, so it makes s

[ovs-dev] [test log scan v2 3/6] bond: Reduce log level from WARN to INFO for interface status updates.

2013-02-01 Thread Ben Pfaff
An interface coming up or going down isn't a big deal. Signed-off-by: Ben Pfaff --- lib/bond.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bond.c b/lib/bond.c index 06680ee..2e151eb 100644 --- a/lib/bond.c +++ b/lib/bond.c @@ -1302,12 +1302,12 @@ bond_enable

[ovs-dev] [test log scan v2 6/6] ofproto-macros: Fail a test that logs a WARN or higher level message.

2013-02-01 Thread Ben Pfaff
It is necessary to whitelist a couple of tests that appear to legitimately have WARN messages. Signed-off-by: Ben Pfaff --- tests/ofproto-macros.at | 20 +++- tests/tunnel.at |4 ++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/tests/ofproto-macr

[ovs-dev] [test log scan v2 5/6] timeval: Don't issue poll interval warnings when we warp time.

2013-02-01 Thread Ben Pfaff
It's not meaningful in that case. Signed-off-by: Ben Pfaff --- lib/timeval.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/timeval.c b/lib/timeval.c index d91305c..4ffb756 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008,

Re: [ovs-dev] [BUG] broad-/multicast & SLB bonding -> FAIL

2013-02-01 Thread Markus Schuster
On Thursday 31 January 2013 20:30:18 Ethan Jackson wrote: > Are you absolutely sure the traffic isn't egressing the first switch, > and then ingressing the other switch into the bond? It's often hard > to tell with tcpdump which direction traffic is travelling. That made me really think and final

Re: [ovs-dev] [coverity 05/12] vlog: New function vlog_set_levels_from_string_assert().

2013-02-01 Thread Ethan Jackson
Acked-by: Ethan Jackson On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff wrote: > Two of the users of vlog_set_levels_from_string() in the tests could have > silently failed, if their arguments were invalid. This avoids that problem > (and a memory leak). > > Found by Coverity. > > Signed-off-by: Ben

Re: [ovs-dev] [coverity 06/12] ofp-util: Rename ofputil_port_from_string() variable to avoid hiding param.

2013-02-01 Thread Ethan Jackson
Acked-by: Ethan Jackson On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff wrote: > This function has a parameter 's' and a local variable 's', so rename the > local variable to reduce confusion. > > Found by Coverity. > > Signed-off-by: Ben Pfaff > --- > lib/ofp-util.c | 10 +- > 1 files ch

Re: [ovs-dev] [coverity 08/12] process: Check return value of set_nonblocking().

2013-02-01 Thread Ethan Jackson
Acked-by: Ethan Jackson On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff wrote: > It's unlikely to fail but checking it can't hurt. > > Found by Coverity. > > Signed-off-by: Ben Pfaff > --- > lib/process.c | 12 +--- > 1 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/lib/p

Re: [ovs-dev] [coverity 07/12] bridge: Rename iface_create() variable to avoid hiding parameter.

2013-02-01 Thread Ethan Jackson
Acked-by: Ethan Jackson On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff wrote: > This function has a parameter 'ofp_port' and a local variable 'ofp_port', > so rename the local variable to reduce confusion. > > Found by Coverity. > > Signed-off-by: Ben Pfaff > --- > vswitchd/bridge.c |4 ++-- >

Re: [ovs-dev] [coverity 09/12] netdev-linux: Check return value of set_nonblocking().

2013-02-01 Thread Ethan Jackson
Acked-by: Ethan Jackson On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff wrote: > It's unlikely to fail but checking it can't hurt. > > Found by Coverity. > > Signed-off-by: Ben Pfaff > --- > lib/netdev-linux.c |6 +- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/lib/ne

Re: [ovs-dev] [coverity 10/12] unixctl: Use ovs_retval_to_string() where EOF is a possible value.

2013-02-01 Thread Ethan Jackson
Acked-by: Ethan Jackson On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff wrote: > jsonrpc_transact_block() might return EOF so passing its return value to > strerror() isn't general enough. > > It might be better to change jsonrpc_transact{_block}() to never return > EOF, since a closed connection see

Re: [ovs-dev] [coverity 11/12] worker: Use ovs_retval_to_string() where EOF is a possible return value.

2013-02-01 Thread Ethan Jackson
Acked-by: Ethan Jackson On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff wrote: > Found by Coverity. > > Signed-off-by: Ben Pfaff > --- > lib/worker.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/lib/worker.c b/lib/worker.c > index 6ca05cd..9bcad55 100644 > --- a/li

Re: [ovs-dev] [coverity 12/12] timeval: Avoid unnecessary integer overflow in time_alarm().

2013-02-01 Thread Ethan Jackson
I've always found this part of C annoying. Acked-by: Ethan Jackson On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff wrote: > Durations longer than 4294967 seconds would unnecessarily overflow in the > multiplication here. > > Found by Coverity. > > Signed-off-by: Ben Pfaff > --- > lib/timeval.c |

Re: [ovs-dev] [PATCH] ofp-parse: Ignore "idle_age" when parsing a flow string.

2013-02-01 Thread Justin Pettit
On Feb 1, 2013, at 7:20 AM, Ben Pfaff wrote: > On Fri, Feb 01, 2013 at 12:14:56AM -0800, Justin Pettit wrote: >> It should be possible to feed to output of "ovs-ofctl dump-flows" to >> "ovs-ofctl add-flows". However, some of the metadata needs to be >> ignored. "idle_age" was recently added to

[ovs-dev] [oftest 1/5] netdev-dummy: Limit receive queue length to 100 packets.

2013-02-01 Thread Ben Pfaff
It doesn't seem like a good idea to allow the queue length to grow without bound, even for a test-only device. Signed-off-by: Ben Pfaff --- lib/netdev-dummy.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index f81b68e

[ovs-dev] [oftest 2/5] netdev-dummy: Factor some netdev_dummy_receive() code out into new function.

2013-02-01 Thread Ben Pfaff
An upcoming patch will add another user. Signed-off-by: Ben Pfaff --- lib/netdev-dummy.c | 33 ++--- 1 files changed, 22 insertions(+), 11 deletions(-) diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index 001d188..215e1a2 100644 --- a/lib/netdev-dummy.c +++ b

[ovs-dev] [oftest 0/5] Add OFTest support to the OVS tree

2013-02-01 Thread Ben Pfaff
This adds support for running OFTest against an OVS tree with a simple "make check-oftest". It is a revised and greatly shortened version of a series I originally posted in October 2012. Ben Pfaff (5): netdev-dummy: Limit receive queue length to 100 packets. netdev-dummy: Factor some netdev_

[ovs-dev] [oftest 5/5] tests: Add support for running OFTest.

2013-02-01 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- Makefile.am |3 +- NEWS |2 + README-OFTest | 77 +++ tests/automake.mk |6 +++ tests/run-oftest | 94 + 5 files changed, 181 insertions

[ovs-dev] [oftest 3/5] netdev-dummy: Drop "nobody listened" reply from netdev-dummy/receive.

2013-02-01 Thread Ben Pfaff
Ethan pointed out that this wasn't very useful. Signed-off-by: Ben Pfaff --- lib/netdev-dummy.c| 16 +++- tests/ofproto-dpif.at |6 ++ 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index 215e1a2..2884a80 100644 -

[ovs-dev] [oftest 4/5] netdev-dummy: Add "pstream" option for connecting a dummy to a process.

2013-02-01 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/netdev-dummy.c | 284 +-- 1 files changed, 272 insertions(+), 12 deletions(-) diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index 2884a80..30bd794 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dummy.c @@

Re: [ovs-dev] [coverity 12/12] timeval: Avoid unnecessary integer overflow in time_alarm().

2013-02-01 Thread Ben Pfaff
Thanks for all the reviews. I'll push these to master soon. On Fri, Feb 01, 2013 at 01:59:26PM -0800, Ethan Jackson wrote: > I've always found this part of C annoying. > > Acked-by: Ethan Jackson > > On Thu, Jan 24, 2013 at 2:44 PM, Ben Pfaff wrote: > > Durations longer than 4294967 seconds w

[ovs-dev] [PATCH 1/3] tests: Make test for Linux /proc/self/fd more straightforward.

2013-02-01 Thread Ben Pfaff
Presumably we can test for this Linux feature just by seeing whether the directory is there. Another goal is to shorten the code because I intend to make another copy of it in an upcoming commit, to add a similar test for Python. Signed-off-by: Ben Pfaff --- tests/library.at | 12 +---

[ovs-dev] [PATCH 3/3] tests: Add test for Python version of long socket name workaround.

2013-02-01 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- tests/automake.mk |1 + tests/library.at | 24 ++- tests/test-unix-socket.py | 54 + 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 tests/test-unix-socket.py d

[ovs-dev] [PATCH 2/3] tests: Make long name more readable by introducing a shell variable.

2013-02-01 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- tests/library.at |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/library.at b/tests/library.at index d8280fd..3e84648 100644 --- a/tests/library.at +++ b/tests/library.at @@ -126,9 +126,10 @@ dnl for other platforms, so we skip the

[ovs-dev] [PATCH 0/3] tests for Python long socket names

2013-02-01 Thread Ben Pfaff
This is a repost of three patches originally posted Jan. 16. Ben Pfaff (3): tests: Make test for Linux /proc/self/fd more straightforward. tests: Make long name more readable by introducing a shell variable. tests: Add test for Python version of long socket name workaround. tests/automake.

[ovs-dev] [PATCH] socket-util: Use set_nonblocking() helper function.

2013-02-01 Thread Ben Pfaff
There's no reason to inline this when we have a helper for it. Signed-off-by: Ben Pfaff --- This is a repost of a patch originally posted Oct. 31, 2012. lib/socket-util.c |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/socket-util.c b/lib/socket-util.c index

[ovs-dev] [PATCH] Use is_pow2() function, where possible, instead of IS_POW2 macro.

2013-02-01 Thread Ben Pfaff
The IS_POW2 macro is meant for use in contexts where a function call is not allowed. Signed-off-by: Ben Pfaff --- This is a repost of a patch originally posted Oct. 31, 2012. lib/util.c|2 +- utilities/ovs-ofctl.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[ovs-dev] [PATCH] vswitchd: Require "target" column to be unique in OVS database.

2013-02-01 Thread Ben Pfaff
Commit cc7ecee48 (vswitchd: Add unique indexes for some columns.) says, in part: With this commit, the database server itself rejects attempts to add Port or Interface records with duplicate names or Controller or Manager records with duplicate targets. but in fact didn't change the C

Re: [ovs-dev] [PATCH] Use is_pow2() function, where possible, instead of IS_POW2 macro.

2013-02-01 Thread Ethan Jackson
Acked-by: Ethan Jackson On Fri, Feb 1, 2013 at 2:50 PM, Ben Pfaff wrote: > The IS_POW2 macro is meant for use in contexts where a function call is not > allowed. > > Signed-off-by: Ben Pfaff > --- > This is a repost of a patch originally posted Oct. 31, 2012. > > lib/util.c|2 +

Re: [ovs-dev] [PATCH] socket-util: Use set_nonblocking() helper function.

2013-02-01 Thread Ethan Jackson
Acked-by: Ethan Jackson On Fri, Feb 1, 2013 at 2:48 PM, Ben Pfaff wrote: > There's no reason to inline this when we have a helper for it. > > Signed-off-by: Ben Pfaff > --- > This is a repost of a patch originally posted Oct. 31, 2012. > > lib/socket-util.c |9 ++--- > 1 files changed,

[ovs-dev] [PATCH] python/ovs/db/types: Fix English grammar for enums with one member.

2013-02-01 Thread Ben Pfaff
Before this change, enums that have one member were formatted as, e.g.: "one of xyzzy, , or " This changes them to be formatted as: "must be xyzzy" which makes much more sense. (An enum with one member may make some sense if you are trying to leave the possibility for future expansion.) S

Re: [ovs-dev] [PATCH] socket-util: Use set_nonblocking() helper function.

2013-02-01 Thread Ben Pfaff
Thanks, I'll push this soon. On Fri, Feb 01, 2013 at 02:52:05PM -0800, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > On Fri, Feb 1, 2013 at 2:48 PM, Ben Pfaff wrote: > > There's no reason to inline this when we have a helper for it. > > > > Signed-off-by: Ben Pfaff > > --- > > This is a r

Re: [ovs-dev] [PATCH] Use is_pow2() function, where possible, instead of IS_POW2 macro.

2013-02-01 Thread Ben Pfaff
Thanks, I'll push this soon. On Fri, Feb 01, 2013 at 02:51:44PM -0800, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > On Fri, Feb 1, 2013 at 2:50 PM, Ben Pfaff wrote: > > The IS_POW2 macro is meant for use in contexts where a function call is not > > allowed. > > > > Signed-off-by: Ben Pfaf

Re: [ovs-dev] [PATCH] python/ovs/db/types: Fix English grammar for enums with one member.

2013-02-01 Thread Reid Price
Looks good. I assume there is no way to have no literals? For what it's worth, english = 'one of %s, %s, or %s' % (literals[0], ', '.join(literals[1:-1]), literals[-1]) could also be written as english = 'one o

[ovs-dev] [PATCH] tunneling: Don't send ICMP messages if no tunnel port is found.

2013-02-01 Thread Jesse Gross
Some tunnel code in OVS (for example, CAPWAP) uses the skb->cb to store information while processing packets. However, if we don't find an appropriate tunnel port on receive, then we send an ICMP port unreachable message, which calls back into the IP stack. The stack assumes that skb->cb will sti

Re: [ovs-dev] [PATCH] tunneling: Don't send ICMP messages if no tunnel port is found.

2013-02-01 Thread Kyle Mestery (kmestery)
On Feb 1, 2013, at 6:58 PM, Jesse Gross wrote: > Some tunnel code in OVS (for example, CAPWAP) uses the skb->cb to > store information while processing packets. However, if we don't > find an appropriate tunnel port on receive, then we send an ICMP > port unreachable message, which calls back int

Re: [ovs-dev] [PATCH] tunneling: Don't send ICMP messages if no tunnel port is found.

2013-02-01 Thread Jesse Gross
On Fri, Feb 1, 2013 at 5:04 PM, Kyle Mestery (kmestery) wrote: > On Feb 1, 2013, at 6:58 PM, Jesse Gross wrote: >> Some tunnel code in OVS (for example, CAPWAP) uses the skb->cb to >> store information while processing packets. However, if we don't >> find an appropriate tunnel port on receive,