openvswitch: remove unused patches

commit 1fd1ff3720 [openvswitch: uprev to v2.9.2] left a bunch of
unused patches in place. Remove unreferenced patches as they are no
longer needed.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Mark Asselstine 2018-06-05 09:47:35 -04:00 committed by Bruce Ashfield
parent 343b40ba0d
commit d4c5cd1d93
10 changed files with 0 additions and 1789 deletions

View File

@ -1,33 +0,0 @@
From 28b2d17de9414161d5edd67766bd4b452cd809ef Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 20 Mar 2017 12:12:51 -0700
Subject: [PATCH] use the linux if_packet.h Interface directly
Helps compiling with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
lib/netdev-linux.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index fccf88f..b703156 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -33,14 +33,13 @@
#include <linux/pkt_sched.h>
#include <linux/rtnetlink.h>
#include <linux/sockios.h>
+#include <linux/if_packet.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/utsname.h>
-#include <netpacket/packet.h>
#include <net/if.h>
#include <net/if_arp.h>
-#include <net/if_packet.h>
#include <net/route.h>
#include <netinet/in.h>
#include <poll.h>

View File

@ -1,77 +0,0 @@
From c0ba116eab401431b4f11b66bd7d1b42741b03c3 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Thu, 29 Jun 2017 20:33:23 -0700
Subject: [PATCH] Python3 compatibility: exception cleanup
Commit 52e4a477f0b3c0a0ece7adeede6e06e07814f8b9 from
https://github.com/openvswitch/ovs.git
The exception syntax which is compatible with python2 and python3 is
to use the "as" form for "except:".
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
build-aux/extract-ofp-fields | 2 +-
ovsdb/ovsdb-doc | 4 ++--
ovsdb/ovsdb-idlc.in | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
index 80c7d35..6286c9c 100755
--- a/build-aux/extract-ofp-fields
+++ b/build-aux/extract-ofp-fields
@@ -784,7 +784,7 @@ if __name__ == "__main__":
try:
options, args = getopt.gnu_getopt(sys.argv[1:], 'h',
['help', 'ovs-version='])
- except getopt.GetoptError, geo:
+ except getopt.GetoptError as geo:
sys.stderr.write("%s: %s\n" % (argv0, geo.msg))
sys.exit(1)
diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
index e82ad59..9448713 100755
--- a/ovsdb/ovsdb-doc
+++ b/ovsdb/ovsdb-doc
@@ -278,7 +278,7 @@ if __name__ == "__main__":
options, args = getopt.gnu_getopt(sys.argv[1:], 'hV',
['er-diagram=',
'version=', 'help'])
- except getopt.GetoptError, geo:
+ except getopt.GetoptError as geo:
sys.stderr.write("%s: %s\n" % (argv0, geo.msg))
sys.exit(1)
@@ -306,7 +306,7 @@ if __name__ == "__main__":
if len(line):
print(line)
- except error.Error, e:
+ except error.Error as e:
sys.stderr.write("%s: %s\n" % (argv0, e.msg))
sys.exit(1)
diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index 62442ee..e7e1c6b 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -1098,7 +1098,7 @@ if __name__ == "__main__":
['directory',
'help',
'version'])
- except getopt.GetoptError, geo:
+ except getopt.GetoptError as geo:
sys.stderr.write("%s: %s\n" % (argv0, geo.msg))
sys.exit(1)
@@ -1136,7 +1136,7 @@ if __name__ == "__main__":
sys.exit(1)
func(*args[1:])
- except ovs.db.error.Error, e:
+ except ovs.db.error.Error as e:
sys.stderr.write("%s: %s\n" % (argv0, e))
sys.exit(1)

View File

@ -1,31 +0,0 @@
From 8557d51e8c7325a17219911e9a65eeb3946e869f Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Thu, 29 Jun 2017 20:33:23 -0700
Subject: [PATCH] Python3 compatibility: execfile to exec
Commit a4d10a7ca937d73873f6f98619d88682e69f5dbe from
https://github.com/openvswitch/ovs.git
Allow compability with python3 and python2 by changing execfile() to
exec().
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
ovsdb/ovsdb-idlc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index e7e1c6b..e1551f9 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -17,7 +17,7 @@ def parseSchema(filename):
def annotateSchema(schemaFile, annotationFile):
schemaJson = ovs.json.from_file(schemaFile)
- execfile(annotationFile, globals(), {"s": schemaJson})
+ exec(compile(open(annotationFile, "rb").read(), annotationFile, 'exec'), globals(), {"s": schemaJson})
ovs.json.to_stream(schemaJson, sys.stdout)
sys.stdout.write('\n')

View File

