aboutsummaryrefslogtreecommitdiff
path: root/net/openvswitch/patches
diff options
context:
space:
mode:
authorAlexandru Ardelean <aa@ocedo.com>2014-09-12 16:02:56 +0300
committerAlexandru Ardelean <aa@ocedo.com>2014-09-16 17:13:46 +0300
commit8ecc0fb194a42e42194a5d1a792bb95f24cd4468 (patch)
tree2a774b20a46b4c003fd28107f6c40dc0feaf8c7c /net/openvswitch/patches
parentab9becdc10197d909ae9aa7fe486d4ed1c55ada1 (diff)
openvswitch: initial feed at OpenVSwitch version 2.3
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'net/openvswitch/patches')
-rw-r--r--net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch41
-rw-r--r--net/openvswitch/patches/0002-netdev-linux-Use-unsigned-int-for-ifi_flags.patch28
-rw-r--r--net/openvswitch/patches/0003-lib-util.h-Disable-ovs_assert-when-build-with-NDEBUG.patch36
3 files changed, 105 insertions, 0 deletions
diff --git a/net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch b/net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch
new file mode 100644
index 000000000..1e79f3ae1
--- /dev/null
+++ b/net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch
@@ -0,0 +1,41 @@
+From b9284f535e93c337ab21f330753e60e1038f9a27 Mon Sep 17 00:00:00 2001
+From: Helmut Schaa <helmut.schaa@googlemail.com>
+Date: Wed, 8 Jan 2014 13:48:49 +0100
+Subject: [PATCH 2/2] netdev-linux: Let interface flag survive internal port
+ setup
+
+Due to a race condition when bringing up an internal port on Linux
+some interface flags (e.g. IFF_MULTICAST) are falsely reset. This
+happens because netlink events may be processed after the according
+netdev has been brought up (which sets interface flags).
+
+Fix this by reading the interface flags just before updating them
+if they have not been updated by from the kernel yet.
+
+Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
+---
+ lib/netdev-linux.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
+index 9eaac33..423e72e 100644
+--- a/lib/netdev-linux.c
++++ b/lib/netdev-linux.c
+@@ -2569,7 +2569,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
+ unsigned int old_flags, new_flags;
+ int error = 0;
+
+- old_flags = netdev->ifi_flags;
++ if (!(netdev->cache_valid & VALID_DRVINFO)) {
++ /* Most likely the debvice flags are not in sync yet, fetch them now */
++ get_flags(&netdev->up, &old_flags);
++ } else {
++ old_flags = netdev->ifi_flags;
++ }
++
+ *old_flagsp = iff_to_nd_flags(old_flags);
+ new_flags = (old_flags & ~nd_to_iff_flags(off)) | nd_to_iff_flags(on);
+ if (new_flags != old_flags) {
+--
+1.8.1.4
+
diff --git a/net/openvswitch/patches/0002-netdev-linux-Use-unsigned-int-for-ifi_flags.patch b/net/openvswitch/patches/0002-netdev-linux-Use-unsigned-int-for-ifi_flags.patch
new file mode 100644
index 000000000..19c774799
--- /dev/null
+++ b/net/openvswitch/patches/0002-netdev-linux-Use-unsigned-int-for-ifi_flags.patch
@@ -0,0 +1,28 @@
+From 12edcd800d924f69630768eeece842373dee5bb0 Mon Sep 17 00:00:00 2001
+From: Helmut Schaa <helmut.schaa@googlemail.com>
+Date: Wed, 8 Jan 2014 13:48:33 +0100
+Subject: [PATCH 1/2] netdev-linux: Use unsigned int for ifi_flags
+
+ifi_flags is unsigned, the local equivalents should do the same.
+
+Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
+---
+ lib/netdev-linux.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
+index 9bdbbdf..9eaac33 100644
+--- a/lib/netdev-linux.c
++++ b/lib/netdev-linux.c
+@@ -2566,7 +2566,7 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
+ enum netdev_flags on, enum netdev_flags *old_flagsp)
+ OVS_REQUIRES(netdev->mutex)
+ {
+- int old_flags, new_flags;
++ unsigned int old_flags, new_flags;
+ int error = 0;
+
+ old_flags = netdev->ifi_flags;
+--
+1.8.1.4
+
diff --git a/net/openvswitch/patches/0003-lib-util.h-Disable-ovs_assert-when-build-with-NDEBUG.patch b/net/openvswitch/patches/0003-lib-util.h-Disable-ovs_assert-when-build-with-NDEBUG.patch
new file mode 100644
index 000000000..2aade29ec
--- /dev/null
+++ b/net/openvswitch/patches/0003-lib-util.h-Disable-ovs_assert-when-build-with-NDEBUG.patch
@@ -0,0 +1,36 @@
+From 34b51e26555d05c00b2320f943a645added5dae4 Mon Sep 17 00:00:00 2001
+From: Helmut Schaa <helmut.schaa@googlemail.com>
+Date: Mon, 9 Dec 2013 14:15:11 +0100
+Subject: [PATCH 5/6] lib/util.h: Disable ovs_assert when build with NDEBUG
+
+Reduces binary size. Use a static inline function instead of
+a macro to not get "unused variable" warning everywhere.
+
+Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
+---
+ lib/util.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/util.h b/lib/util.h
+index 5c23962..9e5866d 100644
+--- a/lib/util.h
++++ b/lib/util.h
+@@ -69,10 +69,15 @@
+ * - Writes the failure message to the log.
+ *
+ * - Not affected by NDEBUG. */
++#ifndef NDEBUG
+ #define ovs_assert(CONDITION) \
+ if (!OVS_LIKELY(CONDITION)) { \
+ ovs_assert_failure(SOURCE_LOCATOR, __func__, #CONDITION); \
+ }
++#else
++static inline void ovs_assert(bool cond OVS_UNUSED) {}
++#endif
++
+ void ovs_assert_failure(const char *, const char *, const char *) NO_RETURN;
+
+ /* Casts 'pointer' to 'type' and issues a compiler warning if the cast changes
+--
+1.8.1.4
+