Re: [ovs-dev] [PATCH] netdev-linux: Fix build break on RHEL 6.1.

2014-01-16 Thread Ben Pfaff
Thank you! I applied this to master. On Thu, Jan 16, 2014 at 06:08:12PM -0800, Alex Wang wrote: > Looks good to me~ > > > On Thu, Jan 16, 2014 at 5:22 PM, Ben Pfaff wrote: > > > Commit 73c85181d (netdev-linux: Read packet auxdata to obtain vlan_tid) > > added #include to this file, to get th

Re: [ovs-dev] [PATCH 8/8] ofproto-dpif: Do not add more MPLS labels to mask than the datapath can handle

2014-01-16 Thread Simon Horman
On Thu, Jan 16, 2014 at 05:28:53PM -0800, Ben Pfaff wrote: > On Fri, Jan 17, 2014 at 09:59:49AM +0900, Simon Horman wrote: > > On Thu, Jan 16, 2014 at 04:46:23PM -0800, Ben Pfaff wrote: > > > On Wed, Jan 15, 2014 at 04:13:25PM +0900, Simon Horman wrote: > > > > The key is sourced from the datapath

Re: [ovs-dev] [PATCH] netdev-linux: Fix build break on RHEL 6.1.

2014-01-16 Thread Alex Wang
Looks good to me~ On Thu, Jan 16, 2014 at 5:22 PM, Ben Pfaff wrote: > Commit 73c85181d (netdev-linux: Read packet auxdata to obtain vlan_tid) > added #include to this file, to get the definition > of PACKET_AUXDATA and some other definitions, but on RHEL 6.1 this > provoked compiler errors: >

Re: [ovs-dev] [PATCH] ofproto: fix interactions between flow monitors and barriers

2014-01-16 Thread YAMAMOTO Takashi
> On Wed, Jan 08, 2014 at 07:31:23PM +0900, YAMAMOTO Takashi wrote: >> Following OpenFlow 1.4 semantics, make barriers wait for >> flow monitor replies. This should fix a race in >> "ofproto - flow monitoring pause and resume" test. >> >> Signed-off-by: YAMAMOTO Takashi > > Clang says: > >

Re: [ovs-dev] [PATCH] vswitchd: Inherit parents mac address for fake bridges

2014-01-16 Thread Ben Pfaff
On Mon, Dec 09, 2013 at 09:01:57AM +0100, Helmut Schaa wrote: > On Sat, Dec 7, 2013 at 6:20 PM, Ben Pfaff wrote: > > On Fri, Dec 06, 2013 at 04:18:42PM +0100, Helmut Schaa wrote: > >> When adding a physical port to the main bridge the mac address > >> of the bridge is updated. We can do the same f

Re: [ovs-dev] [PATCH 8/8] ofproto-dpif: Do not add more MPLS labels to mask than the datapath can handle

2014-01-16 Thread Ben Pfaff
On Fri, Jan 17, 2014 at 09:59:49AM +0900, Simon Horman wrote: > On Thu, Jan 16, 2014 at 04:46:23PM -0800, Ben Pfaff wrote: > > On Wed, Jan 15, 2014 at 04:13:25PM +0900, Simon Horman wrote: > > > The key is sourced from the datapath so should not > > > have more labels than it can handle. > > > > >

[ovs-dev] [PATCH] netdev-linux: Fix build break on RHEL 6.1.

2014-01-16 Thread Ben Pfaff
Commit 73c85181d (netdev-linux: Read packet auxdata to obtain vlan_tid) added #include to this file, to get the definition of PACKET_AUXDATA and some other definitions, but on RHEL 6.1 this provoked compiler errors: In file included from /usr/include/linux/rtnetlink.h:5, from lib/netdev-linux

Re: [ovs-dev] [PATCH 0/8] Proposed improvements to "Implement OpenFlow support for MPLS, for up to 3 labels"

2014-01-16 Thread Simon Horman
On Thu, Jan 16, 2014 at 04:50:45PM -0800, Ben Pfaff wrote: > On Wed, Jan 15, 2014 at 04:13:17PM +0900, Simon Horman wrote: > > This series provides some proposed improvements to your patchset which > > includes "Implement OpenFlow support for MPLS, for up to 3 labels." > > > > This series is based

Re: [ovs-dev] [PATCH 8/8] ofproto-dpif: Do not add more MPLS labels to mask than the datapath can handle