@ -1,100 +0,0 @@
From 7e4bd5c2af85b1293be0a92b18f7930bda2ab41a Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Thu, 29 Jun 2017 20:33:23 -0700
Subject: [PATCH] Python3 compatibility: iteritems to items
Commit 4ab665623cbb4c6506e48b82e0c9fe8585f42e13 from
https://github.com/openvswitch/ovs.git
Allow compability with python3 and python2 by changing iteritems() to
items().
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
build-aux/extract-ofp-actions | 2 +-
build-aux/extract-ofp-errors | 2 +-
build-aux/extract-ofp-fields | 2 +-
ovsdb/ovsdb-idlc.in | 8 ++++----
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
index 67e3848..c7858bd 100755
--- a/build-aux/extract-ofp-actions
+++ b/build-aux/extract-ofp-actions
@@ -13,7 +13,7 @@ version_map = {"1.0": 0x01,
"1.3": 0x04,
"1.4": 0x05,
"1.5": 0x06}
-version_reverse_map = dict((v, k) for (k, v) in version_map.iteritems())
+version_reverse_map = dict((v, k) for (k, v) in version_map.items())
# Map from vendor name to the length of the action header.
vendor_map = {"OF": (0x00000000, 4),
diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
index 97d62d2..58ba006 100755
--- a/build-aux/extract-ofp-errors
+++ b/build-aux/extract-ofp-errors
@@ -14,7 +14,7 @@ version_map = {"1.0": 0x01,
"1.4": 0x05,
"1.5": 0x06,
"1.6": 0x07}
-version_reverse_map = dict((v, k) for (k, v) in version_map.iteritems())
+version_reverse_map = dict((v, k) for (k, v) in version_map.items())
token = None
line = ""
diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
index 6286c9c..f624728 100755
--- a/build-aux/extract-ofp-fields
+++ b/build-aux/extract-ofp-fields
@@ -16,7 +16,7 @@ VERSION = {"1.0": 0x01,
"1.3": 0x04,
"1.4": 0x05,
"1.5": 0x06}
-VERSION_REVERSE = dict((v,k) for k, v in VERSION.iteritems())
+VERSION_REVERSE = dict((v,k) for k, v in VERSION.items())
TYPES = {"u8": (1, False),
"be16": (2, False),
diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index e1551f9..b70a599 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -138,7 +138,7 @@ def printCIDLHeader(schemaFile):
#include "smap.h"
#include "uuid.h"''' % {'prefix': prefix.upper()})
- for tableName, table in sorted(schema.tables.iteritems()):
+ for tableName, table in sorted(schema.tables.items()):
structName = "%s%s" % (prefix, tableName.lower())
print(" ")
@@ -300,7 +300,7 @@ def printCIDLSource(schemaFile):
''' % schema.idlHeader)
# Cast functions.
- for tableName, table in sorted(schema.tables.iteritems()):
+ for tableName, table in sorted(schema.tables.items()):
structName = "%s%s" % (prefix, tableName.lower())
print('''
static struct %(s)s *
@@ -311,7 +311,7 @@ static struct %(s)s *
''' % {'s': structName})
- for tableName, table in sorted(schema.tables.iteritems()):
+ for tableName, table in sorted(schema.tables.items()):
structName = "%s%s" % (prefix, tableName.lower())
print(" ")
print("/* %s table. */" % (tableName))
@@ -1025,7 +1025,7 @@ void
# Table classes.
print(" ")
print("struct ovsdb_idl_table_class %stable_classes[%sN_TABLES] = {" % (prefix, prefix.upper()))
- for tableName, table in sorted(schema.tables.iteritems()):
+ for tableName, table in sorted(schema.tables.items()):
structName = "%s%s" % (prefix, tableName.lower())
if table.is_root:
is_root = "true"

View File

@ -1,49 +0,0 @@
From d22c7f1c6ade82a0cd646cfcd8df9adda6cd1ad6 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Thu, 29 Jun 2017 20:33:23 -0700
Subject: [PATCH] Python3 compatibility: fix integer problems
Commit fa145f1a53943243f94a32ce98525db8494b0052 from
https://github.com/openvswitch/ovs.git
In python3 maxint is not defined, but maxsize is defined in both
python2 and python3.
The put_text() will not automatically use a value which came in as
float due to a pior math function and python3 will throw an exception.
The simple answer is to convert it with int() and move on.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
ovsdb/ovsdb-idlc.in | 2 +-
python/build/nroff.py | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index b70a599..3645275 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -358,7 +358,7 @@ static void
print(" %s" % type.value.initCDefault(valueVar, type.n_min == 0))
print(" }")
else:
- if type.n_max != sys.maxint:
+ if type.n_max != sys.maxsize:
print(" size_t n = MIN(%d, datum->n);" % type.n_max)
nMax = "n"
else:
diff --git a/python/build/nroff.py b/python/build/nroff.py
index c23837f..401f699 100644
--- a/python/build/nroff.py
+++ b/python/build/nroff.py
@@ -148,6 +148,8 @@ def fatal(msg):
def put_text(text, x, y, s):
+ x = int(x)
+ y = int(y)
extend = x + len(s) - len(text[y])
if extend > 0:
text[y] += ' ' * extend

View File

@ -1,54 +0,0 @@
From 7f542122d62b20d11198bfdb0f2c6a460261b5e7 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Thu, 29 Jun 2017 20:33:23 -0700
Subject: [PATCH] Python3 compatibility: math error compatibility
Commit 3fa5aa4294377e0f35267936d0c5caea3e61db48 from
https://github.com/openvswitch/ovs.git
The way math is handled with typing is completely different in python3.
% python2<<EOF
x=10
y=8
print((x + (y - 1)) / y * y)
EOF
16
python3<<EOF
x=10
y=8
print((x + (y - 1)) / y * y)
EOF
17.0
So we need to force an integer for the round function as follows and
maintain compatibility with python2.
python3<<EOF
x=10
y=8
print(int((x + (y - 1)) / y) * y)
EOF
16
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
build-aux/extract-ofp-actions | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
index c7858bd..4d05ef9 100755
--- a/build-aux/extract-ofp-actions
+++ b/build-aux/extract-ofp-actions
@@ -35,7 +35,7 @@ line = ""
arg_structs = set()
def round_up(x, y):
- return (x + (y - 1)) / y * y
+ return int((x + (y - 1)) / y) * y
def open_file(fn):
global file_name

View File

@ -1,49 +0,0 @@
From c78b39ae9ba6337210d6a9e4ccc4753cb1c3b48f Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Thu, 29 Jun 2017 20:33:23 -0700
Subject: [PATCH] Python3 compatibility: unicode to str
Commit 7430959d4ad17db89b8387c3aef58c8b230cad10 from
https://github.com/openvswitch/ovs.git
When transitioning from python2 to python3 the following type class
changes occured:
python2 -> python3
unicode -> str
str -> bytes
That means we have to check the python version and do the right type
check python3 will throw an error when it tries to use the unicode
type because it doesn't exist.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
ovsdb/ovsdb-doc | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
index 9448713..d55c6e6 100755
--- a/ovsdb/ovsdb-doc
+++ b/ovsdb/ovsdb-doc
@@ -65,9 +65,15 @@ def columnGroupToNroff(table, groupXml, documented_columns):
if node.hasAttribute('type'):
type_string = node.attributes['type'].nodeValue
type_json = ovs.json.from_string(str(type_string))
- if type(type_json) in (str, unicode):
- raise error.Error("%s %s:%s has invalid 'type': %s"
- % (table.name, name, key, type_json))
+ # py2 -> py3 means str -> bytes and unicode -> str
+ try:
+ if type(type_json) in (str, unicode):
+ raise error.Error("%s %s:%s has invalid 'type': %s"
+ % (table.name, name, key, type_json))
+ except:
+ if type(type_json) in (bytes, str):
+ raise error.Error("%s %s:%s has invalid 'type': %s"
+ % (table.name, name, key, type_json))
type_ = ovs.db.types.BaseType.from_json(type_json)
else:
type_ = column.type.value

View File

@ -1,26 +0,0 @@
From f8491645416952b31000f42777ff79486a7b0511 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@ovn.org>
Date: Thu, 6 Jul 2017 14:01:27 -0700
Subject: [PATCH] AUTHORS: Add Jason Wessel.
Commit a91c4cfaf863718bc94fb9c88939bd0b0385a6fe from
https://github.com/openvswitch/ovs.git
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
AUTHORS.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/AUTHORS.rst b/AUTHORS.rst
index 63e6a8d..d0dc70d 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -156,6 +156,7 @@ Jan Scheurich jan.scheurich@ericsson.com
Jan Vansteenkiste jan@vstone.eu
Jarno Rajahalme jarno@ovn.org
Jason Kölker jason@koelker.net
+Jason Wessel jason.wessel@windriver.com
Jasper Capel jasper@capel.tv
Jean Tourrilhes jt@hpl.hp.com
Jeremy Stribling strib@nicira.com

View File

@ -1,108 +0,0 @@
From fb68120ef8aed625b04b2fbd2cb78fc59a7b7432 Mon Sep 17 00:00:00 2001
From: He Zhe <zhe.he@windriver.com>
Date: Wed, 30 Mar 2016 06:23:45 -0400
Subject: [PATCH] openvswitch: Add test-install rule to support ptest execution
Signed-off-by: Radu Patriu <radu.patriu@enea.com>
Fix ptest for v2.5
- Copy certain files from srcdir since it has been different from
build directory.
- Copy more necessary files for new added test cases.
- Modify config files for running on target.
Signed-off-by: He Zhe <zhe.he@windriver.com>
---
Makefile.am | 1 +
test.mk | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 73 insertions(+)
create mode 100644 test.mk
diff --git a/Makefile.am b/Makefile.am
index ea63acb..ff7d70a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -429,3 +429,4 @@ include windows/automake.mk
include ovn/automake.mk
include selinux/automake.mk
include build-aux/automake.mk
+include test.mk
diff --git a/test.mk b/test.mk
new file mode 100644
index 0000000..b10a581
--- /dev/null
+++ b/test.mk
@@ -0,0 +1,72 @@
+TEST_DEST ?= ${prefix}/lib/openvswitch
+TEST_ROOT ?= ${prefix}/lib/openvswitch
+TEST_DEPEND =
+
+if HAVE_OPENSSL
+TEST_DEPEND += $(TESTPKI_FILES)
+endif
+
+test-install: $(TEST_DEPEND)
+ @list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
+ install -d $(TEST_DEST)/tests ;\
+ install $(srcdir)/vtep/ovs-vtep $(TEST_DEST)/tests ;\
+ install -d $(TEST_DEST)/python ;\
+ install -d $(TEST_DEST)/python/ovs ;\
+ install -d $(TEST_DEST)/python/ovs/db ;\
+ install -d $(TEST_DEST)/python/ovs/unixctl ;\
+ install -d $(TEST_DEST)/vswitchd ;\
+ install $(srcdir)/vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
+ install vswitchd/ovs-vswitchd $(TEST_DEST)/vswitchd ;\
+ install -d $(TEST_DEST)/debian ;\
+ install $(srcdir)/debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
+ install -d $(TEST_DEST)/build-aux ;\
+ install $(srcdir)/build-aux/check-structs $(TEST_DEST)/build-aux ;\
+ install -d $(TEST_DEST)/xenserver ;\
+ install $(srcdir)/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
+ install $(srcdir)/xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
+ install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
+ install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
+ install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
+ install -d $(TEST_DEST)/vtep ;\
+ install $(srcdir)/vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
+ install -d $(TEST_DEST)/ovn ;\
+ install $(srcdir)/ovn/ovn-nb.ovsschema $(TEST_DEST)/ovn ;\
+ install $(srcdir)/ovn/ovn-sb.ovsschema $(TEST_DEST)/ovn ;\
+ install -d $(TEST_DEST)/utilities ;\
+ install $(srcdir)/utilities/ovs-pcap.in $(TEST_DEST)/utilities ;\
+ install $(srcdir)/utilities/ovs-pki.in $(TEST_DEST)/utilities ;\
+ for p in $$list ; do \
+ echo $$p ;\
+ p=$${p#../git/} ;\
+ pre=$${p#tests\/} ;\
+ if test $$pre != $$p ; then \
+ echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
+ if test -f $$p ; then \
+ install $$p $(TEST_DEST)/tests/$$pre ;\
+ else \
+ install $(srcdir)/$$p $(TEST_DEST)/tests/$$pre ;\
+ fi ;\
+ continue ;\
+ fi ;\
+ pre=$${p#python\/ovs\/} ;\
+ if test $$pre != $$p ; then \
+ echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
+ if test -f $$p ; then \
+ install $$p $(TEST_DEST)/python/ovs/$$pre ;\
+ else \
+ install $(srcdir)/$$p $(TEST_DEST)/python/ovs/$$pre ;\
+ fi ;\
+ continue ;\
+ fi; \
+ done ;\
+ sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
+ sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
+ sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
+ sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
+ sed -i 's|at_srcdir=.*|at_srcdir='"'"'.'"'"'|g' $(TEST_DEST)/tests/atconfig
+ sed -i 's|at_top_srcdir=.*|at_top_srcdir='"'"'..'"'"'|g' $(TEST_DEST)/tests/atconfig
+ sed -i 's|at_top_build_prefix=.*|at_top_build_prefix='"'"'../'"'"'|g' $(TEST_DEST)/tests/atconfig
+ sed -i 's|^\(.*config\.log.*\)|#\1|g' $(TEST_DEST)/tests/testsuite
+ sed -i 's|$$srcdir|$$abs_srcdir|g' $(TEST_DEST)/tests/testsuite
+ sed -i 's|ovs-appctl-bashcomp\.bash|/etc/bash_completion.d/ovs-appctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
+ sed -i 's|ovs-vsctl-bashcomp\.bash|/etc/bash_completion.d/ovs-vsctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite