Re: [ovs-dev] [PATCHv2] revalidator: Prevent handling the same flow twice.

2014-04-22 Thread Alex Wang
Hey Joe, Great to see this patch, one comment below: diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c > index 416cfdc..906bf17 100644 > --- a/ofproto/ofproto-dpif-upcall.c > +++ b/ofproto/ofproto-dpif-upcall.c > @@ -45,6 +45,8 @@ > > VLOG_DEFINE_THIS_MODULE(ofproto_dpi

Re: [ovs-dev] bug fixes

2014-04-22 Thread Ethan Jackson
Though we've discussed it, at this point there is no public bug tracker for the OVS project. We just moved to github, so there may be one there, but to date we haven't used it. If you want to see what went into the 1.10 release, you may consider checking the 1.10 git log for the 1.10 branch. We

[ovs-dev] [PATCH] run-ryu: Use unix socket rather than patch ports

2014-04-22 Thread Simon Horman
My understanding of the implementation of patch ports is that they are rather special, being handled as a special case inside compose_output_action__() and do not exist in the datapath. A side effect of the implementation of patch ports (though perhaps not the portion mentioned above) is that the

[ovs-dev] [PATCHv2] revalidator: Prevent handling the same flow twice.

2014-04-22 Thread Joe Stringer
When the datapath flow table is modified while a flow dump operation is in progress, it is possible for the same flow to be dumped twice. In such cases, revalidators may perform redundant work, or attempt to delete the same flow twice. This was causing intermittent testsuite failures for test #670

[ovs-dev] [PATCH] revalidator: Prevent handling the same flow twice.

2014-04-22 Thread Joe Stringer
When the datapath flow table is modified while a flow dump operation is in progress, it is possible for the same flow to be dumped twice. In such cases, revalidators may perform redundant work, or attempt to delete the same flow twice. This was causing intermittent testsuite failures for test #670

[ovs-dev] bug fixes

2014-04-22 Thread Neelakantam Gaddam
Hi All, Please guide me to find out the openvswitch 1.10.0 bugs list and their fixes. -- Thanks & Regards Neelakantam Gaddam ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] netdev: Add random tag to struct netdev.

2014-04-22 Thread Ben Pfaff
OK, thanks. There might already be a way to figure out when OVS restarts. Have you looked through the existing configuration schema to try to find one? On Apr 22, 2014 7:18 PM, "Ryan Wilson 76511" wrote: > I agree, this makes much more sense. We could add this restart tag to the > Open_vSwitch t

Re: [ovs-dev] [PATCH] netdev: Add random tag to struct netdev.

