The following patches are in upstream now 0100-netdev-linux-Use-unsigned-int-for-ifi_flags.patch 0103-ovs-ctl-fix-setting-hostname.patch 0106-ovs-save-compatible-with-busybox-ip-command.patch 0107-datapath-use-KARCH-when-building-linux-datapath-modu.patch As for 0001-musl-compatibility.patch, the net/if_packet.h part does not apply anymore. And musl is not relevant as we use libatomic from gcc Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>lilik-openwrt-22.03
@ -1,33 +0,0 @@ | |||||
--- a/configure.ac | |||||
+++ b/configure.ac | |||||
@@ -122,7 +122,6 @@ OVS_CHECK_SOCKET_LIBS | |||||
OVS_CHECK_XENSERVER_VERSION | |||||
OVS_CHECK_GROFF | |||||
OVS_CHECK_TLS | |||||
-OVS_CHECK_ATOMIC_LIBS | |||||
OVS_CHECK_GCC4_ATOMICS | |||||
OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1) | |||||
OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2) | |||||
--- a/lib/netdev-linux.c | |||||
+++ b/lib/netdev-linux.c | |||||
@@ -39,7 +39,9 @@ | |||||
#include <netpacket/packet.h> | |||||
#include <net/if.h> | |||||
#include <net/if_arp.h> | |||||
+#if defined(__UCLIBC__) || defined(__GLIBC__) | |||||
#include <net/if_packet.h> | |||||
+#endif | |||||
#include <net/route.h> | |||||
#include <poll.h> | |||||
#include <stdlib.h> | |||||
--- a/lib/ovs-atomic.h | |||||
+++ b/lib/ovs-atomic.h | |||||
@@ -320,7 +320,7 @@ | |||||
#include "util.h" | |||||
#define IN_OVS_ATOMIC_H | |||||
- #if __CHECKER__ | |||||
+ #if 1 | |||||
/* sparse doesn't understand some GCC extensions we use. */ | |||||
#include "ovs-atomic-pthreads.h" | |||||
#elif __has_extension(c_atomic) |
@ -1,25 +0,0 @@ | |||||
From e4ac9741a99866976322c21605b312bc27633c92 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 100/107] 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 e16ea58a0..5ada9a21f 100644 | |||||
--- a/lib/netdev-linux.c | |||||
+++ b/lib/netdev-linux.c | |||||
@@ -3115,7 +3115,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,30 +0,0 @@ | |||||
From 6b9732c8851c5466f2a363d88b5acae320801efe Mon Sep 17 00:00:00 2001 | |||||
From: Yousong Zhou <yszhou4tech@gmail.com> | |||||
Date: Wed, 14 Mar 2018 16:40:01 +0800 | |||||
Subject: [PATCH 103/107] ovs-ctl: fix setting hostname | |||||
The command "hostname" is not available in OpenWrt by default. | |||||
The other thing to note is that currently kernel.hostname is not a fully | |||||
qualitied name | |||||
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> | |||||
--- | |||||
utilities/ovs-ctl.in | 4 +--- | |||||
1 file changed, 1 insertion(+), 3 deletions(-) | |||||
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in | |||||
index 43c8f32b7..6203ecff5 100755 | |||||
--- a/utilities/ovs-ctl.in | |||||
+++ b/utilities/ovs-ctl.in | |||||
@@ -36,9 +36,7 @@ insert_mod_if_required () { | |||||
} | |||||
set_hostname () { | |||||
- # 'hostname -f' needs network connectivity to work. So we should | |||||
- # call this only after ovs-vswitchd is running. | |||||
- ovs_vsctl set Open_vSwitch . external-ids:hostname="$(hostname -f)" | |||||
+ ovs_vsctl set Open_vSwitch . external-ids:hostname="$(sysctl -n kernel.hostname)" | |||||
} | |||||
set_system_ids () { |
@ -1,26 +0,0 @@ | |||||
From 2a59f2b60e8a22dc93d48c511b5c4255b429ff66 Mon Sep 17 00:00:00 2001 | |||||
From: Yousong Zhou <zhouyousong@yunionyun.com> | |||||
Date: Wed, 5 Sep 2018 12:32:54 +0000 | |||||
Subject: [PATCH 106/107] ovs-save: compatible with busybox ip command | |||||
Busybox ip command will have exit code 1 for `ip -V` or `ip help` etc., | |||||
use `ip rule list` to cover both iproute2 and busybox ip command | |||||
Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com> | |||||
--- | |||||
utilities/ovs-save | 2 +- | |||||
1 file changed, 1 insertion(+), 1 deletion(-) | |||||
diff --git a/utilities/ovs-save b/utilities/ovs-save | |||||
index ea8fb6a45..72d460df4 100755 | |||||
--- a/utilities/ovs-save | |||||
+++ b/utilities/ovs-save | |||||
@@ -38,7 +38,7 @@ EOF | |||||
} | |||||
save_interfaces () { | |||||
- if (ip -V) > /dev/null 2>&1; then :; else | |||||
+ if (ip rule list) > /dev/null 2>&1; then :; else | |||||
echo "$0: ip not found in $PATH" >&2 | |||||
exit 1 | |||||
fi |
@ -1,28 +0,0 @@ | |||||
From 1e859f407b94a0f549fc41fceec11ca12653878b Mon Sep 17 00:00:00 2001 | |||||
From: Yousong Zhou <zhouyousong@yunionyun.com> | |||||
Date: Thu, 6 Sep 2018 11:48:20 +0000 | |||||
Subject: [PATCH 107/107] datapath: use KARCH when building linux datapath | |||||
modules | |||||
Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com> | |||||
--- | |||||
datapath/linux/Makefile.main.in | 4 ++-- | |||||
1 file changed, 2 insertions(+), 2 deletions(-) | |||||
diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in | |||||
index 7d18253be..039485d16 100644 | |||||
--- a/datapath/linux/Makefile.main.in | |||||
+++ b/datapath/linux/Makefile.main.in | |||||
@@ -68,10 +68,10 @@ ifeq (,$(wildcard $(CONFIG_FILE))) | |||||
endif | |||||
default: | |||||
- $(MAKE) -C $(KSRC) M=$(builddir) modules | |||||
+ $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules | |||||
modules_install: | |||||
- $(MAKE) -C $(KSRC) M=$(builddir) modules_install | |||||
+ $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules_install | |||||
depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h` | |||||
endif | |||||