Re: [ovs-dev] [RFC v2] datapath/flow_netlink: Create right mask with disabled megaflows

2014-07-10 Thread Joe Stringer
On 11 July 2014 11:29, Daniele Di Proietto wrote: > -static void sw_flow_mask_set(struct sw_flow_mask *mask, > -struct sw_flow_key_range *range, u8 val) > +/* We expect the nlattr stream to be already validated */ > +static int nlattr_set(struct nlattr *attr, u8 val,

[ovs-dev] [PATCH 14/14] Add sockaddr_nl back to netlink-protocol.h

2014-07-10 Thread Alin Serdean
Add the structure sockaddr_nl to netlink-protocol.h for MSVC. Also remove some warnings in netlink-socket.c when using MSVC. Signed-off-by: Alin Gabriel Serdean --- lib/netlink-protocol.h | 10 ++ lib/netlink-socket.c | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff -

[ovs-dev] [PATCH 13/14] Modify and add headers needed for compile

2014-07-10 Thread Alin Serdean
Add headers structures, typedefs and defines needed to compile the files lib/dpif-linux.c, lib/dpif.c, lib/netdev-linux.c, lib/netdev.c, lib/netlink-socket.c, lib/netlink.c and lib/vlandev.c. Signed-off-by: Alin Gabriel Serdean --- include/windows/linux/ethtool.h| 100 include/w

[ovs-dev] [PATCH 11/14] Changes needed for netlink-socket.c

2014-07-10 Thread Alin Serdean
Adding CreateFile, WriteFile, ReadFile and CloseHandle instead of linux counterparts when compiling netlink-socket.c with MSVC. Also add socket pid generation function that will later on will be needed in the kernel extension. Signed-off-by: Alin Gabriel Serdean --- lib/netlink-socket.c | 149 ++

[ovs-dev] [PATCH 12/14] Add new headers to noinst_HEADERS

2014-07-10 Thread Alin Serdean
Add the newly created headers in include/windows/* to include/windows/automake.mk. Signed-off-by: Alin Gabriel Serdean --- include/windows/automake.mk | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/windows/automake.mk b/include/windows/automake.mk index 4d5a42c..464

[ovs-dev] [PATCH 10/14] Ignore padding when compiling with MSVC

2014-07-10 Thread Alin Serdean
Change the size of the padding to 0 in the function nl_msg_put_uninit. Signed-off-by: Alin Gabriel Serdean --- lib/netlink.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/netlink.c b/lib/netlink.c index c08a557..17a8885 100644 --- a/lib/netlink.c +++ b/lib/netlink.c @@ -174,7 +174,

[ovs-dev] [PATCH 09/14] Allow compile when compiling with MSVC

2014-07-10 Thread Alin Serdean
Ignore HAVE_NETLINK macro when compiling with MSVC this will allow the inclusion of the netlink-socket.h. Signed-off-by: Alin Gabriel Serdean --- lib/netlink-socket.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/netlink-socket.h b/lib/netlink-socket.h index 8ac201a..2b28131 100644 -

[ovs-dev] [PATCH 08/14] Ignore aligned cast and drains on MSVC

2014-07-10 Thread Alin Serdean
Bypass ALIGNED_CAST on CMSG_DATA when compiling on MSVC. Ignore the code behind netdev_linux_rxq_drain as well. Signed-off-by: Alin Gabriel Serdean --- lib/netdev-linux.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 1780639..1b2196f 100644

[ovs-dev] [PATCH 06/14] Remove netlink padding for MSVC

2014-07-10 Thread Alin Serdean
Change the defines NLMSG_ALIGNTO and NLA_ALIGNTO defines to 0. Change the macros NLA_ALIGN and NLMSG_ALIGN to SIZE. Signed-off-by: Alin Gabriel Serdean --- lib/netlink-protocol.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/lib/netlink-protocol.h b/lib/netlink-protocol.h ind

[ovs-dev] [PATCH 07/14] Initialize vlandev_linux_class for MSVC as well

2014-07-10 Thread Alin Serdean
Change the vlandev_get_class to vlandev_linux_class instead of vlandev_stub_class when compiling with MSVC. This will allow the code behind dpifnetdev-linuxlinux interface to run. Signed-off-by: Alin Gabriel Serdean --- lib/vlandev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

[ovs-dev] [PATCH 05/14] Initialize linux netdev class for MSVC as well

2014-07-10 Thread Alin Serdean
Do not bypass the register of the netdev_linux_class, netdev_internal_class, netdev_tap_class and netdev_vport_tunnel_register when compiling with MSVC. This will allow the code behind netdev-linux interface to run. Signed-off-by: Alin Gabriel Serdean --- lib/netdev.c | 2 +- 1 file changed, 1

[ovs-dev] [PATCH 04/14] Initialize dpif_linux_class for MSVC as well

2014-07-10 Thread Alin Serdean
Do not bypass dpif_linux_class for the creation of dpif_class when compiling with MSVC. This will allow the code behind dpif-linux interface to run. Signed-off-by: Alin Gabriel Serdean --- lib/dpif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dpif.c b/lib/dpif.c inde

[ovs-dev] [PATCH 03/14] Ignore epoll specific functions in case of MSVC

2014-07-10 Thread Alin Serdean
Bypass epoll_ctl, epoll_create and epoll_wait functions on MSVC. Signed-off-by: Alin Gabriel Serdean --- lib/dpif-linux.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index bc284ab..7cf6eff 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-

[ovs-dev] [PATCH 02/14] Changes to lib/automake.mk

2014-07-10 Thread Alin Serdean
Add the NETLINK and DPIF objects to the openvswitch archive for windows. Signed-off-by: Alin Gabriel Serdean --- lib/automake.mk | 17 + 1 file changed, 17 insertions(+) diff --git a/lib/automake.mk b/lib/automake.mk index 0997df5..d93e9af 100644 --- a/lib/automake.mk +++ b/lib

[ovs-dev] [PATCH 01/14] Add to changes lib/netlink.h

2014-07-10 Thread Alin Serdean
Add NETLINK defines for MSVC compiling Signed-off-by: Alin Gabriel Serdean --- lib/netlink.h | 32 1 file changed, 32 insertions(+) diff --git a/lib/netlink.h b/lib/netlink.h index f9234da..c46a5d0 100644 --- a/lib/netlink.h +++ b/lib/netlink.h @@ -214,4 +214,3

Re: [ovs-dev] [RFC v2] datapath/flow_netlink: Create right mask with disabled megaflows

2014-07-10 Thread Pravin Shelar
On Thu, Jul 10, 2014 at 4:29 PM, Daniele Di Proietto wrote: > If megaflows are disabled, the userspace does not send the netlink attribute > OVS_FLOW_ATTR_MASK, and the kernel must create an exact match mask. > > sw_flow_mask_set() sets every bytes (in 'range') of the mask to 0xff, even the > byte

Re: [ovs-dev] [PATCH v2] datapath: Enable tunnel GSO features.

2014-07-10 Thread Andy Zhou
The logic looks good. Patchcheck returns some warnings that may be nice to fix up. Otherwise, Acked-by: Andy Zhou WARNING: LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged #29: FILE: datapath/linux/compat/include/linux/netdev_features.h:12: +#if LINUX_

Re: [ovs-dev] [PATCH] netlink-socket: Work around kernel Netlink dump thread races.

2014-07-10 Thread Ben Pfaff
Thanks, applied to all relevant branches. On Thu, Jul 10, 2014 at 04:42:31PM -0700, Alex Wang wrote: > Thx for the explanation, looks good to me, > > And confirm that it solve the pkt duplication issue, > > Acked-by: Alex Wang > > > On Thu, Jul 10, 2014 at 4:03 PM, Ben Pfaff wrote: > > > Th

Re: [ovs-dev] [PATCH] netlink-socket: Work around kernel Netlink dump thread races.

2014-07-10 Thread Alex Wang
Thx for the explanation, looks good to me, And confirm that it solve the pkt duplication issue, Acked-by: Alex Wang On Thu, Jul 10, 2014 at 4:03 PM, Ben Pfaff wrote: > The Linux kernel Netlink implementation has two races that cause problems > for processes that attempt to dump a table in a

[ovs-dev] [RFC v2] datapath/flow_netlink: Create right mask with disabled megaflows

2014-07-10 Thread Daniele Di Proietto
If megaflows are disabled, the userspace does not send the netlink attribute OVS_FLOW_ATTR_MASK, and the kernel must create an exact match mask. sw_flow_mask_set() sets every bytes (in 'range') of the mask to 0xff, even the bytes that represent padding for struct sw_flow, or the bytes that represe

Re: [ovs-dev] [RFC] datapath/flow_netlink: Create right mask with disabled megaflows

2014-07-10 Thread Daniele Di Proietto
Thanks for the review, I’ve fixed the two memory leaks and expanded the comment. I’m about to post a v2. Let mw know if you think the patch could be improved further. Daniele On Jul 10, 2014, at 3:27 PM, Pravin Shelar wrote: > On Wed, Jul 9, 2014 at 3:30 PM, Daniele Di Proietto > wrote: >> I

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-10 Thread Joe Stringer
On 11 July 2014 04:53, Flavio Leitner wrote: > Can we push the cache construction to later that it doesn't impact > either flow setup or flow dump? I.e. like a workqueue? I don't know > if we have such facility. I'm open to the idea, but completely unfamiliar with how these work. I can take a l

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-10 Thread Joe Stringer
Thanks for the review, On 10 July 2014 21:13, Thomas Graf wrote: > If I understand the code correctly the gain is only visible on > consecutive dumps of the same flow. How about constructing the cache > when you require it for the first time? That avoids the cost on flow > setup. Correct. My m

[ovs-dev] [PATCH] netlink-socket: Work around kernel Netlink dump thread races.

2014-07-10 Thread Ben Pfaff
The Linux kernel Netlink implementation has two races that cause problems for processes that attempt to dump a table in a multithreaded manner. The first race is in the structure of the kernel netlink_recv() function. This function pulls a message from the socket queue and, if there is none, repor

Re: [ovs-dev] [PATCH] tests: Disable glibc memory checking under glibc <= 2.11.

2014-07-10 Thread Gurucharan Shetty
On Thu, Jul 10, 2014 at 2:37 PM, Ben Pfaff wrote: > On Thu, Jul 10, 2014 at 02:32:56PM -0700, Gurucharan Shetty wrote: >> On Wed, Jul 9, 2014 at 3:45 PM, Ben Pfaff wrote: >> > We noticed that the unit tests sometimes fail on XenServer inside glibc's >> > memory checker, in the free_check() functi

Re: [ovs-dev] [RFC] datapath/flow_netlink: Create right mask with disabled megaflows

2014-07-10 Thread Pravin Shelar
On Wed, Jul 9, 2014 at 3:30 PM, Daniele Di Proietto wrote: > If megaflows are disabled, the userspace does not send the netlink attribute > OVS_FLOW_ATTR_MASK, and the kernel must create an exact match mask. > > sw_flow_mask_set() sets every bytes (in 'range') of the mask to 0xff, even the > bytes

Re: [ovs-dev] [PATCH] netlink-socket: Fix sign of error code.

2014-07-10 Thread Alex Wang
LGTM, Acked-by: Alex Wang On Thu, Jul 10, 2014 at 2:46 PM, Ben Pfaff wrote: > Commit 8f20fd98db (netlink-socket: Work around upstream kernel Netlink > bug.) got the sign of the error code wrong, so that it reported e.g. -22 > for EINVAL to nl_sock_recv__()'s caller, instead of 22. > > Signed-o

Re: [ovs-dev] [PATCH 3/3] datapath: refactor do_output() to move skb_clone NULL check out of fast path

2014-07-10 Thread Andy Zhou
Thanks Pravin for the review. I have pushed all 3 patches with the suggested changes. Also merged the first patch into branch 2.3. On Thu, Jul 10, 2014 at 2:04 PM, Pravin Shelar wrote: > On Thu, Jul 10, 2014 at 1:16 AM, Andy Zhou wrote: >> skb_clone() NULL check is implemented in do_output(), as

[ovs-dev] [PATCH] netlink-socket: Fix sign of error code.

2014-07-10 Thread Ben Pfaff
Commit 8f20fd98db (netlink-socket: Work around upstream kernel Netlink bug.) got the sign of the error code wrong, so that it reported e.g. -22 for EINVAL to nl_sock_recv__()'s caller, instead of 22. Signed-off-by: Ben Pfaff --- lib/netlink-socket.c |2 +- 1 file changed, 1 insertion(+), 1 d

Re: [ovs-dev] [PATCH] tests: Disable glibc memory checking under glibc <= 2.11.

2014-07-10 Thread Gurucharan Shetty
On Thu, Jul 10, 2014 at 2:36 PM, Ben Pfaff wrote: > On Thu, Jul 10, 2014 at 02:01:27PM -0700, Gurucharan Shetty wrote: >> On Wed, Jul 9, 2014 at 3:45 PM, Ben Pfaff wrote: >> > We noticed that the unit tests sometimes fail on XenServer inside glibc's >> > memory checker, in the free_check() functi

Re: [ovs-dev] [PATCH] tests: Disable glibc memory checking under glibc <= 2.11.

2014-07-10 Thread Ben Pfaff
On Thu, Jul 10, 2014 at 02:32:56PM -0700, Gurucharan Shetty wrote: > On Wed, Jul 9, 2014 at 3:45 PM, Ben Pfaff wrote: > > We noticed that the unit tests sometimes fail on XenServer inside glibc's > > memory checker, in the free_check() function. It turns out that the > > glibc memory checker in g

Re: [ovs-dev] [RFC] Make openvswitch start before networking.

2014-07-10 Thread Gurucharan Shetty
>> > What about when the controller is on network? You have to have that up >> > (networking-wise) before bring up the bridge, right? >> Can you elaborate with an example? >> >> I don't know of a use case yet where the controller wants to control a >> OVS bridge that is also responsible for SSH (or

Re: [ovs-dev] [PATCH] tests: Disable glibc memory checking under glibc <= 2.11.

2014-07-10 Thread Ben Pfaff
On Thu, Jul 10, 2014 at 02:01:27PM -0700, Gurucharan Shetty wrote: > On Wed, Jul 9, 2014 at 3:45 PM, Ben Pfaff wrote: > > We noticed that the unit tests sometimes fail on XenServer inside glibc's > > memory checker, in the free_check() function. It turns out that the > > glibc memory checker in g

Re: [ovs-dev] [PATCH] tests: Disable glibc memory checking under glibc <= 2.11.

2014-07-10 Thread Gurucharan Shetty
On Wed, Jul 9, 2014 at 3:45 PM, Ben Pfaff wrote: > We noticed that the unit tests sometimes fail on XenServer inside glibc's > memory checker, in the free_check() function. It turns out that the > glibc memory checker in glibc 2.11 and earlier had an internal race that > caused false positives in

Re: [ovs-dev] [RFC] Make openvswitch start before networking.

2014-07-10 Thread Flavio Leitner
On Thu, Jul 10, 2014 at 01:51:48PM -0700, Gurucharan Shetty wrote: > >> AFAIK, the reason we cannot start openvswitch before networking is > >> because we have all OVS binaries in /usr and that can be mounted > >> through NFS (which depends on networking). If I remember correctly, > >> the only rea

Re: [ovs-dev] [PATCH 3/3] datapath: refactor do_output() to move skb_clone NULL check out of fast path

2014-07-10 Thread Pravin Shelar
On Thu, Jul 10, 2014 at 1:16 AM, Andy Zhou wrote: > skb_clone() NULL check is implemented in do_output(), as past of the > common (fast) path. Refactoring so that NULL check is done in the > slow path, immediately after skb_clone() is called. > > Besides optimization, this change also improves cod

Re: [ovs-dev] [PATCH 2/3] datapath: add skb_clone NULL check for the sampling action.

2014-07-10 Thread Pravin Shelar
On Thu, Jul 10, 2014 at 1:16 AM, Andy Zhou wrote: > Fix a bug where skb_clone() NULL check is missing in sample action > implementation. > > Signed-off-by: Andy Zhou > --- > datapath/actions.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/datapath/actions.c b/datapath/actions.c > in

Re: [ovs-dev] [PATCH 1/3] datapath: add skb_clone NULL check in the recirc action.

2014-07-10 Thread Pravin Shelar
On Thu, Jul 10, 2014 at 1:16 AM, Andy Zhou wrote: > Refactoring recirc action implementation. > > The main change is to fix a bug where the NULL check after skb clone() > call is missing. The fix is to return -ENOMEM whenever skb_clone() > failed to create a clone. > > Also rearranged adjacent co

Re: [ovs-dev] [PATCH] tests: Disable glibc memory checking under glibc <= 2.11.

2014-07-10 Thread Gurucharan Shetty
On Wed, Jul 9, 2014 at 3:45 PM, Ben Pfaff wrote: > We noticed that the unit tests sometimes fail on XenServer inside glibc's > memory checker, in the free_check() function. It turns out that the > glibc memory checker in glibc 2.11 and earlier had an internal race that > caused false positives in

Re: [ovs-dev] [RFC] Provide shared library for simple actions

2014-07-10 Thread Ben Pfaff
On Thu, Jul 10, 2014 at 05:57:03PM -0300, Flavio Leitner wrote: > It seems that the best way to create/destroy bridges or add/remove > ports is using OVSDB protocol, but as far as I know there is no > shared library yet for that. > > Since libvirt, NetworkManager and perhaps other components need

[ovs-dev] [RFC] Provide shared library for simple actions

2014-07-10 Thread Flavio Leitner
Hi, I've heard the same questions regarding to library/interface to use to manage Open vSwitch bridges from different groups. It seems that the best way to create/destroy bridges or add/remove ports is using OVSDB protocol, but as far as I know there is no shared library yet for that. Since lib

Re: [ovs-dev] [RFC] Make openvswitch start before networking.

2014-07-10 Thread Gurucharan Shetty
> >> AFAIK, the reason we cannot start openvswitch before networking is >> because we have all OVS binaries in /usr and that can be mounted >> through NFS (which depends on networking). If I remember correctly, >> the only reason not to have OVS binaries in /bin and /sbin is that we >> consider it

Re: [ovs-dev] [PATCH] netlink-protocol: Remove definition of struct sockaddr_nl.

2014-07-10 Thread Ben Pfaff
On Thu, Jul 10, 2014 at 01:15:30PM -0700, Gurucharan Shetty wrote: > On Thu, Jul 10, 2014 at 11:13 AM, Ben Pfaff wrote: > > This struct is used only in netlink-socket.c, which is only used on Linux, > > which in turn gets the definition from . On Windows the > > definition actually causes a small

Re: [ovs-dev] [PATCH] netlink-protocol: Remove definition of struct sockaddr_nl.

2014-07-10 Thread Gurucharan Shetty
On Thu, Jul 10, 2014 at 11:13 AM, Ben Pfaff wrote: > This struct is used only in netlink-socket.c, which is only used on Linux, > which in turn gets the definition from . On Windows the > definition actually causes a small amount of trouble because Windows does > not define sa_family_t (despite P

Re: [ovs-dev] [PATCH] datapath/flow_netlink: Fix NDP flow mask validation

2014-07-10 Thread Pravin Shelar
On Thu, Jul 10, 2014 at 9:32 AM, Daniele Di Proietto wrote: > On Jul 10, 2014, at 2:40 AM, Thomas Graf wrote: > >> On 07/09/14 at 03:22pm, Daniele Di Proietto wrote: >>> match_validate() enforce that a mask matching on NDP attributes has also an >>> exact match on ICMPv6 type. >>> The ICMPv6 type

Re: [ovs-dev] [PATCH] tests: Report core dumps during tests as failures.

2014-07-10 Thread Jarno Rajahalme
On Jul 10, 2014, at 11:39 AM, Ben Pfaff wrote: > On Mon, Jun 09, 2014 at 11:13:52AM -0700, Ben Pfaff wrote: >> On Thu, May 29, 2014 at 05:16:09PM -0700, Jarno Rajahalme wrote: >>> (snip) >>> I made a deliberate core-producing error to test this out. As a result I >>> have three core files: >>>

Re: [ovs-dev] [PATCH] tests: Report core dumps during tests as failures.

2014-07-10 Thread Ben Pfaff
On Mon, Jun 09, 2014 at 11:13:52AM -0700, Ben Pfaff wrote: > On Thu, May 29, 2014 at 05:16:09PM -0700, Jarno Rajahalme wrote: > > On May 29, 2014, at 3:06 PM, Ben Pfaff wrote: > > > > > Jarno, you might want to take a look at this, since it is a simple > > > patch that improves the test cases in

Re: [ovs-dev] [PATCHv2] daemon: restart child process if it died before signaling its readiness

2014-07-10 Thread Ansis Atteka
On Thu, Jul 10, 2014 at 10:39 AM, Ben Pfaff wrote: > On Mon, Jul 07, 2014 at 05:38:47PM -0700, Ansis Atteka wrote: >> The child process (the one being monitored) could die before it was able >> to call fork_notify_startup() function. If such situation arises, then >> parent process (the one monit

Re: [ovs-dev] [PATCH 3/4] dpif-windows: Implement datapath interface for windows.

2014-07-10 Thread Ben Pfaff
On Wed, Jun 25, 2014 at 4:54 PM, Ben Pfaff wrote: > It looks like datapath-windows/include/OvsNetlink.h is cut-and-pasted > from other OVS header files, especially lib/netlink-protocol.h, > lib/netlink.h, and lib/util.h. Is it possible to reduce the amount of > code duplication? Either way, the

[ovs-dev] [PATCH] netlink-protocol: Remove definition of struct sockaddr_nl.

2014-07-10 Thread Ben Pfaff
This struct is used only in netlink-socket.c, which is only used on Linux, which in turn gets the definition from . On Windows the definition actually causes a small amount of trouble because Windows does not define sa_family_t (despite POSIX), so it's better to remove it. Even if other platforms

Re: [ovs-dev] [RFC] Make openvswitch start before networking.

2014-07-10 Thread Flavio Leitner
On Thu, Jul 10, 2014 at 08:12:01AM -0700, Gurucharan Shetty wrote: > One of the problems we have right now is that openvswitch starts after > networking. Many other packages depend on networking. If we create OVS > bridges with IP addresses, then the scripts that start immediately > after networkin

Re: [ovs-dev] [PATCHv2] daemon: restart child process if it died before signaling its readiness

2014-07-10 Thread Ben Pfaff
On Mon, Jul 07, 2014 at 05:38:47PM -0700, Ansis Atteka wrote: > The child process (the one being monitored) could die before it was able > to call fork_notify_startup() function. If such situation arises, then > parent process (the one monitoring child process) would also terminate > with a fatal

Re: [ovs-dev] LAG support in OVS

2014-07-10 Thread Raghu Gangi
Hi All, I would like to propose and discuss the bond implementation in OpenVSwitch using Group tables below: Design for Bond implementation in OVS: Existing implementation (based on OpenFlow 1.0): 1. Creation of bond interface in OVS is done using add-bond command * ovs-vsctl add-bond br0 bond

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-10 Thread Flavio Leitner
On Thu, Jul 10, 2014 at 11:13:33AM +0200, Thomas Graf wrote: > On 07/10/14 at 05:29pm, Joe Stringer wrote: > > Converting the flow key and mask back into netlink format during flow > > dump is fairly expensive. By caching the netlink versions of these > > during flow setup, and copying the memory d

Re: [ovs-dev] [RFC 1/2] datapath: Refactor ovs_flow_cmd_fill_info().

2014-07-10 Thread Flavio Leitner
On Thu, Jul 10, 2014 at 05:29:27PM +1200, Joe Stringer wrote: > Split up ovs_flow_cmd_fill_info() to make it easier to cache parts of a > dump reply. This will be used to streamline flow_dump in the next patch. This is a nice refactoring and IMO it could be applied even if the second patch is not

Re: [ovs-dev] [PATCH] datapath/flow_netlink: Fix NDP flow mask validation

2014-07-10 Thread Daniele Di Proietto
On Jul 10, 2014, at 2:40 AM, Thomas Graf wrote: > On 07/09/14 at 03:22pm, Daniele Di Proietto wrote: >> match_validate() enforce that a mask matching on NDP attributes has also an >> exact match on ICMPv6 type. >> The ICMPv6 type, which is 8-bit wide, is stored in the 'tp.src' field of >> 'struct

[ovs-dev] [RFC] Make openvswitch start before networking.

2014-07-10 Thread Gurucharan Shetty
One of the problems we have right now is that openvswitch starts after networking. Many other packages depend on networking. If we create OVS bridges with IP addresses, then the scripts that start immediately after networking and before openvswitch can have failures. I see quite a few bug reports t

Re: [ovs-dev] [PATCH] datapath/flow_netlink: Fix NDP flow mask validation

2014-07-10 Thread Thomas Graf
On 07/09/14 at 03:22pm, Daniele Di Proietto wrote: > match_validate() enforce that a mask matching on NDP attributes has also an > exact match on ICMPv6 type. > The ICMPv6 type, which is 8-bit wide, is stored in the 'tp.src' field of > 'struct sw_flow_key', which is 16-bit wide. > Therefore, an exa

Re: [ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

2014-07-10 Thread Thomas Graf
On 07/10/14 at 05:29pm, Joe Stringer wrote: > Converting the flow key and mask back into netlink format during flow > dump is fairly expensive. By caching the netlink versions of these > during flow setup, and copying the memory directly during flow dump, we > are able to support up to 33% more flo

Re: [ovs-dev] [RFC 1/2] datapath: Refactor ovs_flow_cmd_fill_info().

2014-07-10 Thread Thomas Graf
On 07/10/14 at 05:29pm, Joe Stringer wrote: > Split up ovs_flow_cmd_fill_info() to make it easier to cache parts of a > dump reply. This will be used to streamline flow_dump in the next patch. > > Signed-off-by: Joe Stringer LGTM Acked-by: Thomas Graf > @@ -734,9 +722,25 @@ static int ovs_flo

[ovs-dev] [PATCH v7 23/33] net: openvswitch - set name assign type

2014-07-10 Thread Tom Gundersen
Signed-off-by: Tom Gundersen Cc: Pravin Shelar Cc: dev@openvswitch.org --- net/openvswitch/datapath.c | 1 + net/openvswitch/vport-internal_dev.c | 2 +- net/openvswitch/vport.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/net/openvswitch/datapath.

[ovs-dev] [PATCH 3/3] datapath: refactor do_output() to move skb_clone NULL check out of fast path

2014-07-10 Thread Andy Zhou
skb_clone() NULL check is implemented in do_output(), as past of the common (fast) path. Refactoring so that NULL check is done in the slow path, immediately after skb_clone() is called. Besides optimization, this change also improves code readability by making the skb_clone() NULL check consisten

[ovs-dev] [PATCH 1/3] datapath: add skb_clone NULL check in the recirc action.

2014-07-10 Thread Andy Zhou
Refactoring recirc action implementation. The main change is to fix a bug where the NULL check after skb clone() call is missing. The fix is to return -ENOMEM whenever skb_clone() failed to create a clone. Also rearranged adjacent code to improve readability. Reported-by: Pravin B Shelar Signe

[ovs-dev] [PATCH 2/3] datapath: add skb_clone NULL check for the sampling action.

2014-07-10 Thread Andy Zhou
Fix a bug where skb_clone() NULL check is missing in sample action implementation. Signed-off-by: Andy Zhou --- datapath/actions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datapath/actions.c b/datapath/actions.c index 5cd7492..daa7b43 100644 --- a/datapath/actions.c +++ b/datapath/a