2014-04-22 Thread Ryan Wilson 76511
I agree, this makes much more sense. We could add this restart tag to the Open_vSwitch table instead, so the controller team could still do event-based triggering on database changes. Also, this would clearly separate the cases of a port being deleted and re-added (uuid changing in Interface tab

Re: [ovs-dev] [PATCH] netdev: Add random tag to struct netdev.

2014-04-22 Thread Ben Pfaff
It would make a lot more sense to have a global indication whether OVS was restarted. This is a property of OVS, not of a netdev. Otherwise we'll get subsequent requests to add such a random tag to every single table in the database. You can already tell if a port is deleted and readded by noticin

Re: [ovs-dev] [PATCH] netdev: Add random tag to struct netdev.

2014-04-22 Thread Ethan Jackson
> I don't understand why, if you need to know when vswitchd restarts (why do > you?), it should be tied to netdevs. So if you're monitoring a netdev for packet stats, you need to know if vswitchd restarted so that you can take account of the fact the stats were reset. I suppose it needs to be tie

Re: [ovs-dev] [PATCH] hmap_random_node: Improve distribution

2014-04-22 Thread Ben Pfaff
I understand now. Thank you. This patch looks good, then. Please add your explanation to the commit message. On Apr 22, 2014 5:28 PM, "YAMAMOTO Takashi" wrote: > > On Tue, Apr 22, 2014 at 01:47:32PM +0900, YAMAMOTO Takashi wrote: > >> Improve random distribution for an hmap with a small number o

Re: [ovs-dev] [PATCH] hmap_random_node: Improve distribution

2014-04-22 Thread YAMAMOTO Takashi
> On Tue, Apr 22, 2014 at 01:47:32PM +0900, YAMAMOTO Takashi wrote: >> Improve random distribution for an hmap with a small number of nodes >> with the expense of the increased cpu cost. >> It would be a fair trade-off because the situation is rather common >> for bond, which is currently the only

Re: [ovs-dev] [PATCH] netdev: Add random tag to struct netdev.

2014-04-22 Thread Ben Pfaff
I don't understand why, if you need to know when vswitchd restarts (why do you?), it should be tied to netdevs. On Apr 22, 2014 4:09 PM, "Ryan Wilson 76511" wrote: > netdev: Add random tag to struct netdev. > > > Before, there would be no way to tell if ovs-vswitchd had > been restarted or killed

Re: [ovs-dev] [PATCH] TODO: Add the project list from the hackathon.

2014-04-22 Thread Ben Pfaff
On Wed, Apr 23, 2014 at 09:36:30AM +1200, Joe Stringer wrote: > On 23 April 2014 06:19, Ben Pfaff wrote: > > > > +Please read SubmittingPatches and CodingStyle in the top of the source > > > > SubmittingPatches -> CONTRIBUTING > > > +OpenFlow Group Bucket Stats > > +---

[ovs-dev] [PATCH] netdev: Add random tag to struct netdev.

2014-04-22 Thread Ryan Wilson 76511
netdev: Add random tag to struct netdev. Before, there would be no way to tell if ovs-vswitchd had been restarted or killed via ovsdb logging. Now, a random tag will be generated upon initialization of the netdev struct which happens when ovs-vswitchd is restarted. A change in tag value in

[ovs-dev] [PATCH 1/2] netdev: Initialize netdev_class_mutex.

2014-04-22 Thread Gurucharan Shetty
This code path currently does not initialize netdev_class_mutex. dummy_enable ->netdev_dummy_register ->netdev_register_provider ->ovs_mutex_lock(&netdev_class_mutex) ovsdb-server on windows crashes without it. This commit adds a new initialization function. Signed-off-by: Gurucharan Sh

[ovs-dev] [PATCH 2/2] ofproto: Don't destroy mutex before its use.

2014-04-22 Thread Gurucharan Shetty
Currently, we are calling guarded_list_destroy() to destroy a mutex and then go ahead and use it through delete_group ->delete_group__ ->handle_flow_mod__ ->run_rule_executes ->guarded_list_pop_all The group related unit tests cause ovs-vswitchd to crash because of this (on windows).

Re: [ovs-dev] [PATCH 07/11] daemon-windows: Recognize --no-chdir option for windows.

2014-04-22 Thread Ben Pfaff
On Tue, Apr 22, 2014 at 01:40:55PM -0700, Gurucharan Shetty wrote: > > Should OVS chdir to the root (on all drives?) on Windows > > also? > Looks like chdir("/") on windows takes me to C:/ . So doing that on > windows should be good. I will re-spin this. OK. If Windows works like it used to, ther

Re: [ovs-dev] [PATCH 07/11] daemon-windows: Recognize --no-chdir option for windows.

2014-04-22 Thread Ben Pfaff
On Tue, Apr 22, 2014 at 01:08:10PM -0700, Gurucharan Shetty wrote: > On Tue, Apr 22, 2014 at 9:35 AM, Ben Pfaff wrote: > > On Fri, Apr 18, 2014 at 11:04:14AM -0700, Gurucharan Shetty wrote: > >> The option won't have any effect on the running of the daemon. > >> Recognizing the option lets us avoi

Re: [ovs-dev] [PATCH 01/11] tests: Define a variable "IS_WIN32" for tests.

2014-04-22 Thread Ben Pfaff
Yes, thanks. Acked-by: Ben Pfaff On Tue, Apr 22, 2014 at 12:54:31PM -0700, Gurucharan Shetty wrote: > Something like this, right? > > diff --git a/tests/atlocal.in b/tests/atlocal.in > index 06e7384..60f3dbf 100644 > --- a/tests/atlocal.in > +++ b/tests/atlocal.in > @@ -78,3 +78,13 @@ FreeBSD|

Re: [ovs-dev] [PATCH] lib/util: Input validation in str_to_uint

2014-04-22 Thread Ben Pfaff
On Tue, Apr 22, 2014 at 06:27:18PM +0100, Zoltan Kiss wrote: > This function returns true when 's' is negative or greater than UINT_MAX. > Also, > the representation of 'int' and 'unsigned int' is implementation dependent, so > converting [INT_MAX..UINT_MAX] values with str_to_int is fragile. > In

Re: [ovs-dev] [PATCH] TODO: Add the project list from the hackathon.

2014-04-22 Thread Joe Stringer
On 23 April 2014 06:19, Ben Pfaff wrote: > > +Please read SubmittingPatches and CodingStyle in the top of the source > SubmittingPatches -> CONTRIBUTING +OpenFlow Group Bucket Stats > +--- > + > +When OpenFlow group support was added, we forgot to support statistics > +f

[ovs-dev] [PATCH v4 1/2] datapath: Add support for kernel 3.14.

2014-04-22 Thread Pritesh Kothari
Signed-off-by: Pritesh Kothari --- v4: rebase for changes in datapath/actions.c and datapath/vport.c, split patch in two for seperating out skb_clear_hash related stuff. v3: rebase for changes in datapath/vport.c. v2: Use OVS_GREP_IFELSE instead of upstream kernel versions as Thomas suggested.

[ovs-dev] [PATCH v4 2/2] datapath: use skb_clear_hash instead of skb_clear_rxhash.

2014-04-22 Thread Pritesh Kothari
Signed-off-by: Pritesh Kothari --- acinclude.m4 | 1 + datapath/actions.c | 10 +- datapath/linux/compat/include/linux/skbuff.h | 4 datapath/linux/compat/ip_tunnels_core.c | 4 ++-- 4 files changed, 12 insertions(+),

Re: [ovs-dev] [PATCH 07/11] daemon-windows: Recognize --no-chdir option for windows.

2014-04-22 Thread Gurucharan Shetty
> Should OVS chdir to the root (on all drives?) on Windows > also? Looks like chdir("/") on windows takes me to C:/ . So doing that on windows should be good. I will re-spin this. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/lis

Re: [ovs-dev] [PATCH 07/11] daemon-windows: Recognize --no-chdir option for windows.

2014-04-22 Thread Gurucharan Shetty
On Tue, Apr 22, 2014 at 9:35 AM, Ben Pfaff wrote: > On Fri, Apr 18, 2014 at 11:04:14AM -0700, Gurucharan Shetty wrote: >> The option won't have any effect on the running of the daemon. >> Recognizing the option lets us avoid if else conditions in unit >> tests. >> >> Signed-off-by: Gurucharan Shet

Re: [ovs-dev] [PATCH 05/11] daemon-windows: Implement --detach option for Windows.

2014-04-22 Thread Gurucharan Shetty
On Tue, Apr 22, 2014 at 9:20 AM, Ben Pfaff wrote: > On Fri, Apr 18, 2014 at 11:04:12AM -0700, Gurucharan Shetty wrote: >> When "--detach" is specified, a daemon will create a new >> process with the same command line options as the parent. >> Additionally, an undocumented command line option "--pi

Re: [ovs-dev] [PATCH 01/11] tests: Define a variable "IS_WIN32" for tests.

2014-04-22 Thread Gurucharan Shetty
Something like this, right? diff --git a/tests/atlocal.in b/tests/atlocal.in index 06e7384..60f3dbf 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -78,3 +78,13 @@ FreeBSD|NetBSD) LOOPBACK_INTERFACE=lo0 ;; esac + +# Check for MINGW platform. +case `uname` in +MINGW*) +IS_WIN

