Re: [ovs-dev] [PATCH v2 0/3] Initial implementation of OpenFlow 1.4 bundles

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 10:34:08AM +0200, Daniel Baluta wrote: > On Tue, Mar 25, 2014 at 6:39 PM, Alexandru Copot > wrote: > > This series adds the basic communication handlers for the bundles > > functionality. The actual message pre-validation and commits are > > not implemented. > > > > Signed

Re: [ovs-dev] [PATCH] util: xleep for Windows.

2014-03-28 Thread Pravin Shelar
On Fri, Mar 28, 2014 at 3:19 PM, Gurucharan Shetty wrote: > Windows does not have a sleep(seconds). But it does have > a Sleep(milliseconds). Sleep() in windows does not have a > return value. Since we are not using the return value for xsleep() > anywhere as of now, don't return any. > > Introduc

[ovs-dev] [PATCH] util: xleep for Windows.

2014-03-28 Thread Gurucharan Shetty
Windows does not have a sleep(seconds). But it does have a Sleep(milliseconds). Sleep() in windows does not have a return value. Since we are not using the return value for xsleep() anywhere as of now, don't return any. Introduced by commit 275eebb9 (utils: Introduce xsleep for RCU quiescent state

Re: [ovs-dev] [PATCH] datapath: Add support for kernel 3.13

2014-03-28 Thread Jesse Gross
On Thu, Mar 27, 2014 at 11:17 AM, Kyle Mestery wrote: > Add support for building the in-tree kernel datapath for Linux kernel 3.13. > There were some changes in the netlink area which required adding new > compatibility code for this layer. > > Signed-off-by: Kyle Mestery I think we probably als

Re: [ovs-dev] [PATCH] net/openvswitch: Use with RCU_INIT_POINTER(x, NULL) in vport-gre.c

2014-03-28 Thread Jesse Gross
On Sun, Mar 23, 2014 at 12:22 PM, Monam Agarwal wrote: > This patch replaces rcu_assign_pointer(x, NULL) with RCU_INIT_POINTER(x, NULL) > > The rcu_assign_pointer() ensures that the initialization of a structure > is carried out before storing a pointer to that structure. > And in the case of the

Re: [ovs-dev] [PATCH] recirculation: Adjust ovs_key_attr ABI

2014-03-28 Thread Jesse Gross
On Fri, Mar 28, 2014 at 1:42 PM, Andy Zhou wrote: > Jesse helped to clarify how to maintain the ABI. Making the > adjustment accordingly and add some comments. > > Signed-off-by: Andy Zhou Acked-by: Jesse Gross ___ dev mailing list dev@openvswitch.org

Re: [ovs-dev] [PATCH] openvswitch: supply a dummy err_handler of gre_cisco_protocol to prevent kernel crash