2014-01-16 Thread Simon Horman
On Thu, Jan 16, 2014 at 04:46:23PM -0800, Ben Pfaff wrote: > On Wed, Jan 15, 2014 at 04:13:25PM +0900, Simon Horman wrote: > > The key is sourced from the datapath so should not > > have more labels than it can handle. > > > > dpif-netdev supports as many LSEs as can fit in struct flow, > > so it

Re: [ovs-dev] [PATCH 0/8] Proposed improvements to "Implement OpenFlow support for MPLS, for up to 3 labels"

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 04:13:17PM +0900, Simon Horman wrote: > This series provides some proposed improvements to your patchset which > includes "Implement OpenFlow support for MPLS, for up to 3 labels." > > This series is based on the blp/mpls branch of your tree on github. The > head commit I

Re: [ovs-dev] [PATCH 8/8] ofproto-dpif: Do not add more MPLS labels to mask than the datapath can handle

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 04:13:25PM +0900, Simon Horman wrote: > The key is sourced from the datapath so should not > have more labels than it can handle. > > dpif-netdev supports as many LSEs as can fit in struct flow, > so it is safe to pass SIZE_MAX as the limit there. > > This is an proposed e

Re: [ovs-dev] [PATCH] datapath: Fix kernel panic on ovs_flow_free

2014-01-16 Thread Joe Stringer
I've just tested v4, and haven't seen any further kernel panics. Thanks! On 16 January 2014 15:42, Jesse Gross wrote: > On Wed, Jan 15, 2014 at 7:52 PM, Andy Zhou wrote: > > Both mega flow mask's reference counter and per flow table mask list > > should only be accessed when holding ovs_mutex(

Re: [ovs-dev] [PATCH 7/8] ofproto-dpif-xlate: Do not use of more MPLS LSEs than the datapath can supply

2014-01-16 Thread Simon Horman
On Thu, Jan 16, 2014 at 04:30:24PM -0800, Ben Pfaff wrote: > On Wed, Jan 15, 2014 at 04:13:24PM +0900, Simon Horman wrote: > > This is an proposed enhancement to > > "Implement OpenFlow support for MPLS, for up to 3 labels." > > > > Signed-off-by: Simon Horman > > --- > > ofproto/ofproto-dpif-xl

Re: [ovs-dev] [PATCH 6/8] ofproto-dpif-xlate: Do not add more MPLS LSEs than the datapath can handle

2014-01-16 Thread Simon Horman
On Thu, Jan 16, 2014 at 04:35:24PM -0800, Ben Pfaff wrote: > On Fri, Jan 17, 2014 at 09:28:29AM +0900, Simon Horman wrote: > > On Thu, Jan 16, 2014 at 04:10:43PM -0800, Ben Pfaff wrote: > > > On Wed, Jan 15, 2014 at 04:13:23PM +0900, Simon Horman wrote: > > > > This is an proposed enhancement to >

Re: [ovs-dev] [PATCH 6/8] ofproto-dpif-xlate: Do not add more MPLS LSEs than the datapath can handle

2014-01-16 Thread Ben Pfaff
On Fri, Jan 17, 2014 at 09:28:29AM +0900, Simon Horman wrote: > On Thu, Jan 16, 2014 at 04:10:43PM -0800, Ben Pfaff wrote: > > On Wed, Jan 15, 2014 at 04:13:23PM +0900, Simon Horman wrote: > > > This is an proposed enhancement to > > > "Implement OpenFlow support for MPLS, for up to 3 labels." > >

[ovs-dev] [PATCH] odp-util: Report ODP_FIT_TOO_LITTLE when too few MPLS labels are present.