[ovs-dev] [PATCH 3.13] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-04-22 Thread Ben Hutchings
From: Zoltan Kiss commit 36d5fe6a000790f56039afe26834265db0a3ad4c upstream. skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is

[ovs-dev] [PATCH v4 3/3] ofp-print: Enable printing OF1.4 version

2014-04-22 Thread Alexandru Copot
Also fix some tests that can now properly print packets with the new protocol version. Signed-off-by: Alexandru Copot Cc: Daniel Baluta --- v4: moved version print change here --- lib/ofp-print.c| 3 +++ tests/ofp-print.at | 6 +++--- tests/ofp-util.at | 2 +- 3 files changed, 7 insertions

[ovs-dev] [PATCH v4 1/3] Add basic implementation for OpenFlow 1.4 bundles

2014-04-22 Thread Alexandru Copot
This is only the communication part of the bundles functionality. The actual message pre-validation and commits are not implemented. Signed-off-by: Alexandru Copot Cc: Daniel Baluta --- v4: * adjust copyright * fix style issues * remove locking in ofconn * delete bundles in ofconn_destro

[ovs-dev] [PATCH v4 2/3] tests: add some OpenFlow 1.4 bundles tests

2014-04-22 Thread Alexandru Copot
Signed-off-by: Alexandru Copot Cc: Daniel Baluta --- v4: rebase v3: small fix v2: rebase --- tests/ofp-print.at | 125 ++ tests/ofproto-macros.at | 4 +- tests/ofproto.at| 234 3 files changed, 361 insertions

[ovs-dev] [PATCH v4 0/3] Initial implementation of OpenFlow 1.4 bundles

2014-04-22 Thread Alexandru Copot
This series adds the basic communication handlers for the bundles functionality. The actual message pre-validation and commits are not implemented. Signed-off-by: Alexandru Copot Cc: Daniel Baluta Alexandru Copot (3): Add basic implementation for OpenFlow 1.4 bundles tests: add some OpenFlo

[ovs-dev] [PATCH] TODO: Add the project list from the hackathon.

2014-04-22 Thread Ben Pfaff
I've had a couple of requests for an updated project list, so this commit adds it to the tree. Signed-off-by: Ben Pfaff --- Makefile.am |1 + TODO| 290 +++ 2 files changed, 291 insertions(+) create mode 100644 TODO diff --gi

Re: [ovs-dev] [PATCH] ovs-rcu: Name the ovsrcu_postpone_thread to 'urcu'.

2014-04-22 Thread Alex Wang
Thx, applied, On Tue, Apr 22, 2014 at 11:05 AM, Ben Pfaff wrote: > On Tue, Apr 15, 2014 at 12:23:14PM -0700, Alex Wang wrote: > > The ovs-rcu module adds a new thread for checking the grace period. > > Since the thread name is not set, it will inherit the name of the > > thread that creates it.

Re: [ovs-dev] [PATCH] ovs-rcu: Name the ovsrcu_postpone_thread to 'urcu'.

2014-04-22 Thread Ben Pfaff
On Tue, Apr 15, 2014 at 12:23:14PM -0700, Alex Wang wrote: > The ovs-rcu module adds a new thread for checking the grace period. > Since the thread name is not set, it will inherit the name of the > thread that creates it. This makes the 'top' output quite confusing. > > This commit names the thr

Re: [ovs-dev] [PATCH v5] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-04-22 Thread Zoltan Kiss
On 22/04/14 16:38, Ben Hutchings wrote: On Mon, 2014-04-21 at 12:26 +0100, Luis Henriques wrote: Hi David, On Thu, Mar 27, 2014 at 03:29:56PM -0400, David Miller wrote: From: Zoltan Kiss Date: Wed, 26 Mar 2014 22:37:45 + skb_zerocopy can copy elements of the frags array between skbs, bu

[ovs-dev] [PATCH] lib/util: Input validation in str_to_uint

2014-04-22 Thread Zoltan Kiss
This function returns true when 's' is negative or greater than UINT_MAX. Also, the representation of 'int' and 'unsigned int' is implementation dependent, so converting [INT_MAX..UINT_MAX] values with str_to_int is fragile. Instead, we should convert straight to 'long long' and do a boundary check

Re: [ovs-dev] OpenFlow rule deletion during port destroy

2014-04-22 Thread Zoltan Kiss
On 18/04/14 02:42, Jarno Rajahalme wrote: On Apr 17, 2014, at 11:26 AM, Zoltan Kiss wrote: On 16/04/14 18:00, Justin Pettit wrote: On April 16, 2014 at 9:00:15 AM, Zoltan Kiss (zoltan.k...@citrix.com) wrote: My actual problem is that an important rule gets deleted: cookie=0x0, duration=15

Re: [ovs-dev] Incorporating OF1.4 eviction

2014-04-22 Thread Ben Pfaff
On Tue, Apr 22, 2014 at 10:03:00PM +0530, Shivanker Goel wrote: > But what I've been trying to do for a while now, is interacting with the > controller with respect to this. The controller should be able to enable > eviction in a table using an OFP_TABLE_MOD packet, it should be able to > modify

