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

2013-06-12 Thread Simon Horman
On Wed, Jun 12, 2013 at 11:00:56PM -0700, Pravin Shelar wrote: > On Wed, Jun 12, 2013 at 6:19 PM, Simon Horman wrote: > > On Wed, Jun 12, 2013 at 06:14:07PM -0700, Pravin Shelar wrote: > >> On Tue, Jun 11, 2013 at 2:26 PM, Jesse Gross wrote: > >> > On Mon, Jun 10, 2013 at 1:07 AM, Simon Horman w

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

2013-06-12 Thread Pravin Shelar
On Wed, Jun 12, 2013 at 6:19 PM, Simon Horman wrote: > On Wed, Jun 12, 2013 at 06:14:07PM -0700, Pravin Shelar wrote: >> On Tue, Jun 11, 2013 at 2:26 PM, Jesse Gross wrote: >> > On Mon, Jun 10, 2013 at 1:07 AM, Simon Horman wrote: >> >> @@ -341,10 +376,14 @@ static int netdev_send(struct vport

Re: [ovs-dev] [PATCH net-next 3/4] openvswitch: Fix struct comment.

2013-06-12 Thread Jesse Gross
On Wed, Jun 12, 2013 at 3:57 PM, Pravin B Shelar wrote: > Signed-off-by: Pravin B Shelar > --- > include/uapi/linux/openvswitch.h |1 - > 1 files changed, 0 insertions(+), 1 deletions(-) Applied, thanks. ___ dev mailing list dev@openvswitch.org ht

Re: [ovs-dev] [PATCH net-next 4/4] openvswitch: make skb->csum consistent with rest of networking stack.

2013-06-12 Thread Jesse Gross
On Wed, Jun 12, 2013 at 3:57 PM, Pravin B Shelar wrote: > diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c > index 39cd821..e6ffb82 100644 > --- a/net/openvswitch/datapath.c > +++ b/net/openvswitch/datapath.c > @@ -406,6 +406,7 @@ static int queue_userspace_packet(struct net *n

Re: [ovs-dev] [PATCH net-next 2/4] openvswitch: Simplify interface ovs_flow_metadata_from_nlattrs()

2013-06-12 Thread Jesse Gross
On Wed, Jun 12, 2013 at 3:57 PM, Pravin B Shelar wrote: > diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c > index b15321a..150f181 100644 > --- a/net/openvswitch/flow.c > +++ b/net/openvswitch/flow.c > @@ -1122,10 +1122,9 @@ int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, > int

Re: [ovs-dev] Possible Regression in 'netdev: Add new "struct netdev_rx" for capturing packets from a netdev.'

2013-06-12 Thread Murphy McCauley
On Jun 12, 2013, at 5:34 PM, Simon Horman wrote: > On Wed, Jun 12, 2013 at 08:08:50AM -0700, Ben Pfaff wrote: >> On Wed, Jun 12, 2013 at 07:11:50AM -0700, Murphy McCauley wrote: >>> >>> On Jun 12, 2013, at 6:28 AM, Ed Maste wrote: >>> On 12 June 2013 07:04, Murphy McCauley wrote: > (S

[ovs-dev] [PATCH] lib/netdev-linux.c: Prevent receiving of sent packets

2013-06-12 Thread Murphy McCauley
Commit 796223f5 (netdev: Add new "struct netdev_rx" for capturing packets from a netdev) refactored send and receive into separate netdevs. As a result, send and receive now use different socket descriptors (except for tap interfaces which are treated specially). An unintended side effect was tha

Re: [ovs-dev] [PATCH net-next 1/4] openvswitch: Unify vport error stats handling.

2013-06-12 Thread Jesse Gross
On Wed, Jun 12, 2013 at 3:56 PM, Pravin B Shelar wrote: > Following patch changes vport->send return type so that vport > layer can do error accounting. > > Signed-off-by: Pravin B Shelar There's already a version of this patch in my tree on kernel.org. __

Re: [ovs-dev] [megaflow v4 1/2] datapath: Mega flow implementation

2013-06-12 Thread Jesse Gross
On Wed, Jun 12, 2013 at 10:00 AM, Andy Zhou wrote: > Add mega flow support in kernel datapath. > > Pravin has made significant contributions to this patch. Including > the mega flow id look up scheme, API clean ups, and bug fixes. > > Co-authored-by: Pravin B Shelar > Signed-off-by: Pravin B Shel

Re: [ovs-dev] Resubmit after Normal output action

2013-06-12 Thread Baohua Yang
Thanks ben. I re-do the experiments, the order does NOT care. Sorry for my mistake due to the input port match. Thanks! On Tue, Jun 11, 2013 at 12:55 AM, Ben Pfaff wrote: > On Sun, Jun 09, 2013 at 05:20:27PM +0800, Baohua Yang wrote: > > I want one packet do two processes in ovs: > >

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

2013-06-12 Thread Simon Horman
On Wed, Jun 12, 2013 at 06:14:07PM -0700, Pravin Shelar wrote: > On Tue, Jun 11, 2013 at 2:26 PM, Jesse Gross wrote: > > On Mon, Jun 10, 2013 at 1:07 AM, Simon Horman wrote: > >> diff --git a/datapath/actions.c b/datapath/actions.c > >> index 0dac658..197811a 100644 > >> --- a/datapath/actions.c

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

2013-06-12 Thread Pravin Shelar
On Tue, Jun 11, 2013 at 2:26 PM, Jesse Gross wrote: > On Mon, Jun 10, 2013 at 1:07 AM, Simon Horman wrote: >> diff --git a/datapath/actions.c b/datapath/actions.c >> index 0dac658..197811a 100644 >> --- a/datapath/actions.c >> +++ b/datapath/actions.c >> +static int push_mpls(struct sk_buff *skb,

[ovs-dev] [PATCH v5] gre: Restructure tunneling.

2013-06-12 Thread Pravin B Shelar
Following patch restructures ovs tunneling and gre vport implementation to make ovs tunneling more in sync with upstream kernel tunneling. Doing this tunneling code is simplified as most of protocol processing on send and recv is pushed to kernel tunneling. For external ovs module the code is mov

Re: [ovs-dev] [PATCH v4] datapath: make skb->csum consistent with rest of networking stack.

2013-06-12 Thread Pravin Shelar
Thanks, I pushed it to master. On Wed, Jun 12, 2013 at 9:46 AM, Jesse Gross wrote: > On Tue, Jun 11, 2013 at 6:59 PM, Pravin B Shelar wrote: >> As suggested by Jesse in the comment for patch "gre: Restructure >> tunneling", following patch keeps skb->csum correct across ovs. >> >> Signed-off-by

Re: [ovs-dev] Possible Regression in 'netdev: Add new "struct netdev_rx" for capturing packets from a netdev.'

2013-06-12 Thread Simon Horman
On Wed, Jun 12, 2013 at 08:08:50AM -0700, Ben Pfaff wrote: > On Wed, Jun 12, 2013 at 07:11:50AM -0700, Murphy McCauley wrote: > > > > On Jun 12, 2013, at 6:28 AM, Ed Maste wrote: > > > > > On 12 June 2013 07:04, Murphy McCauley wrote: > > >> (Sorry this isn't an actual reply and is missing conte

Re: [ovs-dev] Running openvswitch in Android

2013-06-12 Thread Jing Ai
ovs-vsctl hang for bridge related operations usually indicates that ovs-vswitchd daemon is not running. Can you check it? Also, ovs-vsctl show cmd works since it only interacts with ovsdb & ovsdb-server. Best, Jing On Wed, Jun 12, 2013 at 4:26 PM, muddin wrote: > Hello, > > > We have compi

Re: [ovs-dev] [PATCH 1/3] lib: A separate file for rxbuf.

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 04:48:28PM -0700, Ben Pfaff wrote: > On Wed, Jun 12, 2013 at 04:43:18PM -0700, Gurucharan Shetty wrote: > > On Wed, Jun 12, 2013 at 4:38 PM, Ben Pfaff wrote: > > > > > On Mon, Jun 10, 2013 at 01:10:28AM -0700, Gurucharan Shetty wrote: > > > > Till now, rxbuf was only used

[ovs-dev] [PATCH RFC] ovsdb-server: Preserve remotes across crash and restart.

2013-06-12 Thread Ben Pfaff
--- This is unpolished but it shows the approach I have in mind. Sending out for comments on the approach. diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index 20e1964..d87360a 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -81,8 +81,14 @@ struct add_remote_aux { st

Re: [ovs-dev] [PATCHv3 1/5] lib: Add CRC32C Implementation

2013-06-12 Thread Ben Pfaff
Nope. On Thu, Jun 13, 2013 at 08:58:31AM +0900, Joe Stringer wrote: > No reason. I wasn't sure whether there were Debian-specific policies on > this or something. > > > On Thu, Jun 13, 2013 at 7:22 AM, Ben Pfaff wrote: > > > On Wed, Jun 12, 2013 at 02:35:54PM +0900, Joe Stringer wrote: > > > T

Re: [ovs-dev] [PATCHv3 1/5] lib: Add CRC32C Implementation

2013-06-12 Thread Joe Stringer
No reason. I wasn't sure whether there were Debian-specific policies on this or something. On Thu, Jun 13, 2013 at 7:22 AM, Ben Pfaff wrote: > On Wed, Jun 12, 2013 at 02:35:54PM +0900, Joe Stringer wrote: > > This implementation was derived from FreeBSD: > > http://code.google.com/p/freebsd-hea

Re: [ovs-dev] [PATCH 1/3] lib: A separate file for rxbuf.

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 04:43:18PM -0700, Gurucharan Shetty wrote: > On Wed, Jun 12, 2013 at 4:38 PM, Ben Pfaff wrote: > > > On Mon, Jun 10, 2013 at 01:10:28AM -0700, Gurucharan Shetty wrote: > > > Till now, rxbuf was only used by the worker. An upcoming > > > commit will have another client. So

Re: [ovs-dev] [PATCH 1/3] lib: A separate file for rxbuf.

2013-06-12 Thread Gurucharan Shetty
On Wed, Jun 12, 2013 at 4:38 PM, Ben Pfaff wrote: > On Mon, Jun 10, 2013 at 01:10:28AM -0700, Gurucharan Shetty wrote: > > Till now, rxbuf was only used by the worker. An upcoming > > commit will have another client. So carve out rxbuf from > > the worker files. > > > > Signed-off-by: Gurucharan

Re: [ovs-dev] [PATCH 1/3] lib: A separate file for rxbuf.

2013-06-12 Thread Ben Pfaff
On Mon, Jun 10, 2013 at 01:10:28AM -0700, Gurucharan Shetty wrote: > Till now, rxbuf was only used by the worker. An upcoming > commit will have another client. So carve out rxbuf from > the worker files. > > Signed-off-by: Gurucharan Shetty Thanks for doing this. We need a fix. I don't see a

Re: [ovs-dev] [PATCH V3 3/3] ofproto-dpif.at: Add test for "ovs-appctl coverage/show"

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 11:38:43AM -0700, Alex Wang wrote: > This commit adds an unit test for the "ovs-appctl coverage/show". > > Signed-off-by: Alex Wang Seems reasonable, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailma

Re: [ovs-dev] [PATCH V2 2/3] ofproto-dpif: Compute the subfacet add/del rate using coverage counters

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 11:38:42AM -0700, Alex Wang wrote: > The subfacet rates (e.g. add rate, del rate) were computed by exponential > moving averaging function in ofproto-dpif.c. This patch replaces that > logic with coverage counters. And the rates can be checked by running > "ovs-appctl covera

Re: [ovs-dev] [PATCH V1 1/3] coverage: Reimplement the "ovs-appclt coverage/show" command

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 11:38:41AM -0700, Alex Wang wrote: > This commit changes the "ovs-appclt coverage/show" command to show the > per-second, per-minute and per-hour rates of function invocation. More > importantly, this makes using coverage counter an easy way to monitor > the execution of spe

[ovs-dev] [PATCH net-next 4/4] openvswitch: make skb->csum consistent with rest of networking stack.

2013-06-12 Thread Pravin B Shelar
Following patch keeps skb->csum correct across ovs. Signed-off-by: Pravin B Shelar --- net/openvswitch/actions.c|4 net/openvswitch/datapath.c |1 + net/openvswitch/flow.c |3 +++ net/openvswitch/vport-internal_dev.c |1 + net/openvswitch/

[ovs-dev] [PATCH net-next 3/4] openvswitch: Fix struct comment.

2013-06-12 Thread Pravin B Shelar
Signed-off-by: Pravin B Shelar --- include/uapi/linux/openvswitch.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 405918d..424672d 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/

[ovs-dev] [PATCH net-next 2/4] openvswitch: Simplify interface ovs_flow_metadata_from_nlattrs()

2013-06-12 Thread Pravin B Shelar
This is not functional change, this is just code cleanup. Signed-off-by: Pravin B Shelar --- net/openvswitch/datapath.c |5 + net/openvswitch/flow.c | 23 +++ net/openvswitch/flow.h |4 ++-- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git

[ovs-dev] [PATCH net-next 1/4] openvswitch: Unify vport error stats handling.

2013-06-12 Thread Pravin B Shelar
Following patch changes vport->send return type so that vport layer can do error accounting. Signed-off-by: Pravin B Shelar --- net/openvswitch/vport-netdev.c |1 - net/openvswitch/vport.c|9 +++-- net/openvswitch/vport.h|3 ++- 3 files changed, 9 insertions(+), 4

[ovs-dev] [PATCH net-next 0/4] openvswitch tunneling preparation

2013-06-12 Thread Pravin B Shelar
Following patches are required but not directly related to ovs tunneling. So I am sending them as separate series. These cleanups are already there in out of tree ovs module. Pravin B Shelar (4): openvswitch: Unify vport error stats handling. openvswitch: Simplify interface ovs_flow_metadata_f

Re: [ovs-dev] [PATCH] ofproto-dpif: Hide struct priority_to_dscp.

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 03:33:45PM -0700, Ethan Jackson wrote: > Signed-off-by: Ethan Jackson Looks good, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH] ofproto-dpif: Hide struct priority_to_dscp.

2013-06-12 Thread Ethan Jackson
Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif-xlate.c |7 +++ ofproto/ofproto-dpif.c | 21 - ofproto/ofproto-dpif.h | 14 ++ 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofpr

Re: [ovs-dev] [backer v2 1/3] mac-learning: Simplify mac_learning_changed().

2013-06-12 Thread Ethan Jackson
Thanks, I'll merge this series shortly. Ethan On Wed, Jun 12, 2013 at 3:27 PM, Ben Pfaff wrote: > On Wed, Jun 12, 2013 at 03:27:13PM -0700, Ethan Jackson wrote: >> Thanks for the review. Here's an incremental. > > That's what I had in mind, thanks. __

Re: [ovs-dev] [backer v2 1/3] mac-learning: Simplify mac_learning_changed().

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 03:27:13PM -0700, Ethan Jackson wrote: > Thanks for the review. Here's an incremental. That's what I had in mind, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [backer v2 1/3] mac-learning: Simplify mac_learning_changed().

2013-06-12 Thread Ethan Jackson
Thanks for the review. Here's an incremental. --- lib/mac-learning.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/mac-learning.c b/lib/mac-learning.c index d66f331..f9b3171 100644 --- a/lib/mac-learning.c +++ b/lib/mac-learning.c @@ -246,7 +246,10 @@ mac

Re: [ovs-dev] [PATCHv3 4/5] ofp-util: Add SCTP support

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 02:35:57PM +0900, Joe Stringer wrote: > Reviewed-by: Simon Horman > Signed-off-by: Joe Stringer This looks good, once Jesse is happy with patches 2 and 3. Thanks, Ben. ___ dev mailing list dev@openvswitch.org http://openvswitc

Re: [ovs-dev] [PATCHv3 2/5] ofproto-dpif: Add SCTP support

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 02:35:55PM +0900, Joe Stringer wrote: > Reviewed-by: Simon Horman > Signed-off-by: Joe Stringer I'm happy with the userspace portions of this. It changes kernel headers so it needs approval from Jesse. ___ dev mailing list dev@

Re: [ovs-dev] [PATCHv3 1/5] lib: Add CRC32C Implementation

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 02:35:54PM +0900, Joe Stringer wrote: > This implementation was derived from FreeBSD: > http://code.google.com/p/freebsd-head/source/browse/sys/libkern/crc32.c > > Reviewed-by: Simon Horman > Signed-off-by: Joe Stringer Looks good, but is there any reason not to fold pat

Re: [ovs-dev] [PATCH 00/11] ofproto-dpif: Cleanup, reduce copying struct flow.

2013-06-12 Thread Ben Pfaff
On Fri, May 31, 2013 at 02:35:10PM +0300, Jarno Rajahalme wrote: > The code in ofproto-dpif.c became harder on the eye after the reorg of > struct xlate. This series tries cleaning that up a bit, and while at it, > identifying and reducing unnecessary copying of struct flow. The main > enabler for

Re: [ovs-dev] [backer v2 3/3] ofproto-dpif: Hide struct dpif_backer.

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 02:45:49PM -0700, Ethan Jackson wrote: > This patch removes the last reference to dpif_backer from > ofproto-dpif-xlate, and moves it's definition into ofproto-dpif.c. "its" > Signed-off-by: Ethan Jackson Looks good, thanks. __

Re: [ovs-dev] [backer v2 2/3] ofproto-dpif: Verify backer in ofport_get_peer().

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 02:45:48PM -0700, Ethan Jackson wrote: > This marginally simplifies the code, and removes a reference to > dpif_backer from ofproto-dpif-xlate. > > Signed-off-by: Ethan Jackson Looks good, thanks. ___ dev mailing list dev@openvs

Re: [ovs-dev] [backer v2 1/3] mac-learning: Simplify mac_learning_changed().

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 02:45:47PM -0700, Ethan Jackson wrote: > With this patch, the mac_learning module takes responsibility for > remembering tags which need revalidation after a > mac_learning_changed() call. This removes one of > ofproto-dpif-xlate's dpif_backer uses. > > Signed-off-by: Etha

Re: [ovs-dev] [threads v2] ofp-print: Avoid returning static data.

2013-06-12 Thread Ben Pfaff
Done, and pushed. On Wed, Jun 12, 2013 at 02:48:41PM -0700, Justin Pettit wrote: > Looks good, but I think similar changes should be made to > ofp_port_reason_to_string() and OFP_PORT_REASON_BUFSIZE. > > --Justin > > > On Jun 12, 2013, at 2:45 PM, Ben Pfaff wrote: > > > Returning a static dat

Re: [ovs-dev] [threads 13/17] ofp-print: Avoid returning static data.

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 02:46:57PM -0700, Justin Pettit wrote: > On Jun 12, 2013, at 2:44 PM, Ben Pfaff wrote: > > > I added: > > /* Returns a string form of 'reason'. The return value is either a > > statically > > * allocated constant string or the 'bufsize'-byte buffer 'reasonbuf'. > > * 'bu

Re: [ovs-dev] [threads v2] ofp-print: Avoid returning static data.

2013-06-12 Thread Justin Pettit
Looks good, but I think similar changes should be made to ofp_port_reason_to_string() and OFP_PORT_REASON_BUFSIZE. --Justin On Jun 12, 2013, at 2:45 PM, Ben Pfaff wrote: > Returning a static data buffer makes code more brittle and definitely > not thread-safe, so this commit switches to using

Re: [ovs-dev] [threads 13/17] ofp-print: Avoid returning static data.

2013-06-12 Thread Justin Pettit
On Jun 12, 2013, at 2:44 PM, Ben Pfaff wrote: > I added: > /* Returns a string form of 'reason'. The return value is either a statically > * allocated constant string or the 'bufsize'-byte buffer 'reasonbuf'. > * 'bufsize' should be at least OFP_FLOW_REMOVED_REASON_BUFSIZE. */ > > How's that?

[ovs-dev] [backer v2 3/3] ofproto-dpif: Hide struct dpif_backer.

2013-06-12 Thread Ethan Jackson
This patch removes the last reference to dpif_backer from ofproto-dpif-xlate, and moves it's definition into ofproto-dpif.c. Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif-xlate.c |7 ++-- ofproto/ofproto-dpif.c | 74 ++ ofproto/ofproto-

[ovs-dev] [backer v2 1/3] mac-learning: Simplify mac_learning_changed().

2013-06-12 Thread Ethan Jackson
With this patch, the mac_learning module takes responsibility for remembering tags which need revalidation after a mac_learning_changed() call. This removes one of ofproto-dpif-xlate's dpif_backer uses. Signed-off-by: Ethan Jackson --- lib/mac-learning.c | 15 +-- lib/ma

[ovs-dev] [threads v2] ofp-print: Avoid returning static data.

2013-06-12 Thread Ben Pfaff
Returning a static data buffer makes code more brittle and definitely not thread-safe, so this commit switches to using a caller-provided buffer instead. Signed-off-by: Ben Pfaff --- lib/ofp-print.c | 47 --- 1 files changed, 32 insertions(+), 15 del

[ovs-dev] [backer v2 2/3] ofproto-dpif: Verify backer in ofport_get_peer().

2013-06-12 Thread Ethan Jackson
This marginally simplifies the code, and removes a reference to dpif_backer from ofproto-dpif-xlate. Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif-xlate.c |7 --- ofproto/ofproto-dpif.c |8 +++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ofproto/

Re: [ovs-dev] [threads 13/17] ofp-print: Avoid returning static data.

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 02:18:43PM -0700, Justin Pettit wrote: > > On Jun 5, 2013, at 1:05 PM, Ben Pfaff wrote: > > > +enum { OFP_FLOW_REMOVED_REASON_BUFSIZE = INT_STRLEN(int) + 1 }; > > The use of an enum to define these surprised me. I don't think it's > wrong. Just a convention I don't rem

[ovs-dev] [PATCH 3/3] ofproto-dpif: Hide struct dpif_backer.

2013-06-12 Thread Ethan Jackson
This patch removes the last reference to dpif_backer from ofproto-dpif-xlate, and moves it's definition into ofproto-dpif.c. Signed-off-by: Ethan Jackson --- In this version, I moved revalidate_reason out of ofproto-dpif.h as well. --- ofproto/ofproto-dpif-xlate.c |7 ++--- ofproto/ofproto

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Make code more readable via 'flow' and 'wc' locals.

2013-06-12 Thread Ben Pfaff
Thanks, I'll apply this in a minute. On Wed, Jun 12, 2013 at 02:34:14PM -0700, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > On Wed, Jun 12, 2013 at 2:23 PM, Ben Pfaff wrote: > > 'ctx->xin->flow' and 'ctx->xout->wc' are both pretty long. Where it gets > > in the way of code readability, t

Re: [ovs-dev] [PATCH 04/11] ofproto-dpif: Use flow pointers inside functions.

2013-06-12 Thread Ben Pfaff
On Fri, May 31, 2013 at 02:35:14PM +0300, Jarno Rajahalme wrote: > This will make later patches easier to follow. > > Signed-off-by: Jarno Rajahalme I caught many of these in my rewrite of patch 2 as reposted at: http://openvswitch.org/pipermail/dev/2013-June/028383.html I see that I mis

Re: [ovs-dev] [PATCH 03/11] ofproto-dpif: Harmonize naming of internal functions.

2013-06-12 Thread Ben Pfaff
On Fri, May 31, 2013 at 02:35:13PM +0300, Jarno Rajahalme wrote: > It would be good to be able to harminize the use of "xlate", "execute", > "compose", etc. "xlate" clearly relates to the use of the various translation > context structures, but the distinction between "execute" and "compose" is >

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Make code more readable via 'flow' and 'wc' locals.

2013-06-12 Thread Ethan Jackson
Acked-by: Ethan Jackson On Wed, Jun 12, 2013 at 2:23 PM, Ben Pfaff wrote: > 'ctx->xin->flow' and 'ctx->xout->wc' are both pretty long. Where it gets > in the way of code readability, this patch replaces them by 'xin' and > 'xout' using local variables. > > Also, replace an explicit comparison a

[ovs-dev] [PATCH 2/3] ofproto-dpif: Verify backer in ofport_get_peer().

2013-06-12 Thread Ethan Jackson
This marginally simplifies the code, and removes a reference to dpif_backer from ofproto-dpif-xlate. Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif-xlate.c |7 --- ofproto/ofproto-dpif.c |8 +++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ofproto/

Re: [ovs-dev] [PATCH 02/11] ofproto-dpif: Use flow pointer in action execution.

2013-06-12 Thread Ben Pfaff
On Fri, May 31, 2013 at 02:35:12PM +0300, Jarno Rajahalme wrote: > With the recent change in xlate_ctx some of the code became repetitive > in accessing the ctx->xin->flow. This replaces the *ctx argument with > *flow argument for action execution functions that only need to access > ctx->xin->flo

[ovs-dev] [PATCH 1/3] mac-learning: Simplify mac_learning_changed().

2013-06-12 Thread Ethan Jackson
With this patch, the mac_learning module takes responsibility for remembering tags which need revalidation after a mac_learning_changed() call. This removes one of ofproto-dpif-xlate's dpif_backer uses. Signed-off-by: Ethan Jackson --- lib/mac-learning.c | 15 +-- lib/ma

[ovs-dev] [PATCH 3/3] ofproto-dpif: Hide struct dpif_backer.

2013-06-12 Thread Ethan Jackson
This patch removes the last reference to dpif_backer from ofproto-dpif-xlate, and moves it's definition into ofproto-dpif.c Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif-xlate.c |7 +++--- ofproto/ofproto-dpif.c | 54 ++ ofproto/ofproto

[ovs-dev] [PATCH] ofproto-dpif-xlate: Make code more readable via 'flow' and 'wc' locals.

2013-06-12 Thread Ben Pfaff
'ctx->xin->flow' and 'ctx->xout->wc' are both pretty long. Where it gets in the way of code readability, this patch replaces them by 'xin' and 'xout' using local variables. Also, replace an explicit comparison against IP and IPv6 Ethertypes by a call to is_ip_any(). Co-authored-by: Jarno Rajahal

Re: [ovs-dev] [PATCH 01/11] ofproto-dpif: Check for MPLS depth at the flow.

2013-06-12 Thread Ben Pfaff
On Fri, May 31, 2013 at 02:35:11PM +0300, Jarno Rajahalme wrote: > The earlier check on base_flow.mpls_depth seemed wrong, as multiple > MPLS push actions would have resulted in the flow.mpls_depth being > set to 1 each time. > > Signed-off-by: Jarno Rajahalme Applied, thanks. __

Re: [ovs-dev] [threads 13/17] ofp-print: Avoid returning static data.

2013-06-12 Thread Justin Pettit
On Jun 5, 2013, at 1:05 PM, Ben Pfaff wrote: > +enum { OFP_FLOW_REMOVED_REASON_BUFSIZE = INT_STRLEN(int) + 1 }; The use of an enum to define these surprised me. I don't think it's wrong. Just a convention I don't remember seeing elsewhere. > static const char * > -ofp_flow_removed_reason_to

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Hide 'struct xlate_ctx'.

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 01:12:06PM -0700, Ethan Jackson wrote: > Signed-off-by: Ethan Jackson > --- > > Thsi version fixes a bug I found in the original. Looks good. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [ext-260 v3 3/5] extract-ofp-errors: Remove support for hexadecimal error types.

2013-06-12 Thread Ben Pfaff
Thanks, applied to master. On Wed, Jun 12, 2013 at 01:21:30PM -0700, Reid Price wrote: > Looks good to me, tested. > > > On Wed, Jun 12, 2013 at 11:35 AM, Ben Pfaff wrote: > > > This feature wasn't used and removing it slightly simplifies the code. > > > > Signed-off-by: Ben Pfaff > > --- > >

Re: [ovs-dev] [ext-260 v3 3/5] extract-ofp-errors: Remove support for hexadecimal error types.

2013-06-12 Thread Reid Price
Looks good to me, tested. On Wed, Jun 12, 2013 at 11:35 AM, Ben Pfaff wrote: > This feature wasn't used and removing it slightly simplifies the code. > > Signed-off-by: Ben Pfaff > --- > build-aux/extract-ofp-errors | 10 +++--- > 1 files changed, 3 insertions(+), 7 deletions(-) > > dif

Re: [ovs-dev] [PATCH] ofctl: Initial attempt for multiple tables in replace-flows

2013-06-12 Thread Ben Pfaff
Thanks for the contribution! I have some comments. "git am" reported some trailing whitespace: Applying: ofctl: Initial attempt for multiple tables in replace-flows /home/blp/ovs/.git/rebase-apply/patch:50: trailing whitespace. table_classifiers_find_classifier(struct table_classifie

[ovs-dev] [PATCH] ofproto-dpif-xlate: Hide 'struct xlate_ctx'.

2013-06-12 Thread Ethan Jackson
Signed-off-by: Ethan Jackson --- Thsi version fixes a bug I found in the original. --- ofproto/ofproto-dpif-xlate.c | 39 -- ofproto/ofproto-dpif-xlate.h | 48 ++ ofproto/ofproto-dpif.c | 25 +++-

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Hide 'struct xlate_ctx'.

2013-06-12 Thread Ethan Jackson
This patch neglected to delete the struct xlate_ctx; prototype from ofproto-dpif-xlate.h. Assuming there are no comments, I'll delete that before merging. Ethan On Wed, Jun 12, 2013 at 1:02 PM, Ethan Jackson wrote: > Signed-off-by: Ethan Jackson > --- > ofproto/ofproto-dpif-xlate.c | 39 +++

[ovs-dev] [PATCH] ofproto-dpif-xlate: Hide 'struct xlate_ctx'.

2013-06-12 Thread Ethan Jackson
Signed-off-by: Ethan Jackson --- ofproto/ofproto-dpif-xlate.c | 39 +-- ofproto/ofproto-dpif-xlate.h | 46 +++--- ofproto/ofproto-dpif.c | 18 - 3 files changed, 53 insertions(+), 50 deletions(-) diff

[ovs-dev] [PATCH v2 0/2] fdb/show improvement

2013-06-12 Thread Ben Pfaff
v1->v2: Rebase against current master, re-send to get into patchwork. Ben Pfaff (2): ofp-util: New function ofputil_port_to_string(). ofproto-dpif: Make "fdb/show" report OpenFlow port numbers. AUTHORS|1 + lib/ofp-util.c | 32 ++-- l

[ovs-dev] [PATCH v2 2/2] ofproto-dpif: Make "fdb/show" report OpenFlow port numbers.

2013-06-12 Thread Ben Pfaff
Users are more likely to be able to reasonably interpret OpenFlow port numbers than datapath port numbers. This issue has existed since at least 2011 but only recently has it been possible for OpenFlow and datapath port numbers to differ (except for the "local" port). Reported-by: Christopher Pag

[ovs-dev] [PATCH v2 1/2] ofp-util: New function ofputil_port_to_string().

2013-06-12 Thread Ben Pfaff
This function is more convenient than ofputil_format_port() when a "struct ds" is not already in use. This commit converts one caller for which this was already true, and the following commit will add another. Signed-off-by: Ben Pfaff --- lib/ofp-util.c | 32 ++--

Re: [ovs-dev] [PATCH V2 2/3] ofproto-dpif: Compute the subfacet add/del rate using coverage counters

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 11:32:00AM -0700, Alex Wang wrote: > Thanks Ben, for the tip. > > This will not happen again. Don't worry about it, it's not a big deal. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [ext-260 v3 3/5] extract-ofp-errors: Remove support for hexadecimal error types.

2013-06-12 Thread Ben Pfaff
This feature wasn't used and removing it slightly simplifies the code. Signed-off-by: Ben Pfaff --- build-aux/extract-ofp-errors | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors index 965e322..32d0913 10

[ovs-dev] [ext-260 v3 5/5] ofp-errors: New error code ONFBIC_DUP_INSTRUCTION.

2013-06-12 Thread Ben Pfaff
This is a prototype of OpenFlow enhancement proposal EXT-260 "Add error code for duplicate instruction." It uses the error code proposed there. Signed-off-by: Ben Pfaff --- lib/ofp-actions.c|4 +--- lib/ofp-errors.h |3 +++ tests/ofp-actions.at |4 ++-- 3 files changed, 6 in

[ovs-dev] [ext-260 v3 1/5] ofp-errors: Fix typos in comment.

2013-06-12 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/ofp-errors.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ofp-errors.h b/lib/ofp-errors.h index 593241d..aa3ba50 100644 --- a/lib/ofp-errors.h +++ b/lib/ofp-errors.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011,

[ovs-dev] [ext-260 v3 0/5] add support for OF1.2+ experimenter error codes

2013-06-12 Thread Ben Pfaff
This series adds support for OF1.2+ experimenter error codes. v1->v2: Make it much easier to add new experimenter IDs and updates the error code used to the one used in the latest version of the EXT-260 proposal, using an ONF experimenter ID. v2->v3: Rebase against current master, repost to get i

[ovs-dev] [ext-260 v3 4/5] ofp-errors: Implement OpenFlow 1.2+ experimenter error codes.

2013-06-12 Thread Ben Pfaff
OpenFlow 1.2 standardized experimenter error codes in a way different from the Nicira extension. This commit implements the OpenFlow 1.2+ version. This commit also makes it easy to add error codes for new experimenter IDs by adding new *_VENDOR_ID definitions to openflow-common.h. Signed-off-by:

[ovs-dev] [ext-260 v3 2/5] ofp-errors: Make ofperr_decode() static.

2013-06-12 Thread Ben Pfaff
It had no users outside of ofp-errors.c. Signed-off-by: Ben Pfaff --- lib/ofp-errors.c |2 +- lib/ofp-errors.h |1 - 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/lib/ofp-errors.c b/lib/ofp-errors.c index 74a3358..a141f3f 100644 --- a/lib/ofp-errors.c +++ b/lib/ofp-error

Re: [ovs-dev] [PATCH V2 2/3] ofproto-dpif: Compute the subfacet add/del rate using coverage counters

2013-06-12 Thread Alex Wang
Thanks Ben, for the tip. This will not happen again. On Wed, Jun 12, 2013 at 11:29 AM, Ben Pfaff wrote: > On Wed, Jun 12, 2013 at 11:28:22AM -0700, Alex Wang wrote: > > Sorry, something wrong with the header, should be V1. > > For a v1 you can just omit a version number. >

Re: [ovs-dev] [PATCH V2 2/3] ofproto-dpif: Compute the subfacet add/del rate using coverage counters

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 11:28:22AM -0700, Alex Wang wrote: > Sorry, something wrong with the header, should be V1. For a v1 you can just omit a version number. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH V2 2/3] ofproto-dpif: Compute the subfacet add/del rate using coverage counters

2013-06-12 Thread Alex Wang
Sorry, something wrong with the header, should be V1. On Wed, Jun 12, 2013 at 11:38 AM, Alex Wang wrote: > The subfacet rates (e.g. add rate, del rate) were computed by exponential > moving averaging function in ofproto-dpif.c. This patch replaces that > logic with coverage counters. And the ra

Re: [ovs-dev] [PATCH V3 3/3] ofproto-dpif.at: Add test for "ovs-appctl coverage/show"

2013-06-12 Thread Alex Wang
Sorry, something wrong with the header, should be V1. On Wed, Jun 12, 2013 at 11:38 AM, Alex Wang wrote: > This commit adds an unit test for the "ovs-appctl coverage/show". > > Signed-off-by: Alex Wang > --- > tests/ofproto-dpif.at | 26 ++ > 1 file changed, 26 inser

Re: [ovs-dev] [megaflow v3 2/2] ovs-dpctl: Add mega flow support

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 11:22:09AM -0700, Jesse Gross wrote: > On Wed, Jun 12, 2013 at 11:17 AM, Ben Pfaff wrote: > > I don't see anything anywhere that says that a datapath may ignore a > > field's wildcards, instead fixing the field's values. That's > > important but not at all obvious from the

Re: [ovs-dev] [megaflow v3 2/2] ovs-dpctl: Add mega flow support

2013-06-12 Thread Jesse Gross
On Wed, Jun 12, 2013 at 11:17 AM, Ben Pfaff wrote: > I don't see anything anywhere that says that a datapath may ignore a > field's wildcards, instead fixing the field's values. That's > important but not at all obvious from the interface, so I would think > that we should document this in the dp

[ovs-dev] [PATCH V2 2/3] ofproto-dpif: Compute the subfacet add/del rate using coverage counters

2013-06-12 Thread Alex Wang
The subfacet rates (e.g. add rate, del rate) were computed by exponential moving averaging function in ofproto-dpif.c. This patch replaces that logic with coverage counters. And the rates can be checked by running "ovs-appctl coverage/show" command. Signed-off-by: Alex Wang --- ofproto/ofproto-d

[ovs-dev] [PATCH V3 3/3] ofproto-dpif.at: Add test for "ovs-appctl coverage/show"

2013-06-12 Thread Alex Wang
This commit adds an unit test for the "ovs-appctl coverage/show". Signed-off-by: Alex Wang --- tests/ofproto-dpif.at | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 9231221..823b07a 100644 --- a/tests/ofproto-d

[ovs-dev] [PATCH V1 1/3] coverage: Reimplement the "ovs-appclt coverage/show" command

2013-06-12 Thread Alex Wang
This commit changes the "ovs-appclt coverage/show" command to show the per-second, per-minute and per-hour rates of function invocation. More importantly, this makes using coverage counter an easy way to monitor the execution of specific functions. Signed-off-by: Alex Wang --- Possible Issue: Th

Re: [ovs-dev] [megaflow v3 2/2] ovs-dpctl: Add mega flow support

2013-06-12 Thread Ben Pfaff
On Tue, Jun 11, 2013 at 04:45:10PM -0700, Andy Zhou wrote: > Added --mega option to ovs-dpctl command to allow mega flow to be > specified and displayed. ovs-dpctl tool is mainly used as debugging > tool. > > This patch also implements the low level user space routines to send > and receive mega

Re: [ovs-dev] [megaflow v4 2/2] ovs-dpctl: Add mega flow support

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 10:00:03AM -0700, Andy Zhou wrote: > Added --mega option to ovs-dpctl command to allow mega flow to be > specified and displayed. ovs-dpctl tool is mainly used as debugging > tool. > > This patch also implements the low level user space routines to send > and receive mega

Re: [ovs-dev] OFConfig

2013-06-12 Thread Gurkan, Deniz
Since we have implemented the prototype on OVS, it had to be layered on OVSDB. Otherwise, OVS does not have any other way to be configured other than OVSDB interface when applicable - we would also have to use vsctl commands for some configuration data. Other OpenFlow-capable virtual switch im

Re: [ovs-dev] [megaflow v3 1/2] datapath: Mega flow implementation

2013-06-12 Thread Andy Zhou
Sure, will send out v4 of the patch soon. On Wed, Jun 12, 2013 at 9:42 AM, Jesse Gross wrote: > On Tue, Jun 11, 2013 at 8:49 PM, Andy Zhou wrote: > > Did not realize that the __CHECK_ENDIAN__ flags has to be passed by hand > to > > enable those checks. This is what I use to verify the fix. A

Re: [ovs-dev] [megaflow v3 1/2] datapath: Mega flow implementation

2013-06-12 Thread Jesse Gross
On Tue, Jun 11, 2013 at 8:49 PM, Andy Zhou wrote: > Did not realize that the __CHECK_ENDIAN__ flags has to be passed by hand to > enable those checks. This is what I use to verify the fix. Any better way > to enable this check? > > make C=2 CF="-D__CHECK_ENDIAN__" That's how run it (actually I

Re: [ovs-dev] [PATCH v4] datapath: make skb->csum consistent with rest of networking stack.

2013-06-12 Thread Jesse Gross
On Tue, Jun 11, 2013 at 6:59 PM, Pravin B Shelar wrote: > As suggested by Jesse in the comment for patch "gre: Restructure > tunneling", following patch keeps skb->csum correct across ovs. > > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross ___ d

Re: [ovs-dev] [PATCH 2/3] datapath: Mega flow implementation

2013-06-12 Thread Andy Zhou
The user space logic ensures no key will overlap (in the kernel), so the order of masks are not important for correctness. Ordering masks to improve efficiency is an interesting idea. However, it is not clear ordering by mask specificity will gain efficiency -- there is no guarantee that the frequ

Re: [ovs-dev] OFConfig

2013-06-12 Thread Ben Pfaff
On Thu, Jun 06, 2013 at 03:59:59PM -0500, Gurkan, Deniz wrote: > Our OFConfig code and initial development efforts are posted here: > https://github.com/UH-SDN/softconf.d This is a collaboration with > Infoblox. > > We included a configuration description under /doc. All YANG modules > from OFConf

Re: [ovs-dev] Actions in OVS

2013-06-12 Thread Ben Pfaff
On Wed, Jun 12, 2013 at 03:36:02PM +0500, Sohaib Ayub wrote: > I am trying to determine how actions are stored and applied in OVS for each > flow. When I use the ovs-ofctl add-flow command (specifying only the source > & destination IP and protocol with actions=output:1), I see that 8 > "ofpact" s

Re: [ovs-dev] [PATCH] ofproto-dpif: Pull xlate_actions() into its own file.

2013-06-12 Thread Ben Pfaff
On Tue, Jun 11, 2013 at 06:24:54PM -0700, Ethan Jackson wrote: > Ideally, this patch would move xlate_actions() into it's own module > with a clearly defined regular interface which is minimally > dependent on ofproto-dpif. While, I've done this in a prototype, > moving large amounts of code into

  1   2   >