2014-03-28 Thread Jesse Gross
On Thu, Mar 27, 2014 at 2:56 PM, Wei Zhang wrote: > diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c > index a3d6951..d64c639 100644 > --- a/net/openvswitch/vport-gre.c > +++ b/net/openvswitch/vport-gre.c > @@ -110,6 +110,12 @@ static int gre_rcv(struct sk_buff *skb, >

Re: [ovs-dev] [PATCH v3 04/10] datapath: Compact sw_flow_key.

2014-03-28 Thread Jesse Gross
On Fri, Mar 28, 2014 at 8:50 AM, Jarno Rajahalme wrote: > >> On Mar 27, 2014, at 3:59 PM, Jesse Gross wrote: >> >>> On Fri, Feb 21, 2014 at 11:41 AM, Jarno Rajahalme >>> wrote: >>> Minimize padding in sw_flow_key and move 'tp' top the main struct. >>> These changes simplify code when accessing

Re: [ovs-dev] [PATCH 2/2] sparse: workaround for a bug in sparse.

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 12:20:00PM -0700, Pritesh Kothari wrote: > sparse emits the following warning: > lib/dpif-netdev.c:1755:15: warning: Initializer entry defined twice > lib/dpif-netdev.c:1755:15: also defined here > due to a bug in sparse which doesn't like inlined functions which > expands

Re: [ovs-dev] hackathon idea list

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 09:24:42PM +0200, Alexandru Copot wrote: > On Wed, Mar 26, 2014 at 7:11 AM, Ben Pfaff wrote: > > > OpenFlow 1.4 Role Status Message > > > > > > OpenFlow 1.4 section 7.4.4 ``Controller Role Status Message'' > > defines a new message sent by

[ovs-dev] [PATCH] recirculation: Adjust ovs_key_attr ABI

2014-03-28 Thread Andy Zhou
Jesse helped to clarify how to maintain the ABI. Making the adjustment accordingly and add some comments. Signed-off-by: Andy Zhou --- include/linux/openvswitch.h |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch

Re: [ovs-dev] [PATCH net v2] openvswitch: fix a possible deadlock and lockdep warning

2014-03-28 Thread David Miller
From: Flavio Leitner Date: Thu, 27 Mar 2014 11:05:34 -0300 > There are two problematic situations. > > A deadlock can happen when is_percpu is false because it can get > interrupted while holding the spinlock. Then it executes > ovs_flow_stats_update() in softirq context which tries to get > the

Re: [ovs-dev] [PATCH net] openvswitch: fix a possible deadlock and lockdep warning

2014-03-28 Thread David Miller
From: Flavio Leitner Date: Thu, 27 Mar 2014 09:53:56 -0300 > There are two problematic situations. > > A deadlock can happen when is_percpu is false because it can get > interrupted while holding the spinlock. Then it executes > ovs_flow_stats_update() in softirq context which tries to get > the

Re: [ovs-dev] [PATCH v5 6/9] datapath: Split ovs_flow_cmd_new_or_set().

2014-03-28 Thread Pravin Shelar
On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme wrote: > Following patch will be easier to reason about with separate > ovs_flow_cmd_new() and ovs_flow_cmd_set() functions. > > Signed-off-by: Jarno Rajahalme > --- > datapath/datapath.c | 160 > +

Re: [ovs-dev] [PATCH v5 8/9] datapath: Minimize ovs_flow_cmd_new|set critical sections.

2014-03-28 Thread Pravin Shelar
On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme wrote: > Signed-off-by: Jarno Rajahalme > --- > v5: Make functionality after ovs_unlock() case specific to make the common > case more optimal. > > datapath/datapath.c | 135 > ++- > 1 file cha

Re: [ovs-dev] [PATCH v5 4/9] datapath: Avoid passing datapath pointer around.

2014-03-28 Thread Pravin Shelar
On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme wrote: > A datapath pointer is available only when holding a lock. Change > ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info() to take a > dp_ifindex directly, rather than a datapath pointer that is then > (only) used to get the dp_ifindex. Th

Re: [ovs-dev] [PATCH v5 2/9] datapath: Make flow mask removal symmetric.

2014-03-28 Thread Pravin Shelar
On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme wrote: > Masks are inserted when flows are inserted to the table, so it is > logical to correspondingly remove masks when flows are removed from > the table, in ovs_flow_table_remove(). > > This allows later patches to relax the locking requirements

Re: [ovs-dev] [PATCH v5 5/9] datapath: Minimize ovs_flow_cmd_del critical section.

2014-03-28 Thread Pravin Shelar
On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme wrote: > ovs_flow_cmd_del() now allocates reply (if needed) after the flow has > already been removed from the flow table. If the reply allocation > fails, a netlink error is signaled with netlink_set_err(), as is > already done in ovs_flow_cmd_new

Re: [ovs-dev] [PATCH v5 6/9] datapath: Split ovs_flow_cmd_new_or_set().

2014-03-28 Thread Jarno Rajahalme
On Mar 28, 2014, at 1:26 PM, Pravin Shelar wrote: > On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme > wrote: >> Following patch will be easier to reason about with separate >> ovs_flow_cmd_new() and ovs_flow_cmd_set() functions. >> >> Signed-off-by: Jarno Rajahalme >> — ... >> -

Re: [ovs-dev] [PATCH v5 7/9] datapath: Take actions directly in ovs_flow_cmd_alloc_info().

2014-03-28 Thread Pravin Shelar
On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme wrote: > ovs_flow_cmd_alloc_info() does not need the flow, but the actions. > Taking actions directly allows further optimization in a subsequent > patch. > This patch would change if you agree with earlier comment. > Signed-off-by: Jarno Rajahalme

Re: [ovs-dev] [PATCH v5 9/9] datapath: Minimize dp and vport critical sections.

2014-03-28 Thread Pravin Shelar
On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme wrote: > Move most memory allocations away from the ovs_mutex critical > sections. vport allocations still happen while the lock is taken, as > changing that would require major refactoring. Also, vports are > created very rarely so it should not m

Re: [ovs-dev] [PATCH v5 3/9] datapath: Clear flow's hlist nodes on removal from table.

2014-03-28 Thread Pravin Shelar
On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme wrote: > This allows hlist_unhashed() to be used to find out if a flow has been > removed from the flow tables. Both nodes need to be checked, though. > I commented on next patch since that patch using this functionality. > Signed-off-by: Jarno Ra

Re: [ovs-dev] [PATCH v5 1/9] datapath: Build flow cmd netlink reply only if needed.

2014-03-28 Thread Pravin Shelar
On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme wrote: > Use netlink_has_listeners() and NLM_F_ECHO flag to determine if a > reply is needed or not for OVS_FLOW_CMD_NEW, OVS_FLOW_CMD_SET, or > OVS_FLOW_CMD_DEL. Currently, OVS userspace does not request a reply > for OVS_FLOW_CMD_NEW, but usually

Re: [ovs-dev] hackathon idea list

2014-03-28 Thread Alexandru Copot
On Wed, Mar 26, 2014 at 7:11 AM, Ben Pfaff wrote: > OpenFlow 1.4 Role Status Message > > > OpenFlow 1.4 section 7.4.4 ``Controller Role Status Message'' > defines a new message sent by a switch to notify the controller that > its role (whether it is a master or a

[ovs-dev] [PATCH 2/2] sparse: workaround for a bug in sparse.

2014-03-28 Thread Pritesh Kothari
sparse emits the following warning: lib/dpif-netdev.c:1755:15: warning: Initializer entry defined twice lib/dpif-netdev.c:1755:15: also defined here due to a bug in sparse which doesn't like inlined functions which expands a #define within it. This commit removes inline to make sparse happy. Sig

[ovs-dev] [PATCH 1/2] sparse: fix the order of include paths to make sparse happy.

2014-03-28 Thread Pritesh Kothari
This fix restores the order of include path such that the local include/ comes before the system /usr/include in the #include path. Thus by making sure that include/linux/types.h and include/linux/openvswitch.h take precedence over the similar files in /usr/include/ directory. Signed-off-by: Prite

Re: [ovs-dev] [hash.h cleanups 1/3] lib/hash.h: fix hash_2words

2014-03-28 Thread Ben Pfaff
On Thu, Mar 27, 2014 at 09:50:35PM -0700, Andy Zhou wrote: > From: Andy Zhou > > Number of bytes in 2 words should be 8, instead of 4 bytes, > to better follow the mhash_finish() API. It is unlikely the fix > will improve the quality of hashing results. > > Signed-off-by: Andy Zhou I doubt it'

Re: [ovs-dev] [PATCH 3/4] unixctl: Add support for Windows.

2014-03-28 Thread Gurucharan Shetty
On Fri, Mar 28, 2014 at 9:58 AM, Ben Pfaff wrote: > On Fri, Mar 28, 2014 at 09:10:45AM -0700, Gurucharan Shetty wrote: >> For Windows, use a kernel assigned localhost TCP port to listen for >> runtime management connections and then write it into a file >> so that a client can read it and then mak

[ovs-dev] utilities/ovs-vlan-bug-workaround obsolete?

2014-03-28 Thread Thomas F Herbert
All, While working on unit tests for qinq patch, I noticed this utility, ovs-vlan-bug-workaround which seems to be compiled but not linked. It is a work around for bugs in earlier upstream kernels in thehandling vlan tag offloading (HW_ACCEL) that caused 802.1q single tagged vlans to break.

Re: [ovs-dev] [PATCH v4 2/2] ovs-vsctl: Improve error reporting

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 10:49:29AM +0100, Thomas Graf wrote: > Obviously we don't want to change behaviour of ovs-vsctl show in > terms of exit code. So how about a new command 'ovs-vsctl status' > which acts as a dashboard. It would be based on 'show' but without > port options to keep it simple.

Re: [ovs-dev] [PATCH 2/4] stream-tcp: Use closesocket instead of close for sockets.

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 09:10:44AM -0700, Gurucharan Shetty wrote: > We should use closesocket() while closing sockets so that > closing sockets work fine on both POSIX and Windows. > (In POSIX, we #define closesocket close) > > Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff _

Re: [ovs-dev] [PATCH v4 2/2] ovs-vsctl: Improve error reporting

2014-03-28 Thread Ben Pfaff
Great. Thanks Andy and Thomas, I applied these two patches to master. I added a NEWS item: - ovs-vsctl now reports when ovs-vswitchd fails to create a new port or bridge. On Fri, Mar 28, 2014 at 12:13:45AM -0700, Andy Zhou wrote: > Not sure if I suppose to ack this patch since I am one

Re: [ovs-dev] [PATCH 4/4] ovs-appctl: A port for Windows.

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 09:10:46AM -0700, Gurucharan Shetty wrote: > Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH 3/4] unixctl: Add support for Windows.

2014-03-28 Thread Gurucharan Shetty
For Windows, use a kernel assigned localhost TCP port to listen for runtime management connections and then write it into a file so that a client can read it and then make a TCP connection. Since we do not have the infrastructure to create pidfiles on windows as of now, we create the *.ctl file wi

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Fix a race.

2014-03-28 Thread Alex Wang
Got reviewed by Ethan offline, so pushed to master, On Tue, Mar 25, 2014 at 3:18 PM, Alex Wang wrote: > Hey Ben, > > Could you review this? > > Thanks, > Alex Wang, > > > On Tue, Mar 25, 2014 at 2:24 PM, Alex Wang wrote: > >> Commit 61057e884ca9c(ofproto-dpif-upcall: Slightly simplify >> udpif

Re: [ovs-dev] [ovs-discuss] Hackaton follow-up: DPI engine integration proposal

2014-03-28 Thread Justin Pettit
Franck BAUDIN wrote: - It requires OVS to link against the library. We don't want to link against third-party libraries, and I don't think this will work for most distributions anyway, unless you're planning to upstream a library to the various Linux distributions. The DPI library itsel

Re: [ovs-dev] [PATCH 3/4] unixctl: Add support for Windows.

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 09:10:45AM -0700, Gurucharan Shetty wrote: > For Windows, use a kernel assigned localhost TCP port to listen for > runtime management connections and then write it into a file > so that a client can read it and then make a TCP connection. > > Since we do not have the infras

Re: [ovs-dev] Documentation

2014-03-28 Thread Gurucharan Shetty
On Thu, Mar 27, 2014 at 10:41 PM, Neelakantam Gaddam wrote: > Hi All, > > Are there any design/implementation guide available for openvswitch > userspace and kernel space components ? Most of the documentation is in the header files (i.e *.h files). There are some files like PORTING, DESIGN data

Re: [ovs-dev] utilities/ovs-vlan-bug-workaround obsolete?

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 12:16:29PM -0400, Thomas F Herbert wrote: > While working on unit tests for qinq patch, I noticed this utility, > ovs-vlan-bug-workaround which seems to be compiled but not linked. > It is a work around for bugs in earlier upstream kernels in > thehandling vlan tag offloadin

Re: [ovs-dev] [PATCH v3] ovs-vsctl: Improve error reporting

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 12:28:58AM -0700, Andy Zhou wrote: > On Thu, Mar 27, 2014 at 8:29 PM, Ben Pfaff wrote: > > I don't think it's a good idea to actually exit with an error code, > > because it's a change in behavior that could break scripts. For > > example, I bet that some people use "ovs-v

Re: [ovs-dev] [PATCH v3 04/10] datapath: Compact sw_flow_key.

2014-03-28 Thread Jarno Rajahalme
> On Mar 27, 2014, at 3:59 PM, Jesse Gross wrote: > >> On Fri, Feb 21, 2014 at 11:41 AM, Jarno Rajahalme >> wrote: >> Minimize padding in sw_flow_key and move 'tp' top the main struct. >> These changes simplify code when accessing the transport port numbers >> and the tcp flags, and makes the

Re: [ovs-dev] [PATCH 1/4] ovs-appctl: Close the connection gracefully during error.

2014-03-28 Thread Ben Pfaff
On Fri, Mar 28, 2014 at 09:10:43AM -0700, Gurucharan Shetty wrote: > When we send a wrong command to a Open vSwitch daemon, it returns > an error. In that case, we should gracefully close the connection > to the daemon. > > Signed-off-by: Gurucharan Shetty At root, I don't think this does anythi

[ovs-dev] [PATCH 2/4] stream-tcp: Use closesocket instead of close for sockets.

2014-03-28 Thread Gurucharan Shetty
We should use closesocket() while closing sockets so that closing sockets work fine on both POSIX and Windows. (In POSIX, we #define closesocket close) Signed-off-by: Gurucharan Shetty --- lib/stream-tcp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stream-tcp.c b/

[ovs-dev] [PATCH 4/4] ovs-appctl: A port for Windows.

2014-03-28 Thread Gurucharan Shetty
Signed-off-by: Gurucharan Shetty --- BUILD.Windows |3 ++- utilities/ovs-appctl.8.in |9 + utilities/ovs-appctl.c|7 +++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/BUILD.Windows b/BUILD.Windows index 119334b..227822f 100644 --- a/BUILD.W

[ovs-dev] [PATCH 1/4] ovs-appctl: Close the connection gracefully during error.

2014-03-28 Thread Gurucharan Shetty
When we send a wrong command to a Open vSwitch daemon, it returns an error. In that case, we should gracefully close the connection to the daemon. Signed-off-by: Gurucharan Shetty --- utilities/ovs-appctl.c |1 + 1 file changed, 1 insertion(+) diff --git a/utilities/ovs-appctl.c b/utilities

Re: [ovs-dev] [hash.h cleanups 2/3] lib/hash.h: add hash_uint64()

2014-03-28 Thread Ben Pfaff
On Thu, Mar 27, 2014 at 09:50:36PM -0700, Andy Zhou wrote: > From: Andy Zhou > > Add hash_uint64() and apply it when appropriate. > > Signed-off-by: Andy Zhou I don't think the casts in hash_uint64() are necessary, but they don't hurt. Acked-by: Ben Pfaff

Re: [ovs-dev] [RFC 8/9] revalidator: Only revalidate high-throughput flows.

2014-03-28 Thread Jarno Rajahalme
> On Mar 17, 2014, at 6:57 PM, Joe Stringer wrote: > >> On Fri, Mar 7, 2014 at 2:45 PM, Ethan Jackson wrote: >> I'm surprised its only 10%, do you have a sense of why? Perhaps when >> running TCP_CRR we delete the flow the first time we see it, and we >> need to do xlate_actions() to generate

Re: [ovs-dev] [hash.h cleanups 3/3] lib/packet.h: add hash_mac()

2014-03-28 Thread Ben Pfaff
On Thu, Mar 27, 2014 at 09:50:37PM -0700, Andy Zhou wrote: > From: Andy Zhou > > Add hash_mac() and apply it when appropriate. > > Signed-off-by: Andy Zhou Same comment as previous patch, but for hash_uint64_basis(). Acked-by: Ben Pfaff ___ dev mai

Re: [ovs-dev] [PATCH v4 2/2] ovs-vsctl: Improve error reporting

2014-03-28 Thread Thomas Graf
On 03/28/2014 05:02 AM, Ben Pfaff wrote: From: Andy Zhou ovs-vsctl is a command-line interface to the Open vSwitch database, and as such it just modifies the desired Open vSwitch configuration in the database. ovs-vswitchd, on the other hand, monitors the database and implements the actual con

Re: [ovs-dev] [PATCH v2 0/3] Initial implementation of OpenFlow 1.4 bundles

2014-03-28 Thread Daniel Baluta
On Tue, Mar 25, 2014 at 6:39 PM, Alexandru Copot wrote: > 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 We found some bugs in this pat

Re: [ovs-dev] [PATCH v3] ovs-vsctl: Improve error reporting

2014-03-28 Thread Andy Zhou
On Thu, Mar 27, 2014 at 8:29 PM, Ben Pfaff wrote: > On Thu, Mar 27, 2014 at 05:10:31PM +0100, Thomas Graf wrote: >> From: Andy Zhou >> >> ovs-vsctl is a command-line interface to the Open vSwitch database, >> and as such it just modifies the desired Open vSwitch configuration in >> the database.

Re: [ovs-dev] [PATCH v4 2/2] ovs-vsctl: Improve error reporting

2014-03-28 Thread Andy Zhou
Not sure if I suppose to ack this patch since I am one of authors. I did review v4 in detail and tested it . Just in case it is useful, here is my ack. Acked-by: Andy Zhou On Thu, Mar 27, 2014 at 9:02 PM, Ben Pfaff wrote: > From: Andy Zhou > > ovs-vsctl is a command-line interface to the Op

Re: [ovs-dev] [PATCH v4 1/2] ovsdb-idlc: Generate new *_get_for_uuid() functions.

2014-03-28 Thread Andy Zhou
I don't know the exact syntex and semitics of this file, but judging from the fact the 2nd patch compiles and works -- I have tested, these changes must be fine. Acked-by: Andy Zhou On Thu, Mar 27, 2014 at 9:02 PM, Ben Pfaff wrote: > This allows a client to obtain the IDL version of a row given