Re: [ovs-dev] [PATCH 10/11] testsuite.at: kill for windows.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:17AM -0700, Gurucharan Shetty wrote: > We use kill to cleanup processes from pidfiles. > Windows has a 'taskkill' which does something similar. > We can check if the process with a PID exists with > 'tasklist'. Both tasklist and taskkill return 0 for > both success and

Re: [ovs-dev] [PATCH 11/11] testsuite.at: Workaround for carriage returns on windows.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:18AM -0700, Gurucharan Shetty wrote: > In unit tests, we compare text written in logs or stdout/stderr > to figure out the success or failure of tests. In Windows, > since new line is represented by CR+LF, autoconf tests run in > MinGW environment fail. > > Asking dif

Re: [ovs-dev] [PATCH 09/11] testsuite.at: pwd for windows.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:16AM -0700, Gurucharan Shetty wrote: > On MinGW, "pwd -W" gives the present working directory > in the form of windows path (i.e C:/temp instead of /c/temp). > When we pass the directory path to daemons as arguments, > we should be passing it in the form of windows pat

Re: [ovs-dev] [PATCH 07/11] daemon-windows: Recognize --no-chdir option for windows.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:14AM -0700, Gurucharan Shetty wrote: > The option won't have any effect on the running of the daemon. > Recognizing the option lets us avoid if else conditions in unit > tests. > > Signed-off-by: Gurucharan Shetty The reason that Unix daemons chdir to the root, by d

[ovs-dev] Incorporating OF1.4 eviction

2014-04-22 Thread Shivanker Goel
Hello everyone, I was attempting to incorporate OF1.4 style eviction in OVS as a project. By OF1.4 style eviction, I mean using the importance parameter of flows in deciding which flow to evict. This parameter can be set by the controller per flow. I have defined the required enums and structs

Re: [ovs-dev] [PATCH 06/11] daemon-windows: Create pidfiles with option --pidfile.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:13AM -0700, Gurucharan Shetty wrote: > In Windows, we cannot delete a file that has been opened. > We use this feature to "lock" the pidfile. > > Signed-off-by: Gurucharan Shetty I think that we are starting to accumulate some common code, which it might be a good i

Re: [ovs-dev] [PATCH 05/11] daemon-windows: Implement --detach option for Windows.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:12AM -0700, Gurucharan Shetty wrote: > When "--detach" is specified, a daemon will create a new > process with the same command line options as the parent. > Additionally, an undocumented command line option "--pipe-handle" > is passed to child. Once the child is ready

Re: [ovs-dev] [PATCH 04/11] daemon-windows: Rename service variables.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:11AM -0700, Gurucharan Shetty wrote: > Sa far, we are using variable 'detach' to indicate whether the option > "--service" has been set. We were using variable 'detached' to indicate that > the daemon is being called from the Windows services manager. > > An upcoming

Re: [ovs-dev] lost count in dpctl command

2014-04-22 Thread Justin Pettit
On April 22, 2014 at 7:33:38 AM, Neelakantam Gaddam (neelugad...@gmail.com) wrote: >  > I am using openvswitch-1.10.0. > > We are running openvswitch on MIPS based platform. > While sending the traffic with 10K flows, I see lot of lost statistics in > the dpctl command. I see not more than 1500

Re: [ovs-dev] [PATCH 03/11] unixctl: Use [p]windows_[p]stream_class for windows.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:10AM -0700, Gurucharan Shetty wrote: > Now that we have a separate [p]stream_class for hiding > kernel assigned TCP port inside a file meant for unix domain > sockets in windows, use the new infrastructure provided. > > Signed-off-by: Gurucharan Shetty I'd consider

Re: [ovs-dev] [PATCH 02/11] stream: Introduce [p]windows_[p]stream_class.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:09AM -0700, Gurucharan Shetty wrote: > On Linux, we heavily use --remote=punix:* to listen for > connections through unix domain sockets. We also use, unix:* > to connect to a daemon that is listening on unix domain sockets. > Many times, we create default unix domain

Re: [ovs-dev] [PATCH 01/11] tests: Define a variable "IS_WIN32" for tests.

2014-04-22 Thread Ben Pfaff
On Fri, Apr 18, 2014 at 11:04:08AM -0700, Gurucharan Shetty wrote: > Signed-off-by: Gurucharan Shetty > --- > tests/atlocal.in |3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tests/atlocal.in b/tests/atlocal.in > index 06e7384..8267554 100644 > --- a/tests/atlocal.in > +++ b/tests

