From 6c631a3133065727928f5b8f0fc5ac812984f385 Mon Sep 17 00:00:00 2001 From: Jenkins Automation Server Date: Feb 12 2021 21:41:19 +0000 Subject: Import openvswitch2.13-2.13.0-60 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 2776047..6435404 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -1,7 +1,16 @@ diff --git a/.cirrus.yml b/.cirrus.yml -index 1b32f55d65..9428164eee 100644 +index 1b32f55d65..263c2cd7ed 100644 --- a/.cirrus.yml +++ b/.cirrus.yml +@@ -3,7 +3,7 @@ freebsd_build_task: + freebsd_instance: + matrix: + image_family: freebsd-12-1-snap +- image_family: freebsd-11-3-snap ++ image_family: freebsd-11-4-snap + cpu: 4 + memory: 8G + @@ -16,6 +16,7 @@ freebsd_build_task: prepare_script: @@ -11,15 +20,13 @@ index 1b32f55d65..9428164eee 100644 configure_script: diff --git a/.travis.yml b/.travis.yml -index abd2a9117a..a59371c496 100644 +index abd2a9117a..1dca2045ce 100644 --- a/.travis.yml +++ b/.travis.yml -@@ -52,6 +52,18 @@ matrix: +@@ -51,6 +51,15 @@ matrix: + - os: osx compiler: clang env: OPTS="--disable-ssl" - -+matrix: -+ include: + - env: DEB_PACKAGE=1 + addons: + apt: @@ -29,10 +36,9 @@ index abd2a9117a..a59371c496 100644 + - fakeroot + - devscripts + - equivs -+ + script: ./.travis/${TRAVIS_OS_NAME}-build.sh $OPTS - notifications: diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh index bb47b3ee19..dd89eab5f8 100755 --- a/.travis/linux-build.sh @@ -230,10 +236,10 @@ index c6c6fd8bde..4bc5aef59d 100644 $ export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET $ cd $DPDK_DIR diff --git a/Documentation/topics/userspace-tso.rst b/Documentation/topics/userspace-tso.rst -index 94eddc0b2f..369d70691d 100644 +index 94eddc0b2f..f7b6b2639a 100644 --- a/Documentation/topics/userspace-tso.rst +++ b/Documentation/topics/userspace-tso.rst -@@ -91,21 +91,19 @@ The current OvS userspace `TSO` implementation supports flat and VLAN networks +@@ -91,20 +91,24 @@ The current OvS userspace `TSO` implementation supports flat and VLAN networks only (i.e. no support for `TSO` over tunneled connection [VxLAN, GRE, IPinIP, etc.]). @@ -258,10 +264,14 @@ index 94eddc0b2f..369d70691d 100644 - -This fix is expected to be included in the 19.11.1 release. When OVS migrates -to this DPDK release, this limitation can be removed. -- ++All kernel devices that use the raw socket interface (veth, for example) ++require the kernel commit 9d2f67e43b73 ("net/packet: fix packet drop as of ++virtio gso") in order to work properly. This commit was merged in upstream ++kernel 4.19-rc7, so make sure your kernel is either newer or contains the ++backport. + ~~~~~~~~~~~~~~~~~~ Performance Tuning - ~~~~~~~~~~~~~~~~~~ diff --git a/Makefile.am b/Makefile.am index b279303d18..27ef9e4b48 100644 --- a/Makefile.am @@ -276,12 +286,16 @@ index b279303d18..27ef9e4b48 100644 if WIN32 psep=";" diff --git a/NEWS b/NEWS -index dab94e924d..128db0f619 100644 +index dab94e924d..1a40ee19f4 100644 --- a/NEWS +++ b/NEWS -@@ -1,3 +1,14 @@ +@@ -1,3 +1,18 @@ +v2.13.2 - xx xxx xxxx +--------------------- ++ - IPsec: ++ * Fixed support of strongswan 5.7+ in ovs-ipsec-monitor. ++ - DPDK: ++ * Fixed support of 'net_virtio' devices. + +v2.13.1 - 30 Jul 2020 +--------------------- @@ -38313,7 +38327,7 @@ index 5289a70f6e..cf009f8264 100644 #define OVS_REQ_RDLOCK(...) __attribute__((shared_locks_required(__VA_ARGS__))) #define OVS_ACQ_RDLOCK(...) __attribute__((shared_lock_function(__VA_ARGS__))) diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in -index 37e3703245..1c185bbd85 100755 +index 37e3703245..b84608a55d 100755 --- a/ipsec/ovs-monitor-ipsec.in +++ b/ipsec/ovs-monitor-ipsec.in @@ -101,7 +101,7 @@ class XFRM(object): @@ -38334,7 +38348,30 @@ index 37e3703245..1c185bbd85 100755 if line == '': break a = line.split(" ") -@@ -246,7 +246,7 @@ conn prevent_unencrypted_vxlan +@@ -145,10 +145,18 @@ class StrongSwanHelper(object): + """This class does StrongSwan specific configurations.""" + + STRONGSWAN_CONF = """%s +-charon.plugins.kernel-netlink.set_proto_port_transport_sa = yes +-charon.plugins.kernel-netlink.xfrm_ack_expires = 10 +-charon.load_modular = yes +-charon.plugins.gcm.load = yes ++charon { ++ plugins { ++ kernel-netlink { ++ set_proto_port_transport_sa = yes ++ xfrm_ack_expires = 10 ++ } ++ gcm { ++ load = yes ++ } ++ } ++ load_modular = yes ++} + """ % (FILE_HEADER) + + CONF_HEADER = """%s +@@ -246,7 +254,7 @@ conn prevent_unencrypted_vxlan proc = subprocess.Popen([self.IPSEC, 'status'], stdout=subprocess.PIPE) while True: @@ -38343,7 +38380,7 @@ index 37e3703245..1c185bbd85 100755 if line == '': break tunnel_name = line.split(":") -@@ -340,7 +340,7 @@ conn prevent_unencrypted_vxlan +@@ -340,7 +348,7 @@ conn prevent_unencrypted_vxlan # about possibility of ovs-monitor-ipsec to block for each tunnel # while strongSwan sends IKE messages over Internet. conns_dict = self.get_active_conns() @@ -38352,7 +38389,7 @@ index 37e3703245..1c185bbd85 100755 tunnel = monitor.tunnels.get(ifname) for conn in conns: # IPsec "connection" names that we choose in strongswan -@@ -536,7 +536,7 @@ conn prevent_unencrypted_vxlan +@@ -536,7 +544,7 @@ conn prevent_unencrypted_vxlan # Delete old connections conns_dict = self.get_active_conns() @@ -38361,7 +38398,7 @@ index 37e3703245..1c185bbd85 100755 tunnel = monitor.tunnels.get(ifname) for conn in conns: -@@ -608,7 +608,7 @@ conn prevent_unencrypted_vxlan +@@ -608,7 +616,7 @@ conn prevent_unencrypted_vxlan proc = subprocess.Popen([self.IPSEC, 'status'], stdout=subprocess.PIPE) while True: @@ -38370,7 +38407,7 @@ index 37e3703245..1c185bbd85 100755 if line == '': break -@@ -989,7 +989,7 @@ class IPsecMonitor(object): +@@ -989,7 +997,7 @@ class IPsecMonitor(object): skb_mark = None is_valid = False @@ -38379,7 +38416,7 @@ index 37e3703245..1c185bbd85 100755 pki[0] = row.other_config.get("certificate") pki[1] = row.other_config.get("private_key") pki[2] = row.other_config.get("ca_cert") -@@ -1016,7 +1016,7 @@ class IPsecMonitor(object): +@@ -1016,7 +1024,7 @@ class IPsecMonitor(object): table.""" ifaces = set() @@ -38388,7 +38425,7 @@ index 37e3703245..1c185bbd85 100755 if not self.is_tunneling_type_supported(row.type): continue if not self.is_ipsec_required(row.options): -@@ -1047,7 +1047,7 @@ class IPsecMonitor(object): +@@ -1047,7 +1055,7 @@ class IPsecMonitor(object): return s = "" conns = self.ike_helper.get_active_conns() @@ -38397,7 +38434,7 @@ index 37e3703245..1c185bbd85 100755 s += tunnel.show(policies, securities, conns) unix_conn.reply(s) -@@ -1064,7 +1064,7 @@ class IPsecMonitor(object): +@@ -1064,7 +1072,7 @@ class IPsecMonitor(object): if self.ike_helper.config_global(self): needs_refresh = True @@ -38406,7 +38443,7 @@ index 37e3703245..1c185bbd85 100755 if tunnel.last_refreshed_version != tunnel.version: tunnel.last_refreshed_version = tunnel.version needs_refresh = True -@@ -1094,7 +1094,7 @@ class IPsecMonitor(object): +@@ -1094,7 +1102,7 @@ class IPsecMonitor(object): proc.wait() if proc.returncode: raise Exception(proc.stderr.read()) @@ -38416,7 +38453,7 @@ index 37e3703245..1c185bbd85 100755 raise Exception("No CN in the certificate subject.") except Exception as e: diff --git a/lib/classifier.c b/lib/classifier.c -index 0fad953213..f2c3497c2d 100644 +index 0fad953213..2a1d155dad 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -393,7 +393,9 @@ classifier_set_prefix_fields(struct classifier *cls, @@ -38455,7 +38492,15 @@ index 0fad953213..f2c3497c2d 100644 ctx->lookup_done = false; } -@@ -1531,8 +1531,10 @@ insert_subtable(struct classifier *cls, const struct minimask *mask) +@@ -1370,6 +1370,7 @@ cls_cursor_start(const struct classifier *cls, const struct cls_rule *target, + struct cls_cursor cursor; + struct cls_subtable *subtable; + ++ memset(&cursor, 0x0, sizeof cursor); + cursor.cls = cls; + cursor.target = target && !cls_rule_is_catchall(target) ? target : NULL; + cursor.version = version; +@@ -1531,8 +1532,10 @@ insert_subtable(struct classifier *cls, const struct minimask *mask) *CONST_CAST(uint8_t *, &subtable->n_indices) = index; for (i = 0; i < cls->n_tries; i++) { @@ -38468,7 +38513,7 @@ index 0fad953213..f2c3497c2d 100644 } /* Ports trie. */ -@@ -1575,11 +1577,17 @@ check_tries(struct trie_ctx trie_ctx[CLS_MAX_TRIES], unsigned int n_tries, +@@ -1575,11 +1578,17 @@ check_tries(struct trie_ctx trie_ctx[CLS_MAX_TRIES], unsigned int n_tries, * fields using the prefix tries. The trie checks are done only as * needed to avoid folding in additional bits to the wildcards mask. */ for (j = 0; j < n_tries; j++) { @@ -38490,7 +38535,7 @@ index 0fad953213..f2c3497c2d 100644 /* On-demand trie lookup. */ if (!ctx->lookup_done) { -@@ -1601,14 +1609,16 @@ check_tries(struct trie_ctx trie_ctx[CLS_MAX_TRIES], unsigned int n_tries, +@@ -1601,14 +1610,16 @@ check_tries(struct trie_ctx trie_ctx[CLS_MAX_TRIES], unsigned int n_tries, * than this subtable would otherwise. */ if (ctx->maskbits <= field_plen[j]) { /* Unwildcard the bits and skip the rest. */ @@ -38509,7 +38554,7 @@ index 0fad953213..f2c3497c2d 100644 return true; } } -@@ -2001,12 +2011,12 @@ static unsigned int +@@ -2001,12 +2012,12 @@ static unsigned int trie_lookup(const struct cls_trie *trie, const struct flow *flow, union trie_prefix *plens) { @@ -38524,7 +38569,7 @@ index 0fad953213..f2c3497c2d 100644 return trie_lookup_value(&trie->root, &((ovs_be32 *)flow)[mf->flow_be32ofs], &plens->be32, mf->n_bits); -@@ -2053,8 +2063,9 @@ minimask_get_prefix_len(const struct minimask *minimask, +@@ -2053,8 +2064,9 @@ minimask_get_prefix_len(const struct minimask *minimask, * happened to be zeros. */ static const ovs_be32 * @@ -38535,7 +38580,7 @@ index 0fad953213..f2c3497c2d 100644 size_t u64_ofs = mf->flow_be32ofs / 2; return (OVS_FORCE const ovs_be32 *)miniflow_get__(match->flow, u64_ofs) -@@ -2068,7 +2079,7 @@ static void +@@ -2068,7 +2080,7 @@ static void trie_insert(struct cls_trie *trie, const struct cls_rule *rule, int mlen) { trie_insert_prefix(&trie->root, @@ -38544,7 +38589,7 @@ index 0fad953213..f2c3497c2d 100644 } static void -@@ -2123,7 +2134,7 @@ static void +@@ -2123,7 +2135,7 @@ static void trie_remove(struct cls_trie *trie, const struct cls_rule *rule, int mlen) { trie_remove_prefix(&trie->root, @@ -38917,7 +38962,7 @@ index 8b62e6d968..80063b933d 100644 match_set_dl_dst_masked(match, value->mac, mask->mac); break; diff --git a/lib/meta-flow.xml b/lib/meta-flow.xml -index 90b405c737..2f9c5ee163 100644 +index 90b405c737..309dc59c5f 100644 --- a/lib/meta-flow.xml +++ b/lib/meta-flow.xml @@ -2566,8 +2566,8 @@ actions=clone(load:0->NXM_OF_IN_PORT[],output:123) @@ -38931,11 +38976,34 @@ index 90b405c737..2f9c5ee163 100644
rel (0x04)
+@@ -3841,18 +3841,18 @@ r r c c c. + + + diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c -index 6187129c00..7ab81864db 100644 +index 6187129c00..7051c31053 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c -@@ -152,6 +152,16 @@ typedef uint16_t dpdk_port_t; +@@ -152,9 +152,18 @@ typedef uint16_t dpdk_port_t; #define IF_NAME_SZ (PATH_MAX > IFNAMSIZ ? PATH_MAX : IFNAMSIZ) @@ -38951,8 +39019,11 @@ index 6187129c00..7ab81864db 100644 + static const struct rte_eth_conf port_conf = { .rxmode = { - .mq_mode = ETH_MQ_RX_RSS, -@@ -415,6 +425,7 @@ enum dpdk_hw_ol_features { +- .mq_mode = ETH_MQ_RX_RSS, + .split_hdr_size = 0, + .offloads = 0, + }, +@@ -415,6 +424,7 @@ enum dpdk_hw_ol_features { NETDEV_RX_HW_CRC_STRIP = 1 << 1, NETDEV_RX_HW_SCATTER = 1 << 2, NETDEV_TX_TSO_OFFLOAD = 1 << 3, @@ -38960,7 +39031,22 @@ index 6187129c00..7ab81864db 100644 }; /* -@@ -997,9 +1008,10 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int n_rxq, int n_txq) +@@ -975,6 +985,14 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int n_rxq, int n_txq) + + rte_eth_dev_info_get(dev->port_id, &info); + ++ /* As of DPDK 19.11, it is not allowed to set a mq_mode for ++ * virtio PMD driver. */ ++ if (!strcmp(info.driver_name, "net_virtio")) { ++ conf.rxmode.mq_mode = ETH_MQ_RX_NONE; ++ } else { ++ conf.rxmode.mq_mode = ETH_MQ_RX_RSS; ++ } ++ + /* As of DPDK 17.11.1 a few PMDs require to explicitly enable + * scatter to support jumbo RX. + * Setting scatter for the device is done after checking for +@@ -997,9 +1015,10 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev, int n_rxq, int n_txq) } if (dev->hw_ol_features & NETDEV_TX_TSO_OFFLOAD) { @@ -38974,7 +39060,7 @@ index 6187129c00..7ab81864db 100644 } /* Limit configured rss hash functions to only those supported -@@ -1100,12 +1112,10 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) +@@ -1100,12 +1119,10 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) struct rte_ether_addr eth_addr; int diag; int n_rxq, n_txq; @@ -38988,7 +39074,7 @@ index 6187129c00..7ab81864db 100644 rte_eth_dev_info_get(dev->port_id, &info); -@@ -1137,6 +1147,13 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) +@@ -1137,6 +1154,13 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) if ((info.tx_offload_capa & tx_tso_offload_capa) == tx_tso_offload_capa) { dev->hw_ol_features |= NETDEV_TX_TSO_OFFLOAD; @@ -39002,7 +39088,7 @@ index 6187129c00..7ab81864db 100644 } else { VLOG_WARN("%s: Tx TSO offload is not supported.", netdev_get_name(&dev->up)); -@@ -5110,7 +5127,11 @@ netdev_dpdk_reconfigure(struct netdev *netdev) +@@ -5110,7 +5134,11 @@ netdev_dpdk_reconfigure(struct netdev *netdev) if (dev->hw_ol_features & NETDEV_TX_TSO_OFFLOAD) { netdev->ol_flags |= NETDEV_TX_OFFLOAD_TCP_TSO; netdev->ol_flags |= NETDEV_TX_OFFLOAD_TCP_CKSUM; @@ -39014,7 +39100,7 @@ index 6187129c00..7ab81864db 100644 } dev->tx_q = netdev_dpdk_alloc_txq(netdev->n_txq); -@@ -5186,6 +5207,7 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev) +@@ -5186,6 +5214,7 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev) struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); int err; uint64_t vhost_flags = 0; @@ -39022,7 +39108,7 @@ index 6187129c00..7ab81864db 100644 bool zc_enabled; ovs_mutex_lock(&dev->mutex); -@@ -5251,17 +5273,24 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev) +@@ -5251,17 +5280,24 @@ netdev_dpdk_vhost_client_reconfigure(struct netdev *netdev) if (userspace_tso_enabled()) { netdev->ol_flags |= NETDEV_TX_OFFLOAD_TCP_TSO; netdev->ol_flags |= NETDEV_TX_OFFLOAD_TCP_CKSUM; @@ -40163,6 +40249,19 @@ index 51d656cba9..aee676d93e 100644 } /* Finds and returns the ofservice within 'mgr' that has the given +diff --git a/ofproto/ipfix-gen-entities b/ofproto/ipfix-gen-entities +index 0be719967d..d5abe9c2ed 100755 +--- a/ofproto/ipfix-gen-entities ++++ b/ofproto/ipfix-gen-entities +@@ -1,6 +1,6 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 + # +-# Copyright (C) 2012 Nicira, Inc. ++# Copyright (C) 2012, 2020 Nicira, Inc. + # + # Copying and distribution of this file, with or without modification, + # are permitted in any medium without royalty provided the copyright diff --git a/ofproto/ofproto-dpif-rid.h b/ofproto/ofproto-dpif-rid.h index 147ef9c333..97699cb905 100644 --- a/ofproto/ofproto-dpif-rid.h @@ -40298,6 +40397,19 @@ index 08830d8371..8594afad4a 100644 connmgr_send_flow_removed(connmgr, &fr); ovs_mutex_unlock(&ofproto_mutex); } +diff --git a/ovsdb/dot2pic b/ovsdb/dot2pic +index de67261ac6..2f858e19d5 100755 +--- a/ovsdb/dot2pic ++++ b/ovsdb/dot2pic +@@ -1,6 +1,6 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 + +-# Copyright (c) 2009, 2010, 2011, 2013, 2017 Nicira, Inc. ++# Copyright (c) 2009, 2010, 2011, 2013, 2017, 2020 Nicira, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. diff --git a/ovsdb/execution.c b/ovsdb/execution.c index e45f3d6796..3a0dad5d0a 100644 --- a/ovsdb/execution.c @@ -40320,6 +40432,19 @@ index e45f3d6796..3a0dad5d0a 100644 if (timeout_msec < 0) { error = ovsdb_syntax_error(timeout, NULL, "timeout must be nonnegative"); +diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc +index 406c293114..10d0c0c134 100755 +--- a/ovsdb/ovsdb-doc ++++ b/ovsdb/ovsdb-doc +@@ -1,6 +1,6 @@ +-#! /usr/bin/python ++#!/usr/bin/python3 + +-# Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc. ++# Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015, 2020 Nicira, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index b6957d7300..fd7891a729 100644 --- a/ovsdb/ovsdb-server.c @@ -40785,6 +40910,52 @@ index 7e62e90ae3..0372302af4 100644 ovsdb_error_destroy(error); } else { /* Permanent error. Transition to "completed" state to report +diff --git a/python/build/soutil.py b/python/build/soutil.py +index b8027af863..a658823028 100755 +--- a/python/build/soutil.py ++++ b/python/build/soutil.py +@@ -1,6 +1,6 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 + +-# Copyright (c) 2008, 2017 Nicira, Inc. ++# Copyright (c) 2008, 2017, 2020 Nicira, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. +diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in +index 7bc8c34b80..f6ec347c15 100644 +--- a/rhel/openvswitch-fedora.spec.in ++++ b/rhel/openvswitch-fedora.spec.in +@@ -318,18 +318,19 @@ exit 0 + %post + %if %{with libcapng} + if [ $1 -eq 1 ]; then +- sed -i 's:^#OVS_USER_ID=:OVS_USER_ID=:' /etc/sysconfig/openvswitch +- sed -i 's:\(.*su\).*:\1 openvswitch openvswitch:' %{_sysconfdir}/logrotate.d/openvswitch +- + %if %{with dpdk} +- sed -i \ +- 's@OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:hugetlbfs"@'\ +- /etc/sysconfig/openvswitch ++ %define gname hugetlbfs ++%else ++ %define gname openvswitch + %endif ++ sed -i \ ++ 's@^#OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:%{gname}"@'\ ++ %{_sysconfdir}/sysconfig/openvswitch ++ sed -i 's:\(.*su\).*:\1 openvswitch %{gname}:' %{_sysconfdir}/logrotate.d/openvswitch + +- # In the case of upgrade, this is not needed. +- chown -R openvswitch:openvswitch /etc/openvswitch +- chown -R openvswitch:openvswitch /var/log/openvswitch ++ # In the case of upgrade, this is not needed ++ chown -R openvswitch:openvswitch %{_sysconfdir}/openvswitch ++ chown -R openvswitch:%{gname} %{_localstatedir}/log/openvswitch + fi + %endif + diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in index c94f2f5358..15eec6d4c0 100644 --- a/rhel/openvswitch-kmod-fedora.spec.in @@ -40808,6 +40979,29 @@ index c94f2f5358..15eec6d4c0 100644 # For RHEL 7.2, 7.4, 7.6, 7.7, and 7.8 if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh +diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service +index 4c170c09b4..98338b9dfb 100644 +--- a/rhel/usr_lib_systemd_system_ovsdb-server.service ++++ b/rhel/usr_lib_systemd_system_ovsdb-server.service +@@ -11,10 +11,16 @@ PIDFile=/var/run/openvswitch/ovsdb-server.pid + Restart=on-failure + EnvironmentFile=/etc/openvswitch/default.conf + EnvironmentFile=-/etc/sysconfig/openvswitch ++EnvironmentFile=-/run/openvswitch.useropts ++ ++# Environment is reloaded for each Exec*, make sure to ++# remove openvswitch.useropts first to reload a fresh ++# OVS_USER_ID from default.conf or sysconfig. ++ExecStartPre=/usr/bin/rm -f /run/openvswitch.useropts ++ + ExecStartPre=-/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch +-ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch.useropts; /usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' ++ExecStartPre=/bin/sh -c '/usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' + ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' +-EnvironmentFile=-/run/openvswitch.useropts + ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ + --no-ovs-vswitchd --no-monitor --system-id=random \ + ${OVS_USER_OPT} \ diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh index a9b5cdd817..c70e135cd5 100644 --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh @@ -40834,6 +41028,26 @@ index a9b5cdd817..c70e135cd5 100644 # echo "rhel78" comp_ver=10 ver_offset=4 +diff --git a/selinux/openvswitch-custom.te.in b/selinux/openvswitch-custom.te.in +index 2adaf231fe..beb0ab0d66 100644 +--- a/selinux/openvswitch-custom.te.in ++++ b/selinux/openvswitch-custom.te.in +@@ -19,6 +19,7 @@ require { + type kernel_t; + type hostname_exec_t; + type modules_conf_t; ++ type modules_dep_t; + type modules_object_t; + type passwd_file_t; + type plymouth_exec_t; +@@ -121,6 +122,7 @@ allow openvswitch_load_module_t insmod_exec_t:file { execute execute_no_trans ge + allow openvswitch_load_module_t kernel_t:system module_request; + allow openvswitch_load_module_t modules_conf_t:dir { getattr open read search }; + allow openvswitch_load_module_t modules_conf_t:file { getattr open read }; ++allow openvswitch_load_module_t modules_dep_t:file { getattr map open read }; + allow openvswitch_load_module_t modules_object_t:file { map getattr open read }; + allow openvswitch_load_module_t modules_object_t:dir { getattr open read search }; + allow openvswitch_load_module_t openvswitch_load_module_exec_t:file { entrypoint }; diff --git a/tests/automake.mk b/tests/automake.mk index 9c7ebdce9b..3d90f97687 100644 --- a/tests/automake.mk @@ -41320,10 +41534,72 @@ index 3a0bd4579e..e0758e954c 100644 AT_BANNER([OVSDB - cluster tests]) diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at -index cc38d69c10..cc53da923b 100644 +index cc38d69c10..e5397ff99d 100644 --- a/tests/ovsdb-idl.at +++ b/tests/ovsdb-idl.at -@@ -954,6 +954,7 @@ AT_CHECK([sort stdout | uuidfilt], [0], +@@ -12,25 +12,6 @@ ovsdb_start_idltest () { + on_exit 'kill `cat ovsdb-server.pid`' + } + +-# ovsdb_cluster_start_idltest [REMOTE] [SCHEMA] +-# +-# Creates a database using SCHEMA (default: idltest.ovsschema) and +-# starts a database cluster listening on punix:socket and REMOTE (if +-# specified). +-ovsdb_cluster_start_idltest () { +- local n=$1 +- ovsdb-tool create-cluster s1.db $abs_srcdir/idltest.ovsschema unix:s1.raft || return $? +- cid=`ovsdb-tool db-cid s1.db` +- schema_name=`ovsdb-tool schema-name $abs_srcdir/idltest.ovsschema` +- for i in `seq 2 $n`; do +- ovsdb-tool join-cluster s$i.db $schema_name unix:s$i.raft unix:s1.raft || return $? +- done +- for i in `seq $n`; do +- ovsdb-server -vraft -vconsole:warn --detach --no-chdir --log-file=s$i.log --pidfile=s$i.pid --unixctl=s$i --remote=punix:s$i.ovsdb ${2:+--remote=$2} s$i.db || return $? +- done +- on_exit 'kill `cat s*.pid`' +-} +- + # ovsdb_cluster_leader [REMOTES] [DATABASE] + # + # Returns the leader of the DATABASE cluster. +@@ -48,6 +29,35 @@ ovsdb_cluster_leader () { + done + }]) + ++# OVSDB_CLUSTER_START_IDLTEST([N], [REMOTE]) ++# ++# Creates a clustered database using idltest.ovsschema and starts a database ++# cluster of N servers listening on punix:socket and REMOTE (if specified). ++m4_define([OVSDB_CLUSTER_START_IDLTEST], ++ [n=$1 ++ AT_CHECK([ovsdb-tool create-cluster s1.db \ ++ $abs_srcdir/idltest.ovsschema unix:s1.raft]) ++ cid=$(ovsdb-tool db-cid s1.db) ++ schema_name=$(ovsdb-tool schema-name $abs_srcdir/idltest.ovsschema) ++ for i in $(seq 2 $n); do ++ AT_CHECK([ovsdb-tool join-cluster s$i.db \ ++ $schema_name unix:s$i.raft unix:s1.raft]) ++ done ++ for i in $(seq $n); do ++ AT_CHECK([ovsdb-server -vraft -vconsole:warn --detach --no-chdir \ ++ --log-file=s$i.log --pidfile=s$i.pid --unixctl=s$i \ ++ --remote=punix:s$i.ovsdb \ ++ m4_if([$2], [], [], [--remote=$2]) s$i.db]) ++ done ++ on_exit 'kill $(cat s*.pid)' ++ ++ for i in $(seq $n); do ++ OVS_WAIT_UNTIL([ovs-appctl -t $(pwd)/s$i cluster/status ${schema_name} \ ++ | grep -q 'Status: cluster member']) ++ done ++]) ++ ++ + # OVSDB_CHECK_IDL_C(TITLE, [PRE-IDL-TXN], TRANSACTIONS, OUTPUT, [KEYWORDS], + # [FILTER]) + # +@@ -954,6 +964,7 @@ AT_CHECK([sort stdout | uuidfilt], [0], # Check that ovsdb-idl figured out that table link2 and column l2 are missing. AT_CHECK([grep ovsdb_idl stderr | sort], [0], [dnl @@ -41331,7 +41607,16 @@ index cc38d69c10..cc53da923b 100644 test-ovsdb|ovsdb_idl|idltest database lacks link2 table (database needs upgrade?) test-ovsdb|ovsdb_idl|idltest database lacks singleton table (database needs upgrade?) test-ovsdb|ovsdb_idl|link1 table in idltest database lacks l2 column (database needs upgrade?) -@@ -1814,3 +1815,59 @@ m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PY], +@@ -1798,7 +1809,7 @@ m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PY], + [AT_SETUP([$1 - Python3 (leader only)]) + AT_KEYWORDS([ovsdb server idl Python leader_only with tcp socket]) + m4_define([LPBK],[127.0.0.1]) +- AT_CHECK([ovsdb_cluster_start_idltest $2 "ptcp:0:"LPBK]) ++ OVSDB_CLUSTER_START_IDLTEST([$2], ["ptcp:0:"LPBK]) + PARSE_LISTENING_PORT([s2.log], [TCP_PORT_1]) + PARSE_LISTENING_PORT([s3.log], [TCP_PORT_2]) + PARSE_LISTENING_PORT([s1.log], [TCP_PORT_3]) +@@ -1814,3 +1825,59 @@ m4_define([OVSDB_CHECK_IDL_LEADER_ONLY_PY], OVSDB_CHECK_IDL_LEADER_ONLY_PY([Check Python IDL connects to leader], 3, ['remote']) OVSDB_CHECK_IDL_LEADER_ONLY_PY([Check Python IDL reconnects to leader], 3, ['remote' '+remotestop' 'remote']) @@ -41342,7 +41627,7 @@ index cc38d69c10..cc53da923b 100644 + [AT_SETUP([$1 - C - tcp]) + AT_KEYWORDS([ovsdb server idl positive tcp socket $5]) + m4_define([LPBK],[127.0.0.1]) -+ AT_CHECK([ovsdb_cluster_start_idltest $2 "ptcp:0:"LPBK]) ++ OVSDB_CLUSTER_START_IDLTEST([$2], ["ptcp:0:"LPBK]) + PARSE_LISTENING_PORT([s1.log], [TCP_PORT_1]) + PARSE_LISTENING_PORT([s2.log], [TCP_PORT_2]) + PARSE_LISTENING_PORT([s3.log], [TCP_PORT_3]) @@ -41391,6 +41676,42 @@ index cc38d69c10..cc53da923b 100644 +008: i=1 r=2 b=true s= u=<0> ia=[] ra=[] ba=[] sa=[] ua=[] uuid=<2> +009: done +]]) +diff --git a/tests/ovsdb-monitor-sort.py b/tests/ovsdb-monitor-sort.py +index 7d368a7afc..8a7976bdc7 100755 +--- a/tests/ovsdb-monitor-sort.py ++++ b/tests/ovsdb-monitor-sort.py +@@ -1,4 +1,17 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 ++# Copyright (c) 2020 VMware, Inc. ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at: ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. + + # Breaks lines read from stdin into groups using blank lines as + # group separators, then sorts lines within the groups for +diff --git a/tests/sendpkt.py b/tests/sendpkt.py +index 328ae2bc9d..49ac45275a 100755 +--- a/tests/sendpkt.py ++++ b/tests/sendpkt.py +@@ -1,6 +1,6 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 + +-# Copyright (c) 2018 VMware, Inc. ++# Copyright (c) 2018, 2020 VMware, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. diff --git a/tests/system-route.at b/tests/system-route.at new file mode 100644 index 0000000000..1714273e35 @@ -41471,6 +41792,66 @@ index 6d53d016de..2d98fad485 100644 } assert(n_rules <= cls->n_rules); } +diff --git a/tests/test-conntrack.c b/tests/test-conntrack.c +index f77ee75e38..da1ac63b6c 100644 +--- a/tests/test-conntrack.c ++++ b/tests/test-conntrack.c +@@ -82,6 +82,7 @@ ct_thread_main(void *aux_) + { + struct thread_aux *aux = aux_; + struct dp_packet_batch *pkt_batch; ++ struct dp_packet *pkt; + ovs_be16 dl_type; + size_t i; + long long now = time_msec(); +@@ -91,6 +92,9 @@ ct_thread_main(void *aux_) + for (i = 0; i < n_pkts; i += batch_size) { + conntrack_execute(ct, pkt_batch, dl_type, false, true, 0, NULL, NULL, + 0, 0, NULL, NULL, now); ++ DP_PACKET_BATCH_FOR_EACH (j, pkt, pkt_batch) { ++ pkt_metadata_init_conn(&pkt->md); ++ } + } + ovs_barrier_block(&barrier); + destroy_packets(pkt_batch); +diff --git a/tests/test-l7.py b/tests/test-l7.py +index d7854a1df3..32a77392c6 100755 +--- a/tests/test-l7.py ++++ b/tests/test-l7.py +@@ -1,5 +1,5 @@ +-#!/usr/bin/env python +-# Copyright (c) 2015, 2016 Nicira, Inc. ++#!/usr/bin/env python3 ++# Copyright (c) 2015, 2016, 2020 Nicira, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. +diff --git a/tests/uuidfilt.py b/tests/uuidfilt.py +index bc49aa480e..39679dd444 100755 +--- a/tests/uuidfilt.py ++++ b/tests/uuidfilt.py +@@ -1,4 +1,20 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 ++# Copyright (c) 2020 VMware, Inc. ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at: ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# Breaks lines read from stdin into groups using blank lines as ++# group separators, then sorts lines within the groups for ++# reproducibility. + + import re + import sys diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in index e55bfc2ed5..47f3c4629f 100755 --- a/utilities/bugtool/ovs-bugtool.in @@ -41645,11 +42026,32 @@ index e55bfc2ed5..47f3c4629f 100755 self.mtime = time.time() +diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py +index 248d22ab9a..c45788acd5 100755 +--- a/utilities/ovs-dev.py ++++ b/utilities/ovs-dev.py +@@ -1,5 +1,5 @@ +-#!/usr/bin/env python +-# Copyright (c) 2013, 2014, 2015, 2016 Nicira, Inc. ++#!/usr/bin/env python3 ++# Copyright (c) 2013, 2014, 2015, 2016, 2020 Nicira, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. diff --git a/utilities/ovs-dpctl-top.in b/utilities/ovs-dpctl-top.in -index f2cc3f7f2a..011cc64b74 100755 +index f2cc3f7f2a..fbe6e4f560 100755 --- a/utilities/ovs-dpctl-top.in +++ b/utilities/ovs-dpctl-top.in -@@ -592,7 +592,7 @@ def flows_read(ihdl, flow_db): +@@ -480,6 +480,8 @@ def elements_to_dict(elements): + """ Convert line to a hierarchy of dictionaries. """ + result = {} + for element in elements: ++ if (element == "eth()"): ++ continue + match = FIELDS_CMPND.search(element) + if (match): + key = match.group(1) +@@ -592,7 +594,7 @@ def flows_read(ihdl, flow_db): try: flow_db.flow_line_add(line) @@ -41658,7 +42060,7 @@ index f2cc3f7f2a..011cc64b74 100755 logging.error(arg) return flow_db -@@ -958,6 +958,9 @@ class FlowDB: +@@ -958,6 +960,9 @@ class FlowDB: change order of fields of the same flow. """ @@ -41668,7 +42070,7 @@ index f2cc3f7f2a..011cc64b74 100755 line = line.rstrip("\n") (fields, stats, _) = flow_line_split(line) -@@ -988,7 +991,7 @@ class FlowDB: +@@ -988,7 +993,7 @@ class FlowDB: self.flow_event(fields_dict, stats_old_dict, stats_dict) @@ -41677,7 +42079,7 @@ index f2cc3f7f2a..011cc64b74 100755 logging.error(arg) self._error_count += 1 raise -@@ -1192,7 +1195,7 @@ def flows_top(args): +@@ -1192,7 +1197,7 @@ def flows_top(args): flows_read(ihdl, flow_db) finally: ihdl.close() @@ -41686,7 +42088,7 @@ index f2cc3f7f2a..011cc64b74 100755 logging.critical(arg) break -@@ -1220,7 +1223,7 @@ def flows_top(args): +@@ -1220,7 +1225,7 @@ def flows_top(args): # repeat output for (count, line) in lines: @@ -41695,7 +42097,7 @@ index f2cc3f7f2a..011cc64b74 100755 def flows_script(args): -@@ -1249,7 +1252,7 @@ def flows_script(args): +@@ -1249,7 +1254,7 @@ def flows_script(args): render = Render(console_width, Render.FIELD_SELECT_SCRIPT) for line in render.format(flow_db): @@ -41704,6 +42106,18 @@ index f2cc3f7f2a..011cc64b74 100755 def main(): +diff --git a/utilities/ovs-pipegen.py b/utilities/ovs-pipegen.py +index ee5797221c..a3b6a661de 100755 +--- a/utilities/ovs-pipegen.py ++++ b/utilities/ovs-pipegen.py +@@ -1,5 +1,5 @@ +-#! /usr/bin/env python +-# Copyright (c) 2013, 2014, 2015 Nicira, Inc. ++#! /usr/bin/env python3 ++# Copyright (c) 2013, 2014, 2015, 2020 Nicira, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index bd3972636e..37cc72d401 100644 --- a/utilities/ovs-vsctl.c @@ -41742,3 +42156,42 @@ index e591c26a6c..ce348b9d16 100644 } } +diff --git a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update +index e7404e3b00..b8db881949 100755 +--- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update ++++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update +@@ -1,10 +1,10 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # xapi plugin script to update the cache of configuration items in the + # ovs-vswitchd configuration that are managed in the xapi database when + # integrated with Citrix management tools. + +-# Copyright (C) 2009, 2010, 2011, 2012, 2013 Nicira, Inc. ++# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2020 Nicira, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. +diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure +index a82043fb5b..9c20725de2 100755 +--- a/xenserver/opt_xensource_libexec_interface-reconfigure ++++ b/xenserver/opt_xensource_libexec_interface-reconfigure +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Copyright (c) 2008,2009 Citrix Systems, Inc. + # +diff --git a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync +index cf89600253..bff85464ba 100755 +--- a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync ++++ b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync +@@ -1,5 +1,5 @@ +-#! /usr/bin/env python +-# Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc. ++#!/usr/bin/env python3 ++# Copyright (c) 2009, 2010, 2011, 2012, 2013, 2020 Nicira, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index ca8c88b..c9a5805 100644 --- a/SPECS/openvswitch2.13.spec +++ b/SPECS/openvswitch2.13.spec @@ -59,7 +59,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.13.0 -Release: 57%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 60%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -697,6 +697,18 @@ exit 0 %endif %changelog +* Wed Sep 16 2020 Open vSwitch CI - 2.13.0-60 +- Merging upstream branch-2.13 + [38d21cf4eb02e273ef28b46e63bcf877d5a672ea] + +* Thu Sep 10 2020 Open vSwitch CI - 2.13.0-59 +- Merging upstream branch-2.13 + [4fbcdeb187628b2eedc607f45b70fdff68f7ea26] + +* Thu Aug 27 2020 Open vSwitch CI - 2.13.0-58 +- Merging upstream branch-2.13 + [d5817ddabf270b2fcfd9694746b382a0d040727c] + * Wed Aug 26 2020 Open vSwitch CI - 2.13.0-57 - Merging upstream branch-2.13 [2fe3a06bffcd907f8f6561ec0e56963de9766c97]