From c28b59b2ebbaf1e44a950d979562aca18fe448dd Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Jul 22 2024 14:43:32 +0000 Subject: Import openvswitch3.3-3.3.0-40 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index 6accba3..d8bb662 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -135,6 +135,32 @@ index aa9284fb16..80678854bd 100644 Dhaval Badiani dbadiani@vmware.com DK Moon Ding Zhi zhi.ding@6wind.com +diff --git a/Documentation/conf.py b/Documentation/conf.py +index 085ca2cd67..774eafdb76 100644 +--- a/Documentation/conf.py ++++ b/Documentation/conf.py +@@ -12,6 +12,7 @@ + # All configuration values have a default; values that are commented out + # serve to show the default. + ++import os + import string + import sys + +@@ -108,6 +109,13 @@ html_logo = '_static/logo.png' + # so a file named "default.css" will overwrite the builtin "default.css". + html_static_path = ['_static'] + ++# Define the canonical URL for our domain configured on Read the Docs. ++html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") ++ ++# Tell Jinja2 templates the build is running on Read the Docs. ++html_context = {} ++if os.environ.get("READTHEDOCS", "") == "True": ++ html_context["READTHEDOCS"] = True + + # -- Options for manual page output --------------------------------------- + diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst index 49b987b610..95ce0bf411 100644 --- a/Documentation/faq/releases.rst @@ -229,11 +255,50 @@ index fce099d5dc..efdb8aebce 100644 --with-vstudiotarget="" \ --with-vstudiotargetver="" +diff --git a/Documentation/topics/dpdk/vhost-user.rst b/Documentation/topics/dpdk/vhost-user.rst +index e952a686b5..89b2116734 100644 +--- a/Documentation/topics/dpdk/vhost-user.rst ++++ b/Documentation/topics/dpdk/vhost-user.rst +@@ -312,7 +312,7 @@ predictable migration time. Mostly used as a second phase after the normal + + More information can be found in QEMU `docs`_. + +-.. _`docs`: https://git.qemu.org/?p=qemu.git;a=blob;f=docs/devel/migration.rst ++.. _`docs`: https://www.qemu.org/docs/master/devel/migration/postcopy.html + + Post-copy support may be enabled via a global config value + ``vhost-postcopy-support``. Setting this to ``true`` enables Post-copy support +@@ -485,7 +485,7 @@ Sample XML + + + +-.. _QEMU documentation: http://git.qemu-project.org/?p=qemu.git;a=blob;f=docs/specs/vhost-user.txt;h=7890d7169;hb=HEAD ++.. _QEMU documentation: https://www.qemu.org/docs/master/interop/vhost-user.html + + Jumbo Frames + ------------ diff --git a/Makefile.am b/Makefile.am -index 94f488d183..0b7c832469 100644 +index 94f488d183..23c3417a70 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -400,16 +400,10 @@ ALL_LOCAL += flake8-check +@@ -8,6 +8,8 @@ + AUTOMAKE_OPTIONS = foreign subdir-objects + ACLOCAL_AMFLAGS = -I m4 + ++AM_DISTCHECK_CONFIGURE_FLAGS = --with-version-suffix="$(VERSION_SUFFIX)" ++ + AM_CPPFLAGS = $(SSL_CFLAGS) + AM_LDFLAGS = $(SSL_LDFLAGS) + AM_LDFLAGS += $(OVS_LDFLAGS) +@@ -161,6 +163,7 @@ SUFFIXES += .in + -e 's,[@]PYTHON3[@],$(PYTHON3),g' \ + -e 's,[@]RUNDIR[@],$(RUNDIR),g' \ + -e 's,[@]VERSION[@],$(VERSION),g' \ ++ -e 's,[@]VERSION_SUFFIX[@],$(VERSION_SUFFIX),g' \ + -e 's,[@]localstatedir[@],$(localstatedir),g' \ + -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ + -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ +@@ -400,16 +403,10 @@ ALL_LOCAL += flake8-check # F811 redefinition of unused from line (only from flake8 v2.0) # D*** -- warnings from flake8-docstrings plugin # H*** -- warnings from flake8 hacking plugin (custom style checks beyond PEP8) @@ -267,8 +332,32 @@ index 8888fb3ec5..f62d06ffb6 100644 v3.3.0 - 16 Feb 2024 -------------------- - OVSDB: +diff --git a/acinclude.m4 b/acinclude.m4 +index f1ba046c23..1ace70c92a 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -497,6 +497,19 @@ AC_DEFUN([OVS_CHECK_DPDK], [ + AM_CONDITIONAL([DPDK_NETDEV], test "$DPDKLIB_FOUND" = true) + ]) + ++dnl Append a version suffix. ++ ++AC_DEFUN([OVS_CHECK_VERSION_SUFFIX], [ ++ AC_ARG_WITH([version-suffix], ++ [AS_HELP_STRING([--with-version-suffix=ver_suffix], ++ [Specify a string that will be appended ++ to OVS version])]) ++ AC_DEFINE_UNQUOTED([VERSION_SUFFIX], ["$with_version_suffix"], ++ [Package version suffix]) ++ AC_SUBST([VERSION_SUFFIX], [$with_version_suffix]) ++ ]) ++]) ++ + dnl Checks for net/if_dl.h. + dnl + dnl (We use this as a proxy for checking whether we're building on FreeBSD diff --git a/configure.ac b/configure.ac -index 05afbb9cc8..4b00d1878b 100644 +index 05afbb9cc8..b2def25b82 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ @@ -280,6 +369,14 @@ index 05afbb9cc8..4b00d1878b 100644 AC_CONFIG_SRCDIR([vswitchd/ovs-vswitchd.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) +@@ -202,6 +202,7 @@ OVS_CHECK_LINUX_SCTP_CT + OVS_CHECK_LINUX_VIRTIO_TYPES + OVS_CHECK_DPDK + OVS_CHECK_PRAGMA_MESSAGE ++OVS_CHECK_VERSION_SUFFIX + AC_SUBST([CFLAGS]) + AC_SUBST([OVS_CFLAGS]) + AC_SUBST([OVS_LDFLAGS]) diff --git a/debian/changelog b/debian/changelog index 2049ddaa26..82af184157 100644 --- a/debian/changelog @@ -322,6 +419,19 @@ index 878c5c6a70..ecb91801cc 100644 #if __has_feature(c_thread_safety_attributes) /* "clang" annotations for thread safety check. * +diff --git a/include/openvswitch/version.h.in b/include/openvswitch/version.h.in +index 23d8fde4f1..231f61e30c 100644 +--- a/include/openvswitch/version.h.in ++++ b/include/openvswitch/version.h.in +@@ -19,7 +19,7 @@ + #define OPENVSWITCH_VERSION_H 1 + + #define OVS_PACKAGE_STRING "@PACKAGE_STRING@" +-#define OVS_PACKAGE_VERSION "@PACKAGE_VERSION@" ++#define OVS_PACKAGE_VERSION "@PACKAGE_VERSION@@VERSION_SUFFIX@" + + #define OVS_LIB_VERSION @LT_CURRENT@ + #define OVS_LIB_REVISION @LT_REVISION@ diff --git a/include/sparse/automake.mk b/include/sparse/automake.mk index c1229870bb..45e6202c52 100644 --- a/include/sparse/automake.mk @@ -753,9 +863,19 @@ index 2fa17d8140..a75b1c5cdb 100644 static inline void dp_packet_hwol_set_tx_outer_ipv4(struct dp_packet *b) diff --git a/lib/dpctl.c b/lib/dpctl.c -index 34ee7d0e2d..151848b909 100644 +index 34ee7d0e2d..cdff4206e2 100644 --- a/lib/dpctl.c +++ b/lib/dpctl.c +@@ -738,8 +738,8 @@ show_dpif(struct dpif *dpif, struct dpctl_params *dpctl_p) + continue; + } + error = netdev_get_stats(netdev, &s); ++ netdev_close(netdev); + if (!error) { +- netdev_close(netdev); + print_stat(dpctl_p, " RX packets:", s.rx_packets); + print_stat(dpctl_p, " errors:", s.rx_errors); + print_stat(dpctl_p, " dropped:", s.rx_dropped); @@ -1359,19 +1359,17 @@ static int dpctl_del_flow_dpif(struct dpif *dpif, const char *key_s, struct dpctl_params *dpctl_p) @@ -843,11 +963,42 @@ index 46e24d204d..99ff9b3693 100644 dp_netdev_input__(pmd, packets, true, 0); } +diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c +index 5788294ae0..f7035333e6 100644 +--- a/lib/dpif-netlink-rtnl.c ++++ b/lib/dpif-netlink-rtnl.c +@@ -566,6 +566,7 @@ dpif_netlink_rtnl_probe_oot_tunnels(void) + + tnl_cfg = netdev_get_tunnel_config(netdev); + if (!tnl_cfg) { ++ netdev_close(netdev); + return true; + } + diff --git a/lib/flow.c b/lib/flow.c -index 8e3402388c..dc5fb328d9 100644 +index 8e3402388c..9be4375246 100644 --- a/lib/flow.c +++ b/lib/flow.c -@@ -3420,6 +3420,24 @@ flow_compose(struct dp_packet *p, const struct flow *flow, +@@ -408,7 +408,8 @@ parse_ethertype(const void **datap, size_t *sizep) + static inline bool + parse_icmpv6(const void **datap, size_t *sizep, + const struct icmp6_data_header *icmp6, +- ovs_be32 *rso_flags, const struct in6_addr **nd_target, ++ ovs_be32 *rso_flags, ++ const union ovs_16aligned_in6_addr **nd_target, + struct eth_addr arp_buf[2], uint8_t *opt_type) + { + if (icmp6->icmp6_base.icmp6_code != 0 || +@@ -1117,7 +1118,7 @@ miniflow_extract(struct dp_packet *packet, struct miniflow *dst) + } + } else if (OVS_LIKELY(nw_proto == IPPROTO_ICMPV6)) { + if (OVS_LIKELY(size >= sizeof(struct icmp6_data_header))) { +- const struct in6_addr *nd_target; ++ const union ovs_16aligned_in6_addr *nd_target; + struct eth_addr arp_buf[2]; + /* This will populate whether we received Option 1 + * or Option 2. */ +@@ -3420,6 +3421,24 @@ flow_compose(struct dp_packet *p, const struct flow *flow, arp->ar_sha = flow->arp_sha; arp->ar_tha = flow->arp_tha; } @@ -1066,6 +1217,19 @@ index c59b51b611..a8e3f457b9 100644 } if (n) { +diff --git a/lib/match.c b/lib/match.c +index 0b9dc4278c..9b7e06e0c7 100644 +--- a/lib/match.c ++++ b/lib/match.c +@@ -1618,7 +1618,7 @@ match_format(const struct match *match, + ds_put_char(s, ','); + } + for (i = 0; i < FLOW_MAX_VLAN_HEADERS; i++) { +- char str_i[8]; ++ char str_i[12]; + + if (!wc->masks.vlans[i].tci) { + break; diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 45f61930d4..66396d7969 100644 --- a/lib/netdev-dpdk.c @@ -1646,6 +1810,19 @@ index 921d523177..3be1c08d24 100644 } } +diff --git a/lib/netlink-notifier.c b/lib/netlink-notifier.c +index dfecb97789..7ea5a41818 100644 +--- a/lib/netlink-notifier.c ++++ b/lib/netlink-notifier.c +@@ -223,7 +223,7 @@ nln_wait(struct nln *nln) + } + } + +-void ++void OVS_NO_SANITIZE_FUNCTION + nln_report(const struct nln *nln, void *change, int group) + { + struct nln_notifier *notifier; diff --git a/lib/netlink-protocol.h b/lib/netlink-protocol.h index 6eaa7035a4..e4bb28ac9f 100644 --- a/lib/netlink-protocol.h @@ -1883,6 +2060,19 @@ index eb4ff85d9e..d7dc7e55f3 100644 void ovs_router_flush(void); void ovs_router_disable_system_routing_table(void); +diff --git a/lib/ovsdb-error.c b/lib/ovsdb-error.c +index 9ad42b232d..56512fc28d 100644 +--- a/lib/ovsdb-error.c ++++ b/lib/ovsdb-error.c +@@ -146,7 +146,7 @@ ovsdb_internal_error(struct ovsdb_error *inner_error, + ds_put_char(&ds, ')'); + } + +- ds_put_format(&ds, " (%s %s)", program_name, VERSION); ++ ds_put_format(&ds, " (%s %s)", program_name, VERSION VERSION_SUFFIX); + + if (inner_error) { + char *s = ovsdb_error_to_string_free(inner_error); diff --git a/lib/packets.c b/lib/packets.c index 5803d26f4a..edac30b77b 100644 --- a/lib/packets.c @@ -2179,6 +2369,37 @@ index fdbcf4b7cb..8442c8d8b8 100644 __TC_RESERVED_PRIORITY_MAX }; #define TC_RESERVED_PRIORITY_MAX (__TC_RESERVED_PRIORITY_MAX -1) +diff --git a/lib/util.c b/lib/util.c +index 3fb3a4b40f..3357717ca7 100644 +--- a/lib/util.c ++++ b/lib/util.c +@@ -224,6 +224,8 @@ xvasprintf(const char *format, va_list args) + size_t needed; + char *s; + ++ ovs_assert(format); ++ + va_copy(args2, args); + needed = vsnprintf(NULL, 0, format, args); + +@@ -617,12 +619,14 @@ ovs_set_program_name(const char *argv0, const char *version) + program_name = basename; + + free(program_version); +- if (!strcmp(version, VERSION)) { +- program_version = xasprintf("%s (Open vSwitch) "VERSION"\n", ++ if (!strcmp(version, VERSION VERSION_SUFFIX)) { ++ program_version = xasprintf("%s (Open vSwitch) "VERSION ++ VERSION_SUFFIX"\n", + program_name); + } else { + program_version = xasprintf("%s %s\n" +- "Open vSwitch Library "VERSION"\n", ++ "Open vSwitch Library "VERSION ++ VERSION_SUFFIX"\n", + program_name, version); + } + } diff --git a/lib/vlog.c b/lib/vlog.c index b2653142f3..59b524b097 100644 --- a/lib/vlog.c @@ -2914,6 +3135,20 @@ index 41b986c0ac..f1eefd49cb 100755 else: sys.exit(0) +diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c +index b51fd42fe5..a876f8bcf7 100644 +--- a/ovsdb/ovsdb-server.c ++++ b/ovsdb/ovsdb-server.c +@@ -816,7 +816,8 @@ main(int argc, char *argv[]) + /* ovsdb-server is usually a long-running process, in which case it + * makes plenty of sense to log the version, but --run makes + * ovsdb-server more like a command-line tool, so skip it. */ +- VLOG_INFO("%s (Open vSwitch) %s", program_name, VERSION); ++ VLOG_INFO("%s (Open vSwitch) %s", program_name, ++ VERSION VERSION_SUFFIX); + } + + unixctl_command_register("exit", "", 0, 0, ovsdb_server_exit, &exiting); diff --git a/ovsdb/raft.c b/ovsdb/raft.c index f463afcb3d..ac3d37ac40 100644 --- a/ovsdb/raft.c @@ -3214,6 +3449,83 @@ index f463afcb3d..ac3d37ac40 100644 } else if (!strcmp(test, "transfer-leadership")) { failure_test = FT_TRANSFER_LEADERSHIP; } else if (!strcmp(test, "clear")) { +diff --git a/python/.gitignore b/python/.gitignore +index 60ace6f05b..ad5486af83 100644 +--- a/python/.gitignore ++++ b/python/.gitignore +@@ -1,2 +1,3 @@ + dist/ + *.egg-info ++setup.py +diff --git a/python/automake.mk b/python/automake.mk +index 84cf2eab57..d0523870d6 100644 +--- a/python/automake.mk ++++ b/python/automake.mk +@@ -75,25 +75,24 @@ EXTRA_DIST += \ + EXTRA_DIST += \ + python/ovs/compat/sortedcontainers/LICENSE \ + python/README.rst \ +- python/setup.py \ + python/test_requirements.txt + + # C extension support. + EXTRA_DIST += python/ovs/_json.c + +-PYFILES = $(ovs_pyfiles) python/ovs/dirs.py $(ovstest_pyfiles) $(ovs_pytests) ++PYFILES = $(ovs_pyfiles) python/ovs/dirs.py python/setup.py $(ovstest_pyfiles) $(ovs_pytests) + + EXTRA_DIST += $(PYFILES) + PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover) + + FLAKE8_PYFILES += \ +- $(filter-out python/ovs/compat/% python/ovs/dirs.py,$(PYFILES)) \ ++ $(filter-out python/ovs/compat/% python/ovs/dirs.py python/setup.py,$(PYFILES)) \ + python/ovs_build_helpers/__init__.py \ + python/ovs_build_helpers/extract_ofp_fields.py \ + python/ovs_build_helpers/nroff.py \ + python/ovs_build_helpers/soutil.py \ + python/ovs/dirs.py.template \ +- python/setup.py ++ python/setup.py.template + + nobase_pkgdata_DATA = $(ovs_pyfiles) $(ovstest_pyfiles) + ovs-install-data-local: +@@ -113,7 +112,7 @@ ovs-install-data-local: + rm python/ovs/dirs.py.tmp + + .PHONY: python-sdist +-python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py ++python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py python/setup.py + cd python/ && $(PYTHON3) -m build --sdist + + .PHONY: pypi-upload +@@ -129,8 +128,8 @@ ovs-uninstall-local: + ALL_LOCAL += $(srcdir)/python/ovs/version.py + $(srcdir)/python/ovs/version.py: config.status + $(AM_V_GEN)$(ro_shell) > $(@F).tmp && \ +- echo 'VERSION = "$(VERSION)"' >> $(@F).tmp && \ +- if cmp -s $(@F).tmp $@; then touch $@; rm $(@F).tmp; else mv $(@F).tmp $@; fi ++ echo 'VERSION = "$(VERSION)$(VERSION_SUFFIX)"' >> $(@F).tmp && \ ++ if cmp -s $(@F).tmp $@; then touch $@; else cp $(@F).tmp $@; fi; rm $(@F).tmp + + ALL_LOCAL += $(srcdir)/python/ovs/dirs.py + $(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template +@@ -147,6 +146,15 @@ $(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template + EXTRA_DIST += python/ovs/dirs.py.template + CLEANFILES += python/ovs/dirs.py + ++ALL_LOCAL += $(srcdir)/python/setup.py ++$(srcdir)/python/setup.py: python/setup.py.template config.status ++ $(AM_V_GEN)sed \ ++ -e 's,[@]VERSION[@],$(VERSION),g' \ ++ < $(srcdir)/python/setup.py.template > $(@F).tmp && \ ++ if cmp -s $(@F).tmp $@; then touch $@; else cp $(@F).tmp $@; fi; rm $(@F).tmp ++EXTRA_DIST += python/setup.py.template ++CLEANFILES += python/setup.py ++ + EXTRA_DIST += python/TODO.rst + + $(srcdir)/python/ovs/flow/ofp_fields.py: $(srcdir)/build-aux/gen_ofp_field_decoders include/openvswitch/meta-flow.h diff --git a/python/ovs/db/custom_index.py b/python/ovs/db/custom_index.py index 587caf5e3e..3fa03d3c95 100644 --- a/python/ovs/db/custom_index.py @@ -3538,6 +3850,48 @@ index f19ec386e8..d514e9be32 100644 ( "actions:meter(1),hash(l4(0))", [ +diff --git a/python/setup.py b/python/setup.py.template +similarity index 87% +rename from python/setup.py +rename to python/setup.py.template +index bcf832ce9b..e7d59f2ca3 100644 +--- a/python/setup.py ++++ b/python/setup.py.template +@@ -23,24 +23,16 @@ except ImportError: # Needed for setuptools < 59.0 + + import setuptools + +-VERSION = "unknown" +- +-try: +- # Try to set the version from the generated ovs/version.py +- exec(open("ovs/version.py").read()) +-except IOError: +- print("Ensure version.py is created by running make python/ovs/version.py", +- file=sys.stderr) +- sys.exit(-1) +- +-try: +- # Try to open generated ovs/dirs.py. However, in this case we +- # don't need to exec() +- open("ovs/dirs.py") +-except IOError: +- print("Ensure dirs.py is created by running make python/ovs/dirs.py", +- file=sys.stderr) +- sys.exit(-1) ++VERSION = "@VERSION@" ++ ++for x in ("version.py", "dirs.py"): ++ try: ++ # Try to open generated ovs/{version,dirs}.py ++ open(f"ovs/{x}") ++ except IOError: ++ print(f"Ensure {x} is created by running make python/ovs/{x}", ++ file=sys.stderr) ++ sys.exit(-1) + + ext_errors = (CCompilerError, ExecError, PlatformError) + if sys.platform == 'win32': diff --git a/python/test_requirements.txt b/python/test_requirements.txt index 5043c71e22..a1424506b6 100644 --- a/python/test_requirements.txt @@ -3548,6 +3902,18 @@ index 5043c71e22..a1424506b6 100644 pyftpdlib pyparsing pytest +diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in +index 5d24ebcda8..650a274bee 100644 +--- a/rhel/openvswitch-fedora.spec.in ++++ b/rhel/openvswitch-fedora.spec.in +@@ -178,6 +178,7 @@ This package provides IPsec tunneling support for OVS tunnels. + --disable-static \ + --enable-shared \ + --with-pkidir=%{_sharedstatedir}/openvswitch/pki \ ++ --with-version-suffix=-%{release} \ + PYTHON3=%{__python3} + + build-aux/dpdkstrip.py \ diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service index 49dc06e38c..558632320c 100644 --- a/rhel/usr_lib_systemd_system_ovsdb-server.service @@ -6047,8 +6413,60 @@ index 785014956e..2768c07400 100644 stderr_log], [0], [dnl 0 | module_0 | EMER | emergency 1 | module_0 | ERR | error +diff --git a/utilities/ovs-dpctl-top.in b/utilities/ovs-dpctl-top.in +index 2c1766eff5..ec57eccd66 100755 +--- a/utilities/ovs-dpctl-top.in ++++ b/utilities/ovs-dpctl-top.in +@@ -351,7 +351,7 @@ def args_get(): + # None is a special value indicating to read flows from stdin. + # This handles the case + # ovs-dpctl dump-flows | ovs-dpctl-flows.py +- parser.add_argument("-v", "--version", version="@VERSION@", ++ parser.add_argument("-v", "--version", version="@VERSION@@VERSION_SUFFIX@", + action="version", help="show version") + parser.add_argument("-f", "--flow-file", dest="flowFiles", default=None, + action="append", +diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in +index 7812a94ee8..d162227dc5 100644 +--- a/utilities/ovs-lib.in ++++ b/utilities/ovs-lib.in +@@ -70,7 +70,7 @@ ovs_ctl () { + esac + } + +-VERSION='@VERSION@' ++VERSION='@VERSION@@VERSION_SUFFIX@' + + DAEMON_CWD=/ + +diff --git a/utilities/ovs-parse-backtrace.in b/utilities/ovs-parse-backtrace.in +index f44f05cd1e..42f831eed5 100755 +--- a/utilities/ovs-parse-backtrace.in ++++ b/utilities/ovs-parse-backtrace.in +@@ -51,7 +51,7 @@ def addr2line(binary, addr): + + + def main(): +- parser = optparse.OptionParser(version='@VERSION@', ++ parser = optparse.OptionParser(version='@VERSION@@VERSION_SUFFIX@', + usage="usage: %prog [binary]", + description="""\ + Parses the output of ovs-appctl backtrace producing a more human readable +diff --git a/utilities/ovs-pcap.in b/utilities/ovs-pcap.in +index 6b5f63399e..d0ca947886 100755 +--- a/utilities/ovs-pcap.in ++++ b/utilities/ovs-pcap.in +@@ -85,7 +85,7 @@ if __name__ == "__main__": + if key in ['-h', '--help']: + usage() + elif key in ['-V', '--version']: +- print("ovs-pcap (Open vSwitch) @VERSION@") ++ print("ovs-pcap (Open vSwitch) @VERSION@@VERSION_SUFFIX@") + else: + sys.exit(0) + diff --git a/utilities/ovs-pki.in b/utilities/ovs-pki.in -index e0ba910f94..285018e41e 100755 +index e0ba910f94..d802354df5 100755 --- a/utilities/ovs-pki.in +++ b/utilities/ovs-pki.in @@ -57,6 +57,77 @@ FreeBSD|NetBSD|Darwin) @@ -6129,6 +6547,15 @@ index e0ba910f94..285018e41e 100755 for option; do # This option-parsing mechanism borrowed from a Autoconf-generated # configure script under the following license: +@@ -118,7 +189,7 @@ EOF + exit 0 + ;; + -V|--version) +- echo "ovs-pki (Open vSwitch) @VERSION@" ++ echo "ovs-pki (Open vSwitch) @VERSION@@VERSION_SUFFIX@" + exit 0 + ;; + --di*=*) @@ -466,14 +537,24 @@ CN = $cn [ v3_req ] subjectAltName = DNS:$cn @@ -6158,9 +6585,27 @@ index e0ba910f94..285018e41e 100755 -key "$1-privkey.pem" -out "$1-req.pem" 1>&3 2>&3 } diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in -index 4cbd9a5d31..eada803bb4 100755 +index 4cbd9a5d31..cb46e43ba8 100755 --- a/utilities/ovs-tcpdump.in +++ b/utilities/ovs-tcpdump.in +@@ -47,7 +47,7 @@ try: + from ovs.fatal_signal import add_hook + except Exception: + print("ERROR: Please install the correct Open vSwitch python support") +- print(" libraries (version @VERSION@).") ++ print(" libraries (version @VERSION@@VERSION_SUFFIX@).") + print(" Alternatively, check that your PYTHONPATH is pointing to") + print(" the correct location.") + sys.exit(1) +@@ -453,7 +453,7 @@ def main(): + if cur in ['-h', '--help']: + usage() + elif cur in ['-V', '--version']: +- print("ovs-tcpdump (Open vSwitch) @VERSION@") ++ print("ovs-tcpdump (Open vSwitch) @VERSION@@VERSION_SUFFIX@") + sys.exit(0) + elif cur in ['--db-sock']: + db_sock = nxt @@ -534,29 +534,19 @@ def main(): ovsdb.close_idl() @@ -6202,3 +6647,43 @@ index 4cbd9a5d31..eada803bb4 100755 if __name__ == '__main__': +diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in +index ede5448b49..2a1b08332d 100755 +--- a/utilities/ovs-tcpundump.in ++++ b/utilities/ovs-tcpundump.in +@@ -46,7 +46,7 @@ if __name__ == "__main__": + if key in ['-h', '--help']: + usage() + elif key in ['-V', '--version']: +- print("ovs-tcpundump (Open vSwitch) @VERSION@") ++ print("ovs-tcpundump (Open vSwitch) @VERSION@@VERSION_SUFFIX@") + sys.exit(0) + else: + sys.exit(0) +diff --git a/utilities/ovs-vlan-test.in b/utilities/ovs-vlan-test.in +index de3ae16862..3c15e2b135 100755 +--- a/utilities/ovs-vlan-test.in ++++ b/utilities/ovs-vlan-test.in +@@ -393,7 +393,7 @@ def main(): + usage() + return 0 + elif key in ['-V', '--version']: +- print_safe('ovs-vlan-test (Open vSwitch) @VERSION@') ++ print_safe('ovs-vlan-test (Open vSwitch) @VERSION@@VERSION_SUFFIX@') + return 0 + elif key in ['-s', '--server']: + server = True +diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c +index 95a65fcdcd..0352030fec 100644 +--- a/vswitchd/bridge.c ++++ b/vswitchd/bridge.c +@@ -3398,7 +3398,8 @@ bridge_run(void) + + vlog_enable_async(); + +- VLOG_INFO_ONCE("%s (Open vSwitch) %s", program_name, VERSION); ++ VLOG_INFO_ONCE("%s (Open vSwitch) %s", program_name, ++ VERSION VERSION_SUFFIX); + } + } + diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index 1a2daa6..32343e7 100644 --- a/SPECS/openvswitch3.3.spec +++ b/SPECS/openvswitch3.3.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.3.0 -Release: 37%{?dist} +Release: 40%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -421,7 +421,8 @@ ln -s ../configure --enable-ssl \ --with-pkidir=%{_sharedstatedir}/openvswitch/pki \ --enable-usdt-probes \ - --disable-afxdp + --disable-afxdp \ + --with-version-suffix=-%{release} make %{?_smp_mflags} popd pushd build-static @@ -441,7 +442,8 @@ PKG_CONFIG_PATH=%{_builddir}/dpdk-build/%{_lib}/pkgconfig \ %endif --with-pkidir=%{_sharedstatedir}/openvswitch/pki \ --enable-usdt-probes \ - --disable-afxdp + --disable-afxdp \ + --with-version-suffix=-%{release} make %{?_smp_mflags} popd @@ -767,6 +769,42 @@ exit 0 %endif %changelog +* Mon Jul 22 2024 Open vSwitch CI - 3.3.0-40 +- Merging upstream branch-3.3 [RH git: 62b757012a] + Commit list: + 59d80787ad netlink-notifier: Silence the UBsan's function pointer mismatch error. + bd133fcf6b Documentation: Update QEMU documentation URLs. + 6738b680ec match: Fix false-positive snprintf size warning. + 5bf4c0f09e util: Add non-NULL format assertion to xvasprintf. + 9cbd8804dd docs: Define Read the Docs configuration for Sphinx HTML parameters. + 6eca4d13c8 flow: Fix unaligned access to the ND target in miniflow_extract. + d2119feb01 dpif-netlink-rtnl: Fix netdev leak in out-of-tree tunnels probe. + 9c439c23e6 dpctl: Fix netdev reference leak in "show" command. + + +* Wed Jul 17 2024 Timothy Redaelli - 3.3.0-39 +- Use --with-version-suffix [RH git: 03cc07cae1] + + +* Wed Jul 17 2024 Timothy Redaelli - 3.3.0-38 +- rhel: Make the version, displayed to the user, customizable. [RH git: 470b5520a5] + Since on CentOS/RHEL the builds are based on stable branches and not on + tags for debugging purpose it's better to have the downstream version as + version so it's easier to know which commits are included in a build. + + This commit adds --with-version-suffix as ./configure option in + order to set an OVS version suffix that should be shown to the user via + ovs-vsctl -V and, so, also on database, on ovs-vsctl show and the other + utilities. + + --with-version-suffix is used in Fedora/CentOS/RHEL spec file in order to have + the version be aligned with the downstream one. + + Signed-off-by: Timothy Redaelli + Signed-off-by: Ilya Maximets + (cherry picked from commit 9e6d43ef32152527f7887d7f316a191adb5f338c) + + * Wed Jul 03 2024 Open vSwitch CI - 3.3.0-37 - Merging upstream branch-3.3 [RH git: 59364717e8] Commit list: