Re: [ovs-dev] [PATCH] test suite : add sFlow test

2013-03-27 Thread Ben Pfaff
On Wed, Mar 27, 2013 at 11:02:21PM -0700, Neil Mckee wrote: > This patch adds an sFlow test to the test suite (in branch 1.10). To > make that work properly I added netdev_dummy_get_ifindex() so that a > dummy netdev can return a dummy ifindex when asked. Is there anywhere > in OVS that assumes t

[ovs-dev] [PATCH] test suite : add sFlow test

2013-03-27 Thread Neil Mckee
This patch adds an sFlow test to the test suite (in branch 1.10). To make that work properly I added netdev_dummy_get_ifindex() so that a dummy netdev can return a dummy ifindex when asked. Is there anywhere in OVS that assumes that a netdev_dummy cannot make up a dummy ifindex? If so, I gue

Re: [ovs-dev] [PATCH] Add packet recirculation

2013-03-27 Thread Simon Horman
On Mon, Mar 25, 2013 at 08:18:02AM +0900, Simon Horman wrote: > Recirculation is a technique to allow a frame to re-enter > frame processing. This is intended to be used after actions > have been applied to the frame with modify the frame in > some way that makes it possible for richer processing t

Re: [ovs-dev] [PATCH v2.23] datapath: Add basic MPLS support to kernel

2013-03-27 Thread Simon Horman
On Thu, Mar 21, 2013 at 04:50:03PM +0900, Simon Horman wrote: > Allow datapath to recognize and extract MPLS labels into flow keys > and execute actions which push, pop, and set labels on packets. > > Based heavily on work by Leo Alterman and Ravi K. > > Cc: Ravi K > Cc: Leo Alterman > Reviewed

Re: [ovs-dev] [PATCH v2] net: add ETH_P_802_3_MIN

2013-03-27 Thread Simon Horman
On Thu, Mar 28, 2013 at 01:21:08AM -0400, David Miller wrote: > From: Simon Horman > Date: Thu, 28 Mar 2013 13:38:25 +0900 > > > Add a new constant ETH_P_802_3_MIN, the minimum ethernet type for > > an 802.3 frame. Frames with a lower value in the ethernet type field > > are Ethernet II. > > > >

Re: [ovs-dev] [PATCH v2] net: add ETH_P_802_3_MIN

2013-03-27 Thread David Miller
From: Simon Horman Date: Thu, 28 Mar 2013 13:38:25 +0900 > Add a new constant ETH_P_802_3_MIN, the minimum ethernet type for > an 802.3 frame. Frames with a lower value in the ethernet type field > are Ethernet II. > > Also update all the users of this value that David Miller and > I could find

[ovs-dev] [PATCH v2] net: add ETH_P_802_3_MIN

2013-03-27 Thread Simon Horman
Add a new constant ETH_P_802_3_MIN, the minimum ethernet type for an 802.3 frame. Frames with a lower value in the ethernet type field are Ethernet II. Also update all the users of this value that David Miller and I could find to use the new constant. Also correct a bug in util.c. The comparison

Re: [ovs-dev] Fwd: [PATCH 1/3] match: New function minimatch_matches_flow().

2013-03-27 Thread Ben Pfaff
On Wed, Mar 27, 2013 at 06:56:02PM -0700, Andy Zhou wrote: > Thanks Ben for explaining. The patch looks good. Thanks. > If we skip 0s in flow_hash() as well, then miniflow_hash() can be made to > produce the same value as flow_hash(), if at all useful. I agree that it is possible. I do not kno

Re: [ovs-dev] [PATCH] ofproto-dpif: Keep track of exact-match flow info

2013-03-27 Thread Andy Zhou
This sounds attractive. Let's talk about how it should look like in more detail. On Wed, Mar 27, 2013 at 4:18 PM, Ben Pfaff wrote: > On Wed, Mar 27, 2013 at 04:01:57PM -0700, Ethan Jackson wrote: > > I had a question about this. Did we consider simply using coverage > > counters? We could ext

Re: [ovs-dev] Fwd: [PATCH 1/3] match: New function minimatch_matches_flow().

2013-03-27 Thread Andy Zhou
Thanks Ben for explaining. The patch looks good. If we skip 0s in flow_hash() as well, then miniflow_hash() can be made to produce the same value as flow_hash(), if at all useful. Andy On Wed, Mar 27, 2013 at 5:14 PM, Ben Pfaff wrote: > On Wed, Mar 27, 2013 at 12:14:52PM -0700, Andy Zhou wro

Re: [ovs-dev] Fwd: [PATCH 1/3] match: New function minimatch_matches_flow().

2013-03-27 Thread Ben Pfaff
On Wed, Mar 27, 2013 at 12:14:52PM -0700, Andy Zhou wrote: > It would be nice to add a comment about what 'n' is. > > > +static void > > +miniflow_init__(struct miniflow *dst, const struct flow *src, int n) I added this comment: /* Completes an initialization of 'dst' as a miniflow copy of 'src'

Re: [ovs-dev] [PATCH] ofproto-dpif: Keep track of exact-match flow info

2013-03-27 Thread Ben Pfaff
On Wed, Mar 27, 2013 at 04:01:57PM -0700, Ethan Jackson wrote: > I had a question about this. Did we consider simply using coverage > counters? We could extend them to report a rate. This would be > useful more generally. Andy and I talked about this briefly this afternoon. I think that it wou

Re: [ovs-dev] [PATCH] ovs-ofctl: Better ovs-ofctl add-flows error reporting

2013-03-27 Thread Ben Pfaff
On Thu, Mar 21, 2013 at 03:00:29PM -0700, Andy Zhou wrote: > When error is encountered with add-flows command, this patch > adds file name and line number in addition to the parser > error message to the output. > > The file name and line number will not be added to > the output of "ovs-ofctl add-

Re: [ovs-dev] [PATCH] ovs-lib: Wait for a longer time after SIGKILL.

2013-03-27 Thread Gurucharan Shetty
On Wed, Mar 27, 2013 at 3:38 PM, Ben Pfaff wrote: > On Wed, Mar 27, 2013 at 02:30:05PM -0700, Gurucharan Shetty wrote: >> Currently, when we stop a daemon, we first send it SIGTERM. >> If SIGTERM did not work within ~5 seconds, we send a SIGKILL. >> After sending SIGKILL, we wait only for 4 second

Re: [ovs-dev] [PATCH] ofproto-dpif: Keep track of exact-match flow info

2013-03-27 Thread Ethan Jackson
I had a question about this. Did we consider simply using coverage counters? We could extend them to report a rate. This would be useful more generally. Ethan On Wed, Mar 27, 2013 at 3:59 PM, Andy Zhou wrote: > This is fine. Thanks > > > On Wednesday, March 27, 2013, Ben Pfaff wrote: >> >> On

Re: [ovs-dev] [PATCH] ofproto-dpif: Keep track of exact-match flow info

2013-03-27 Thread Ben Pfaff
Thanks, applied to master. On Wed, Mar 27, 2013 at 03:59:03PM -0700, Andy Zhou wrote: > This is fine. Thanks > > On Wednesday, March 27, 2013, Ben Pfaff wrote: > > > On Mon, Mar 25, 2013 at 07:49:13PM -0700, Andy Zhou wrote: > > > This patch adds more flow related stats to the output of > > > "o

Re: [ovs-dev] [PATCH] ofproto-dpif: Keep track of exact-match flow info

2013-03-27 Thread Andy Zhou
This is fine. Thanks On Wednesday, March 27, 2013, Ben Pfaff wrote: > On Mon, Mar 25, 2013 at 07:49:13PM -0700, Andy Zhou wrote: > > This patch adds more flow related stats to the output of > > "ovs-appctl dpif/show". Specifically, the follow information > > are added per ofproto: > > > > - Max

Re: [ovs-dev] [PATCH] ofproto-dpif: Keep track of exact-match flow info

2013-03-27 Thread Ben Pfaff
On Mon, Mar 25, 2013 at 07:49:13PM -0700, Andy Zhou wrote: > This patch adds more flow related stats to the output of > "ovs-appctl dpif/show". Specifically, the follow information > are added per ofproto: > > - Max flow table size > - Average flow table size > - Average flow table add rate > - A

Re: [ovs-dev] [PATCH] ovs-lib: Wait for a longer time after SIGKILL.

2013-03-27 Thread Ben Pfaff
On Wed, Mar 27, 2013 at 02:30:05PM -0700, Gurucharan Shetty wrote: > Currently, when we stop a daemon, we first send it SIGTERM. > If SIGTERM did not work within ~5 seconds, we send a SIGKILL. > After sending SIGKILL, we wait only for 4 seconds, before giving > up. > > If the system is exteremely

Re: [ovs-dev] [PATCH] ovsdb: Remove prototypes for unimplemented functions.

2013-03-27 Thread Ben Pfaff
Thanks, I pushed this to master. On Wed, Mar 27, 2013 at 02:44:56PM -0700, Justin Pettit wrote: > Looks good. > > --Justin > > > On Mar 27, 2013, at 2:41 PM, Ben Pfaff wrote: > > > Signed-off-by: Ben Pfaff > > --- > > ovsdb/ovsdb.h |6 +- > > 1 files changed, 1 insertions(+), 5 deleti

[ovs-dev] [PATCH] ovs-lib: Wait for a longer time after SIGKILL.

2013-03-27 Thread Gurucharan Shetty
Currently, when we stop a daemon, we first send it SIGTERM. If SIGTERM did not work within ~5 seconds, we send a SIGKILL. After sending SIGKILL, we wait only for 4 seconds, before giving up. If the system is exteremely busy, there is a chance that a process is not killed by the kernel within 4 sec

Re: [ovs-dev] [PATCH] ovsdb: Remove prototypes for unimplemented functions.

2013-03-27 Thread Justin Pettit
Looks good. --Justin On Mar 27, 2013, at 2:41 PM, Ben Pfaff wrote: > Signed-off-by: Ben Pfaff > --- > ovsdb/ovsdb.h |6 +- > 1 files changed, 1 insertions(+), 5 deletions(-) > > diff --git a/ovsdb/ovsdb.h b/ovsdb/ovsdb.h > index 6e4ff79..e976d3b 100644 > --- a/ovsdb/ovsdb.h > +++ b/ov

[ovs-dev] [bug15637 2/5] ovsdb-data: New functions for predicting serialized length of data.

2013-03-27 Thread Ben Pfaff
These will be used for the first time in an upcoming commit. Signed-off-by: Ben Pfaff --- lib/ovsdb-data.c | 93 +++- lib/ovsdb-data.h |6 +++- tests/test-ovsdb.c | 14 ++-- 3 files changed, 108 insertions(+), 5 deletions(-) diff -

[ovs-dev] [bug15637 5/5] jsonrpc-server: Add test for disconnecting connections with too long queues.

2013-03-27 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- tests/ovsdb-server.at | 85 + 1 files changed, 85 insertions(+), 0 deletions(-) diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at index 62eae38..31f8af3 100644 --- a/tests/ovsdb-server.at +++ b/tests/ovsdb-se

[ovs-dev] [bug15637 0/5] bound ovsdb-server queued data

2013-03-27 Thread Ben Pfaff
This series of patches fixes a possible memory exhaustion problem observed in ovsdb-server in an intentional stress test. The first three patches fix the problem: json: New function json_serialized_length(). ovsdb-data: New functions for predicting serialized length of data. jsonrpc-server:

[ovs-dev] [bug15637 4/5] ovsdb-client: Make "monitor" command able to monitor all tables.

2013-03-27 Thread Ben Pfaff
Users may find this feature useful, but the reason to add this feature is to allow a test to use it in an upcoming commit. Signed-off-by: Ben Pfaff --- NEWS|3 + ovsdb/ovsdb-client.1.in | 10 ++ ovsdb/ovsdb-client.c| 279

[ovs-dev] [bug15637 3/5] jsonrpc-server: Disconnect connections that queue too much data.

2013-03-27 Thread Ben Pfaff
Consider this situation: * OVSDB client A executes transactions very quickly for a long time. * OVSDB client B monitors the tables that A modifies, but (either because B is connected over a slow network, or because B is slow to process updates) cannot keep up. In this situati

[ovs-dev] [bug15637 1/5] json: New function json_serialized_length().

2013-03-27 Thread Ben Pfaff
This will be used for the first time in an upcoming commit. Signed-off-by: Ben Pfaff --- lib/json.c| 125 - lib/json.h|4 +- tests/test-json.c |3 +- 3 files changed, 129 insertions(+), 3 deletions(-) diff --git a/lib/

[ovs-dev] [PATCH] ovsdb: Remove prototypes for unimplemented functions.

2013-03-27 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- ovsdb/ovsdb.h |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/ovsdb/ovsdb.h b/ovsdb/ovsdb.h index 6e4ff79..e976d3b 100644 --- a/ovsdb/ovsdb.h +++ b/ovsdb/ovsdb.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc. +/* Co

Re: [ovs-dev] [PATCH 3/3] classifier: Speed up lookup when metadata partitions the flow table.

2013-03-27 Thread Andy Zhou
looks good. A question: Why is full mask of 64-bit metadata required to be considered for partition? It seems allow partial mask can be more general. On Tue, Mar 26, 2013 at 9:32 PM, Ben Pfaff wrote: > We have a controller that puts many rules with different metadata values > into the flow tab

Re: [ovs-dev] [PATCH 2/3] openvswitch/types.h: New macros OVS_BE16_MAX, OVS_BE32_MAX, OVS_BE64_MAX.

2013-03-27 Thread Andy Zhou
looks good On Tue, Mar 26, 2013 at 9:32 PM, Ben Pfaff wrote: > These seem slightly nicer than e.g. htons(UINT16_MAX). > > Signed-off-by: Ben Pfaff > --- > include/openvswitch/types.h |6 +- > lib/match.c | 30 +++--- > lib/meta-flow.c

[ovs-dev] Fwd: [PATCH 1/3] match: New function minimatch_matches_flow().

2013-03-27 Thread Andy Zhou
-- Forwarded message -- From: Andy Zhou Date: Wed, Mar 27, 2013 at 12:14 PM Subject: Re: [ovs-dev] [PATCH 1/3] match: New function minimatch_matches_flow(). To: Ben Pfaff Looks good. A few minor comments in-line: On Tue, Mar 26, 2013 at 9:32 PM, Ben Pfaff wrote: > Signed-off

Re: [ovs-dev] [PATCH 2/2] ofproto-dpif: Rate limit calls to facet_learn().

2013-03-27 Thread Ben Pfaff
On Tue, Mar 26, 2013 at 10:09:35PM -0700, Ethan Jackson wrote: > In the TCP_CRR benchmark, ovs-vswitchd spends so much time in > update_stats() that it has a significant impact on flow setup > performance. Further work is needed in this area, but for now, > simply rate limiting facet_learn() has a

Re: [ovs-dev] [PATCH 1/2] ofproto-dpif: Rate limit facet_check_consistency()

2013-03-27 Thread Ben Pfaff
On Tue, Mar 26, 2013 at 10:09:34PM -0700, Ethan Jackson wrote: > With complex flow tables, facet_check_consistency() can be > expensive enough to show up in flow setup performance benchmarks. > In my testing this patch gives us a roughly 10% improvement in > TCP_CRR and ovs-benchmark. > > Signed-o

Re: [ovs-dev] [PATCH net-next] openvswitch: correct an invalid BUG_ON

2013-03-27 Thread Jesse Gross
On Wed, Mar 27, 2013 at 5:41 AM, Hong Zhiguo wrote: > table->count is uint32_t > > Signed-off-by: Hong Zhiguo Applied, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH net-next] openvswitch: correct an invalid BUG_ON

2013-03-27 Thread Hong Zhiguo
table->count is uint32_t Signed-off-by: Hong Zhiguo --- net/openvswitch/flow.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index fe0e421..67a2b78 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c @@ -795,9