2014-01-16 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- I intend to fold this into "Implement OpenFlow support for MPLS, for up to 3 labels." diff --git a/lib/odp-util.c b/lib/odp-util.c index 520b314..97e681d 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2908,6 +2908,9 @@ parse_l2_5_onward(const struct nlattr *att

Re: [ovs-dev] [PATCH 7/8] ofproto-dpif-xlate: Do not use of more MPLS LSEs than the datapath can supply

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 04:13:24PM +0900, Simon Horman wrote: > This is an proposed enhancement to > "Implement OpenFlow support for MPLS, for up to 3 labels." > > Signed-off-by: Simon Horman > --- > ofproto/ofproto-dpif-xlate.c | 26 +++--- > 1 file changed, 15 insertions(+)

Re: [ovs-dev] [PATCH 6/8] ofproto-dpif-xlate: Do not add more MPLS LSEs than the datapath can handle

2014-01-16 Thread Simon Horman
On Thu, Jan 16, 2014 at 04:10:43PM -0800, Ben Pfaff wrote: > On Wed, Jan 15, 2014 at 04:13:23PM +0900, Simon Horman wrote: > > This is an proposed enhancement to > > "Implement OpenFlow support for MPLS, for up to 3 labels." > > > > This makes the conservative assumption that the datapath should >

Re: [ovs-dev] [PATCH 6/8] ofproto-dpif-xlate: Do not add more MPLS LSEs than the datapath can handle

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 04:13:23PM +0900, Simon Horman wrote: > This is an proposed enhancement to > "Implement OpenFlow support for MPLS, for up to 3 labels." > > This makes the conservative assumption that the datapath should > not be asked to apply MPLS push actions such that the resulting > pa

Re: [ovs-dev] [PATCH v5 3/3] netdev-linux: Read packet auxdata to obtain vlan_tid

2014-01-16 Thread Simon Horman
On Thu, Jan 16, 2014 at 03:09:04PM -0800, Ben Pfaff wrote: > On Wed, Jan 15, 2014 at 05:17:02PM +0900, Simon Horman wrote: > > If VLAN acceleration is used when the kernel receives a packet > > then the outer-most VLAN tag will not be present in the packet > > when it is received by netdev-linux. R

Re: [ovs-dev] [PATCH 4/8] ofproto-dpif: Probe datapath for MPLS stack depth supported

2014-01-16 Thread Simon Horman
On Thu, Jan 16, 2014 at 03:50:31PM -0800, Ben Pfaff wrote: > On Wed, Jan 15, 2014 at 04:13:21PM +0900, Simon Horman wrote: > > This is an proposed enhancement to > > "Implement OpenFlow support for MPLS, for up to 3 labels." > > > > It is in preparation for not adding flows to the datapath > > whi

Re: [ovs-dev] [PATCH 5/8] ofproto-dpif-xlate: Add probed MPLS stack depth of dpif to xbridge

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 04:13:22PM +0900, Simon Horman wrote: > This is an proposed enhancement to > "Implement OpenFlow support for MPLS, for up to 3 labels." > > It is in preparation for not adding flows to the datapath > which have more MPLS LSEs than the datapath supports. > > Signed-off-by:

Re: [ovs-dev] [PATCH 4/8] ofproto-dpif: Probe datapath for MPLS stack depth supported

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 04:13:21PM +0900, Simon Horman wrote: > This is an proposed enhancement to > "Implement OpenFlow support for MPLS, for up to 3 labels." > > It is in preparation for not adding flows to the datapath > which have more MPLS LSEs than the datapath supports. > > Signed-off-by:

Re: [ovs-dev] [PATCH] datapath: Fix kernel panic on ovs_flow_free

2014-01-16 Thread Jesse Gross
On Wed, Jan 15, 2014 at 7:52 PM, Andy Zhou wrote: > Both mega flow mask's reference counter and per flow table mask list > should only be accessed when holding ovs_mutex() lock. However > this is not true with ovs_flow_table_flush(). The patch fixes this bug. > > Reported-by: Joe Stringer > Signe

Re: [ovs-dev] [PATCH 3/8] ofproto-dpif-xlate: Correct out-by one in logging of MPLS action errors

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 04:13:20PM +0900, Simon Horman wrote: > The number of LSEs supported is ARRAY_SIZE(flow->mpls_lse) not > ARRAY_SIZE(flow->mpls_lse) - 1. > > This corrects an inconsistency added my me to > "Implement OpenFlow support for MPLS, for up to 3 labels." > > Signed-off-by: Simon

Re: [ovs-dev] [PATCH 1/8] odp-util: Include '/' before mask when formatting MPLS LSE

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 04:13:18PM +0900, Simon Horman wrote: > This corrects what appears to be a minor error in > "Implement OpenFlow support for MPLS, for up to 3 labels." > > Signed-off-by: Simon Horman Thanks, I'll squash this in. ___ dev mailing

Re: [ovs-dev] [PATCH 2/8] ofproto-dpif: Update tests for masked BoS bit

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 04:13:19PM +0900, Simon Horman wrote: > The BoS bit of each LSE is masked by flow_count_mpls_labels() > > This corrects what appears to be a minor inconsistency in > "Implement OpenFlow support for MPLS, for up to 3 labels." > > Signed-off-by: Simon Horman Thanks, I'll f

Re: [ovs-dev] [PATCH v5 3/3] netdev-linux: Read packet auxdata to obtain vlan_tid

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 05:17:02PM +0900, Simon Horman wrote: > If VLAN acceleration is used when the kernel receives a packet > then the outer-most VLAN tag will not be present in the packet > when it is received by netdev-linux. Rather, it will be present > in auxdata. > > This patch uses recvms

Re: [ovs-dev] ppc build fixed/testsuite results

2014-01-16 Thread Flavio Leitner
On Thu, Jan 16, 2014 at 01:44:39PM -0800, Ben Pfaff wrote: > On Thu, Jan 09, 2014 at 10:40:15PM -0200, Flavio Leitner wrote: > > In order to get the testsuite log, I have tried again and it works now > > commit fd2e50cd24ca18d8186a5c9211aa03c439cf > > Author: James Page > > Date: Thu Dec 5 1

Re: [ovs-dev] [PATCH v5 2/3] lib: Add tpid parameter to eth_push_vlan()

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 05:17:01PM +0900, Simon Horman wrote: > This is in preparation for pushing vlan tags > using the TPID provided by the kernel via auxdata. > > Signed-off-by: Simon Horman Applied, thanks! ___ dev mailing list dev@openvswitch.org

Re: [ovs-dev] [PATCH v5 1/3] netdev_class: Pass a struct ofpbuf * to rx_recv()

2014-01-16 Thread Ben Pfaff
On Wed, Jan 15, 2014 at 05:17:00PM +0900, Simon Horman wrote: > Update the netdev_class so that struct ofpbuf * is passed to rx_recv() > to provide both the data and size of the data to read a packet into. > > On success, update struct ofpbuf size inside netdev_class rx_recv > implementation and r

Re: [ovs-dev] ppc build fixed/testsuite results

2014-01-16 Thread Ben Pfaff
On Thu, Jan 09, 2014 at 10:40:15PM -0200, Flavio Leitner wrote: > In order to get the testsuite log, I have tried again and it works now > commit fd2e50cd24ca18d8186a5c9211aa03c439cf > Author: James Page > Date: Thu Dec 5 17:29:05 2013 + > > Add check for -latomic > > Later

Re: [ovs-dev] [PATCH] tests: Fix path for distcleaning ovs-controller.8

2014-01-16 Thread Ben Pfaff
On Fri, Jan 10, 2014 at 01:45:47PM -0800, Joe Stringer wrote: > Fixes the following error on distcheck:- > > ERROR: files left in build directory after distclean: > ./tests/test-controller.8 > make[1]: *** [distcleancheck] Error 1 > > Signed-off-by: Joe Stringer Applied, thanks. ___

Re: [ovs-dev] [PATCH] ofproto: fix interactions between flow monitors and barriers

2014-01-16 Thread Ben Pfaff
On Wed, Jan 08, 2014 at 07:31:23PM +0900, YAMAMOTO Takashi wrote: > Following OpenFlow 1.4 semantics, make barriers wait for > flow monitor replies. This should fix a race in > "ofproto - flow monitoring pause and resume" test. > > Signed-off-by: YAMAMOTO Takashi Clang says: ../ofproto/con

Re: [ovs-dev] [rwlock 1/5] ofproto-dpif-monitor: Change global rwlock into mutex.

2014-01-16 Thread Ben Pfaff
Thank you. I applied this to master. On Thu, Jan 16, 2014 at 10:28:19AM -0800, Alex Wang wrote: > Looks good to me, thx for the refine. > > > On Thu, Jan 16, 2014 at 10:07 AM, Ben Pfaff wrote: > > > Nothing ever took monitor_rwlock's read lock, so it might as well be a > > mutex. > > > > Sign

Re: [ovs-dev] [PATCH] ofproto-dpif: Add more lock annotations.

2014-01-16 Thread Ben Pfaff
On Thu, Jan 16, 2014 at 08:15:18AM +0900, YAMAMOTO Takashi wrote: > > This annotation would have caught the bug fixed by commit 491a67a0005347130 > > (ofproto-dpif-xlate: Avoid recursive acquisition of xlate_rwlock.). > > looks good to me. > > unless there's a more generic way to detect recursive

[ovs-dev] [PATCH 3/4] lib, ofproto: Add 'back_to_kernel' OpenFlow action

2014-01-16 Thread Chris Luke
This OpenFlow action triggers the 'back_to_kernel' datapath action to ask the datapath to return packets to the kernel. Signed-off-by: Chris Luke --- include/openflow/nicira-ext.h |1 + lib/odp-execute.c |5 - lib/ofp-actions.c | 30 +

[ovs-dev] [PATCH 1/4] datapath: Action for returning packets to the kernel

2014-01-16 Thread Chris Luke
This provides the 'back_to_kernel' datapath action which has one of two effects: - For packets originating from the kernel, sets a flag allowing the kernel hook to return it to the kernel. - For packets that came from userspace, re-inserts the packet into the kernel input queue. Signed-off-by

[ovs-dev] [PATCH 0/4] Adds capability to return packets back to the kernel

2014-01-16 Thread Chris Luke
Jesse, all, This patchset provides a method to return packets to the kernel for handling as though OVS never touched them. To support this, we extend the datapath on kernels since 2.6.39 to be able to pass packets back by providing a 'back_to_kernel' action which causes the network input hook to

[ovs-dev] [PATCH 2/4] datapath: New kernel function to insert packets async

2014-01-16 Thread Chris Luke
If available, use netif_receive_skb_finish() to asynchronously return packets to the network input path after the point where they were handed to us when the flow action is back_to_kernel. Signed-off-by: Chris Luke --- acinclude.m4|3 +++ datapath/vport-netdev.c |6 +- 2

[ovs-dev] [PATCH 4/4] doc: Documentation updates for the back_to_kernel patches

2014-01-16 Thread Chris Luke
Signed-off-by: Chris Luke --- AUTHORS |1 + FAQ | 87 +++ NEWS|2 ++ 3 files changed, 80 insertions(+), 10 deletions(-) diff --git a/AUTHORS b/AUTHORS index 218fe76..1f03203 100644 --- a/AUTHORS +++ b/AUTHORS @@ -21,6

Re: [ovs-dev] [rwlock 1/5] ofproto-dpif-monitor: Change global rwlock into mutex.

2014-01-16 Thread Alex Wang
Looks good to me, thx for the refine. On Thu, Jan 16, 2014 at 10:07 AM, Ben Pfaff wrote: > Nothing ever took monitor_rwlock's read lock, so it might as well be a > mutex. > > Signed-off-by: Ben Pfaff > --- > ofproto/ofproto-dpif-monitor.c | 34 +- > 1 file ch

[ovs-dev] [rwlock 1/5] ofproto-dpif-monitor: Change global rwlock into mutex.

2014-01-16 Thread Ben Pfaff
Nothing ever took monitor_rwlock's read lock, so it might as well be a mutex. Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif-monitor.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ofproto/ofproto-dpif-monitor.c b/ofproto/ofproto-dp

[ovs-dev] [rwlock 3/5] ofproto-dpif-xlate: Avoid recursively taking read side of ofgroup rwlock.

2014-01-16 Thread Ben Pfaff
With glibc, rwlocks by default allow recursive read-locking even if a thread is blocked waiting for the write-lock. POSIX allows such attempts to deadlock, and it appears that the libc used in NetBSD, at least, does deadlock. ofproto-dpif-xlate could take the ofgroup rwlock recursively if an ofgr

[ovs-dev] [rwlock 4/5] ovs-thread: Get rid of obsolete sparse wrappers.

2014-01-16 Thread Ben Pfaff
These were useful back when we were trying to use the sparse lock balance annotations, but we removed those in commit 47b52c71232c0 (sparse: Remove support for thread-safety annotations.) and so they serve no purpose any longer. Signed-off-by: Ben Pfaff --- lib/ovs-thread.h | 11 --- 1

[ovs-dev] [rwlock 5/5] ovs-thread: Use fair (but nonrecursive) rwlocks on glibc.

2014-01-16 Thread Ben Pfaff
glibc supports two kinds of rwlocks: - The default kind of rwlock always allows recursive read-locks to succeed, but threads blocked on acquiring the write-lock are treated unfairly, causing them to be delayed indefinitely as long as new readers continue to come along. -

[ovs-dev] [rwlock 0/5] Do not take rwlocks recursively for read

2014-01-16 Thread Ben Pfaff
POSIX allows taking a rwlock recursively for read to deadlock if there are threads waiting for the write lock. NetBSD does this. glibc gives one a nasty tradeoff: either deadlock on recursive read lock attempts in the presence of a writer, or lose fairness. Since we know that we can't avoid dead

[ovs-dev] [rwlock 2/5] netdev: Change netdev_class_rwlock to recursive mutex, for POSIX safety.

2014-01-16 Thread Ben Pfaff
With glibc, rwlocks by default allow recursive read-locking even if a thread is blocked waiting for the write-lock. POSIX allows such attempts to deadlock, and it appears that the libc used in NetBSD, at least, does deadlock. The netdev_class_rwlock is in fact acquired recursively in this way, wh