Re: [ovs-dev] [PATCH v5] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-04-22 Thread Ben Hutchings
On Mon, 2014-04-21 at 12:26 +0100, Luis Henriques wrote: > Hi David, > > On Thu, Mar 27, 2014 at 03:29:56PM -0400, David Miller wrote: > > From: Zoltan Kiss > > Date: Wed, 26 Mar 2014 22:37:45 + > > > > > skb_zerocopy can copy elements of the frags array between skbs, but it > > > doesn't >

Re: [ovs-dev] [PATCH] hmap_random_node: Improve distribution

2014-04-22 Thread Ben Pfaff
On Tue, Apr 22, 2014 at 01:47:32PM +0900, YAMAMOTO Takashi wrote: > Improve random distribution for an hmap with a small number of nodes > with the expense of the increased cpu cost. > It would be a fair trade-off because the situation is rather common > for bond, which is currently the only consum

[ovs-dev] lost count in dpctl command

2014-04-22 Thread Neelakantam Gaddam
Hi All, I am using openvswitch-1.10.0. We are running openvswitch on MIPS based platform. While sending the traffic with 10K flows, I see lot of lost statistics in the dpctl command. I see not more than 1500 flows in the datapath. >From my understanding, lost count is the number of packets desti

Re: [ovs-dev] [PATCH 1/2] DPI plugin addition proposal v2

2014-04-22 Thread Franck BAUDIN
Hi Justin, I knew that you wouldn’t accept the patch (same hooking place, same impact on ovs-vswitchd), but I posted this patch anyway to get feedback on AXM concept that has been demonstrated at the ONF forum (http://youtu.be/jkbkvX2B_kI): how to use and present L4-L7 information at the OpenFl

[ovs-dev] [PATCH v3 14/16] ofp-actions: Allow pop_mpls on MPLS packets

2014-04-22 Thread Simon Horman
With recirculation in place this should be safe. XXX: What if recirculation is disabled??? Signed-off-by: Simon Horman --- lib/ofp-actions.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index ce14004..69d6505 100644 --- a/lib/ofp-actions.c +++ b

[ovs-dev] [PATCH v3 13/16] ofproto-dpif: MPLS recirculation

2014-04-22 Thread Simon Horman
In some cases an pop MPLS action changes a packet to be a non-mpls packet. In this case subsequent any L3+ actions require access to portions of the packet which were not decoded as they were opaque when the packet was MPLS. Allow such actions to be translated by first recirculating the packet. Si

[ovs-dev] [PATCH v3 08/16] flow: Add mf_is_l3_or_higher()

2014-04-22 Thread Simon Horman
This is in preparation for using the same helper as part of support for using recirculation in conjunction series of actions including with MPLS actions that are currently not able to be translated. In that scenario this helper will be used to test if load, move and set_field actions require recir

[ovs-dev] [PATCH v3 12/16] ofproto-dpif: Add idle_timeout parameter to ofproto_dpif_add_internal_flow()

2014-04-22 Thread Simon Horman
This is in preparation for using the same helper as part of support for using recirculation in conjunction series of actions including with MPLS actions that are currently not able to be translated. In that scenario the idle timeout will be used to expire internal rules that are added to handle re

[ovs-dev] [PATCH v3 11/16] ofproto-dpif: Add recirc_id field to struct rule_dpif

2014-04-22 Thread Simon Horman
This is to allow a recirculation id to be associated with a rule in the case that its actions cause recirculation. In such a case if the recirc_id field is non-zero then that value should be used, otherwise a value should be obtained using ofproto_dpif_alloc_recirc_id and saved in recirc_id field.

[ovs-dev] [PATCH v3 09/16] ofproto-dpif: Add table_is_internal() helper

2014-04-22 Thread Simon Horman
This will be used by a subsequent patch to add support for recirculation for MPLS. Signed-off-by: Simon Horman --- ofproto/ofproto-dpif.c | 10 +- ofproto/ofproto-dpif.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.

[ovs-dev] [PATCH v3 15/16] ofproto-dpif: Break out MPLS controller tests into their own test

2014-04-22 Thread Simon Horman
This makes maintaining the controller test slightly easier by splitting it in two. Based on a similar patch by Joe Stringer. Cc: Joe Stringer Signed-off-by: Simon Horman -- v3 * Rebase v2 * No change v1 * Taken from another patch-set and re-worked --- tests/ofproto-dpif.at | 353 +++

[ovs-dev] [PATCH v3 07/16] ofproto-dpif: Bonding with in_port that isn't present in the datapath

2014-04-22 Thread Simon Horman
This tests exercises execution of actions in ovs-vswitchd in the case where a packet is processed due to a packet out message with an in_port that doesn't exist in the datapath and translation results in recirc actions due to bonding. Signed-off-by: Simon Horman --- tests/ofproto-dpif.at | 80 ++

[ovs-dev] [PATCH v3 00/16] Flow-Based Recirculation for MPLS

2014-04-22 Thread Simon Horman
The motivation of this series is to allow some sequences of actions that include MPLS actions to be performed using recirculation. Sequences of actions that could not previously be handled. For example pop_mpls:0x0800,dec_ttl. This uses recirculation after the pop_mpls action to allow access to

[ovs-dev] [PATCH v3 10/16] ofproto-dpif: Move RECIRC_RULE_PRIORITY to common header

2014-04-22 Thread Simon Horman
This is in preparation for using this value in ofproto-dpif-xlate.c when composing recirculation actions added as a result of processing (MPLS) actions. Signed-off-by: Simon Horman --- ofproto/bond.c | 1 - ofproto/ofproto-dpif.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-)

[ovs-dev] [PATCH v3 01/16] ofproto-dpif: Move recirc members from struct xlate_out to struct xlate_ctx

2014-04-22 Thread Simon Horman
There does not seem to be a reason to expose recirc members in struct xlate_out to move them to struct xlate_ctx. Signed-off-by: Simon Horman --- ofproto/ofproto-dpif-xlate.c | 20 ofproto/ofproto-dpif-xlate.h | 3 --- 2 files changed, 12 insertions(+), 11 deletions(-) dif

[ovs-dev] [PATCH v3 06/16] ofproto-dpif: Execute with helper if recirc actions are present

2014-04-22 Thread Simon Horman
In the case where packet is being processed by ofproto_dpif_execute_actions*() it may have an in_port that does not exist in the datapath: e.g. a packet from a packet_out message with the CONTROLLER as the in_port. In such cases it seems to make little sense to perform execution in the datapath if

[ovs-dev] [PATCH v3 05/16] ofproto-dpif: Execute deferred recirc actions in ofproto_dpif_execute_actions()

2014-04-22 Thread Simon Horman
If execution is performed using a helper then any recirc actions encountered may be deferred. This change executes such actions. Signed-off-by: Simon Horman --- ofproto/ofproto-dpif.c | 81 +- 1 file changed, 73 insertions(+), 8 deletions(-) diff

[ovs-dev] [PATCH v3 03/16] dpif: Defer recirc actions in dpif_execute_helper_cb()

2014-04-22 Thread Simon Horman
Rather then prohibiting recirc actions dpif_execute_helper_cb() deffer their processing by saving the required state. This is in preparation for allowing execution of recirc actions in ovs-vswitchd. Signed-off-by: Simon Horman --- lib/dpif.c | 37 +++-- lib/dpif.

[ovs-dev] [PATCH v3 04/16] dpif: Allow hash actions in dpif_execute_helper_cb()

2014-04-22 Thread Simon Horman
Rather then prohibiting hash actions dpif_execute_helper_cb() execute them by passing them on to aux->dpif->dpif_class->execute() and save the updated packet metadata afterwards. It is assumed that if a hash is calculated it will be sored in the dp_hash field of the metadata. This is in preparatio

[ovs-dev] [PATCH v3 02/16] ofproto-dpif: Add has_recirc field to struct xlate_out

2014-04-22 Thread Simon Horman
Add has_recirc field to struct xlate_out. It is set to true during actions translation if the resulting actions include a recirc action. It is false otherwise. This will be used by a subsequent patch that executes recirc actions for packet out in ovs-vswitchd. Signed-off-by: Simon Horman --- of

[ovs-dev] [PATCH v3] ofproto: per-table statistics

2014-04-22 Thread Simon Horman
Add per-table counters. This resolves some short-comings in the data provided in a table stats reply message. * Lookups and matches are calculated based on table accesses rather than datapath flow hits and misses. * Lookups and matches are credited to the table where they occurred rather than