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,
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 -
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
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 ++
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
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,
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
-
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
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
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
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
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
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-
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
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
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
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_
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>> > 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
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
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
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
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
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
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
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
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
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
>
>> 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
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
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
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
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:
>>>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
64 matches
Mail list logo