From b69d2a1ec316105298aa399b4c57558cbebb8d8f Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Aug 05 2022 01:25:35 +0000 Subject: Import openvswitch2.13-2.13.0-194 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index 5dd58d2..b8c1bc3 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -83386,7 +83386,7 @@ index d393aab5e3..cf099658ad 100644 } else { atomic_count_set(&pmd->pmd_overloaded, 0); diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c -index 5b5c96d727..805f1d31f3 100644 +index 5b5c96d727..b3eabef4f5 100644 --- a/lib/dpif-netlink.c +++ b/lib/dpif-netlink.c @@ -56,6 +56,7 @@ @@ -83405,6 +83405,15 @@ index 5b5c96d727..805f1d31f3 100644 request.dp_ifindex = dpif->dp_ifindex; request.user_features = dpif->user_features | new_features; +@@ -908,7 +910,7 @@ dpif_netlink_port_add_compat(struct dpif_netlink *dpif, struct netdev *netdev, + + ext_ofs = nl_msg_start_nested(&options, OVS_TUNNEL_ATTR_EXTENSION); + for (i = 0; i < 32; i++) { +- if (tnl_cfg->exts & (1 << i)) { ++ if (tnl_cfg->exts & (UINT32_C(1) << i)) { + nl_msg_put_flag(&options, i); + } + } @@ -1874,6 +1876,9 @@ dpif_netlink_operate__(struct dpif_netlink *dpif, aux->txn.reply = &aux->reply; } @@ -87444,6 +87453,52 @@ index 9f12ce3206..6ad6d3a54e 100644 const struct ovsdb_idl_row *ovsdb_idl_track_get_first( const struct ovsdb_idl *, const struct ovsdb_idl_table_class *); const struct ovsdb_idl_row *ovsdb_idl_track_get_next(const struct ovsdb_idl_row *); +diff --git a/lib/packets.c b/lib/packets.c +index 9d7cc50241..4f9091e520 100644 +--- a/lib/packets.c ++++ b/lib/packets.c +@@ -1010,7 +1010,7 @@ packet_set_ipv4_addr(struct dp_packet *packet, + * + * This function assumes that L3 and L4 offsets are set in the packet. */ + static bool +-packet_rh_present(struct dp_packet *packet, uint8_t *nexthdr) ++packet_rh_present(struct dp_packet *packet, uint8_t *nexthdr, bool *first_frag) + { + const struct ovs_16aligned_ip6_hdr *nh; + size_t len; +@@ -1060,6 +1060,8 @@ packet_rh_present(struct dp_packet *packet, uint8_t *nexthdr) + const struct ovs_16aligned_ip6_frag *frag_hdr + = ALIGNED_CAST(struct ovs_16aligned_ip6_frag *, data); + ++ *first_frag = !(frag_hdr->ip6f_offlg & IP6F_OFF_MASK) && ++ (frag_hdr->ip6f_offlg & IP6F_MORE_FRAG); + *nexthdr = frag_hdr->ip6f_nxt; + len = sizeof *frag_hdr; + } else if (*nexthdr == IPPROTO_ROUTING) { +@@ -1190,18 +1192,20 @@ packet_set_ipv6(struct dp_packet *packet, const struct in6_addr *src, + uint8_t key_hl) + { + struct ovs_16aligned_ip6_hdr *nh = dp_packet_l3(packet); ++ bool recalc_csum = true; + uint8_t proto = 0; + bool rh_present; + +- rh_present = packet_rh_present(packet, &proto); ++ rh_present = packet_rh_present(packet, &proto, &recalc_csum); + + if (memcmp(&nh->ip6_src, src, sizeof(ovs_be32[4]))) { +- packet_set_ipv6_addr(packet, proto, nh->ip6_src.be32, src, true); ++ packet_set_ipv6_addr(packet, proto, nh->ip6_src.be32, ++ src, recalc_csum); + } + + if (memcmp(&nh->ip6_dst, dst, sizeof(ovs_be32[4]))) { + packet_set_ipv6_addr(packet, proto, nh->ip6_dst.be32, dst, +- !rh_present); ++ !rh_present && recalc_csum); + } + + packet_set_ipv6_tc(&nh->ip6_flow, key_tc); diff --git a/lib/pcap-file.c b/lib/pcap-file.c index f0cac8e0fa..7f5561f827 100644 --- a/lib/pcap-file.c @@ -92280,7 +92335,7 @@ index 9d5b5cffd0..45c9587eeb 100644 def ovs_vsctl_add_bridge(bridge): diff --git a/python/setup.py b/python/setup.py -index b7252800c1..cfe01763f3 100644 +index b7252800c1..f6eb777f9e 100644 --- a/python/setup.py +++ b/python/setup.py @@ -10,8 +10,6 @@ @@ -92317,6 +92372,15 @@ index b7252800c1..cfe01763f3 100644 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', +@@ -97,6 +102,6 @@ except BuildFailed: + print("Retrying the build without the C extension.") + print("*" * 75) + +- del(setup_args['cmdclass']) +- del(setup_args['ext_modules']) ++ del setup_args['cmdclass'] ++ del setup_args['ext_modules'] + setuptools.setup(**setup_args) diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 7bc8c34b80..39800400b6 100644 --- a/rhel/openvswitch-fedora.spec.in @@ -95877,10 +95941,52 @@ index 0000000000..1714273e35 +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP diff --git a/tests/system-traffic.at b/tests/system-traffic.at -index 4a39c929c2..b2ed1907e6 100644 +index 4a39c929c2..ccabb517f2 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at -@@ -258,6 +258,52 @@ NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PI +@@ -192,6 +192,41 @@ NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00:1::2 | FORMAT_PI + OVS_TRAFFIC_VSWITCHD_STOP + AT_CLEANUP + ++AT_SETUP([datapath - ping6 between two ports with header modify]) ++OVS_TRAFFIC_VSWITCHD_START() ++ ++AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) ++ ++ADD_NAMESPACES(at_ns0, at_ns1) ++ ++ADD_VETH(p0, at_ns0, br0, "fc00::1/96", e4:11:22:33:44:55) ++ADD_VETH(p1, at_ns1, br0, "fc00::2/96", e4:11:22:33:44:54) ++NS_CHECK_EXEC([at_ns0], [ip -6 neigh add fc00::3 lladdr e4:11:22:33:44:54 dev p0]) ++NS_CHECK_EXEC([at_ns0], [ip -6 neigh add fc00::2 lladdr e4:11:22:33:44:54 dev p0]) ++NS_CHECK_EXEC([at_ns0], [ip -6 neigh add fc00::1 lladdr e4:11:22:33:44:55 dev p0]) ++ ++dnl Linux seems to take a little time to get its IPv6 stack in order. Without ++dnl waiting, we get occasional failures due to the following error: ++dnl "connect: Cannot assign requested address" ++OVS_WAIT_UNTIL([ip netns exec at_ns0 ping6 -c 1 fc00::2]) ++ ++AT_CHECK([ovs-ofctl del-flows -OOpenFlow15 br0]) ++AT_CHECK([ovs-ofctl add-flow -OOpenFlow15 br0 in_port=ovs-p0,ipv6,ipv6_dst=fc00::3,ipv6_src=fc00::1,actions=set_field:fc00::2-\>ipv6_dst,ovs-p1]) ++AT_CHECK([ovs-ofctl add-flow -OOpenFlow15 br0 in_port=ovs-p1,ipv6,ipv6_dst=fc00::1,ipv6_src=fc00::2,actions=set_field:fc00::3-\>ipv6_src,ovs-p0]) ++ ++NS_CHECK_EXEC([at_ns0], [ping6 -q -c 3 -i 0.3 -w 2 fc00::3 | FORMAT_PING], [0], [dnl ++3 packets transmitted, 3 received, 0% packet loss, time 0ms ++]) ++NS_CHECK_EXEC([at_ns0], [ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00::3 | FORMAT_PING], [0], [dnl ++3 packets transmitted, 3 received, 0% packet loss, time 0ms ++]) ++NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00::3 | FORMAT_PING], [0], [dnl ++3 packets transmitted, 3 received, 0% packet loss, time 0ms ++]) ++ ++OVS_TRAFFIC_VSWITCHD_STOP ++AT_CLEANUP ++ + AT_SETUP([datapath - ping over bond]) + OVS_TRAFFIC_VSWITCHD_START() + +@@ -258,6 +293,52 @@ NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PI OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP @@ -95933,7 +96039,7 @@ index 4a39c929c2..b2ed1907e6 100644 AT_SETUP([datapath - ping over vxlan6 tunnel]) OVS_CHECK_VXLAN_UDP6ZEROCSUM() -@@ -574,6 +620,60 @@ NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PI +@@ -574,6 +655,60 @@ NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.100 | FORMAT_PI OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP @@ -95994,7 +96100,7 @@ index 4a39c929c2..b2ed1907e6 100644 AT_SETUP([datapath - flow resume with geneve tun_metadata]) OVS_CHECK_GENEVE() -@@ -611,6 +711,16 @@ NS_CHECK_EXEC([at_ns0], [ping -q -c 3 10.1.1.100 | FORMAT_PING], [0], [dnl +@@ -611,6 +746,16 @@ NS_CHECK_EXEC([at_ns0], [ping -q -c 3 10.1.1.100 | FORMAT_PING], [0], [dnl 3 packets transmitted, 3 received, 0% packet loss, time 0ms ]) @@ -96011,7 +96117,7 @@ index 4a39c929c2..b2ed1907e6 100644 OVS_APP_EXIT_AND_WAIT([ovs-ofctl]) OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP -@@ -1925,6 +2035,111 @@ tcp,orig=(src=10.1.1.3,dst=10.1.1.4,sport=,dport=),reply=(src= +@@ -1925,6 +2070,111 @@ tcp,orig=(src=10.1.1.3,dst=10.1.1.4,sport=,dport=),reply=(src= OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP @@ -96123,7 +96229,7 @@ index 4a39c929c2..b2ed1907e6 100644 AT_SETUP([conntrack - multiple bridges]) CHECK_CONNTRACK() OVS_TRAFFIC_VSWITCHD_START( -@@ -2328,6 +2543,44 @@ NXST_FLOW reply: +@@ -2328,6 +2578,44 @@ NXST_FLOW reply: table=1, priority=100,ct_state=+est+trk,in_port=1 actions=output:2 ]) @@ -96168,7 +96274,7 @@ index 4a39c929c2..b2ed1907e6 100644 OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP -@@ -3220,6 +3473,46 @@ NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING +@@ -3220,6 +3508,46 @@ NS_CHECK_EXEC([at_ns0], [ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00::2 | FORMAT_PING OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP @@ -96215,7 +96321,7 @@ index 4a39c929c2..b2ed1907e6 100644 AT_SETUP([conntrack - resubmit to ct multiple times]) CHECK_CONNTRACK() -@@ -3356,15 +3649,15 @@ action=normal +@@ -3356,15 +3684,15 @@ action=normal AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt]) @@ -96234,7 +96340,7 @@ index 4a39c929c2..b2ed1907e6 100644 "1616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161610a, actions=ct(table=1)"]) AT_CHECK([ovs-appctl dpctl/dump-flows | head -2 | tail -1 | grep -q -e ["]udp[(]src=5001["]]) -@@ -4379,6 +4672,52 @@ tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=,dport=),reply=(src= +@@ -4379,6 +4707,52 @@ tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=,dport=),reply=(src= OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP @@ -96287,7 +96393,7 @@ index 4a39c929c2..b2ed1907e6 100644 AT_SETUP([conntrack - simple DNAT]) CHECK_CONNTRACK() CHECK_CONNTRACK_NAT() -@@ -4434,6 +4773,41 @@ tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=,dport=),reply=(src= +@@ -4434,6 +4808,41 @@ tcp,orig=(src=10.1.1.1,dst=10.1.1.2,sport=,dport=),reply=(src= OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP @@ -96329,7 +96435,7 @@ index 4a39c929c2..b2ed1907e6 100644 AT_SETUP([conntrack - more complex DNAT]) CHECK_CONNTRACK() CHECK_CONNTRACK_NAT() -@@ -5628,7 +6002,7 @@ on_exit 'ovs-appctl revalidator/purge' +@@ -5628,7 +6037,7 @@ on_exit 'ovs-appctl revalidator/purge' on_exit 'ovs-appctl dpif/dump-flows br0' dnl Should work with the virtual IP address through NAT @@ -96338,7 +96444,7 @@ index 4a39c929c2..b2ed1907e6 100644 echo Request $i NS_CHECK_EXEC([at_ns1], [wget 10.1.1.64 -t 5 -T 1 --retry-connrefused -v -o wget$i.log]) done -@@ -5873,6 +6247,96 @@ ovs-appctl dpif/dump-flows br0 +@@ -5873,6 +6282,96 @@ ovs-appctl dpif/dump-flows br0 OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP @@ -97418,7 +97524,7 @@ index b1a4be36bb..c4845956ca 100644 idltest_simple3_index_destroy_row(equal); diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py -index 1b94b79a07..123f89f081 100644 +index 1b94b79a07..01927f1851 100644 --- a/tests/test-ovsdb.py +++ b/tests/test-ovsdb.py @@ -28,6 +28,7 @@ import ovs.util @@ -97647,6 +97753,15 @@ index 1b94b79a07..123f89f081 100644 else: sys.stderr.write("unknown command %s\n" % name) sys.exit(1) +@@ -545,7 +620,7 @@ def update_condition(idl, commands): + commands = commands[len("condition "):].split(";") + for command in commands: + command = command.split(" ") +- if(len(command) != 2): ++ if len(command) != 2: + sys.stderr.write("Error parsing condition %s\n" % command) + sys.exit(1) + @@ -616,7 +691,8 @@ def do_idl(schema_file, remote, *commands): def mock_notify(event, row, updates=None): output = "%03d: " % step @@ -98163,7 +98278,7 @@ index e2e22c39ae..f7aa1418d8 100644 include utilities/bugtool/automake.mk diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in -index e55bfc2ed5..987d211069 100755 +index e55bfc2ed5..7fa14986aa 100755 --- a/utilities/bugtool/ovs-bugtool.in +++ b/utilities/bugtool/ovs-bugtool.in @@ -33,8 +33,7 @@ @@ -98298,6 +98413,15 @@ index e55bfc2ed5..987d211069 100755 def getBoolAttr(el, attr, default=False): ret = default +@@ -952,7 +954,7 @@ def load_plugins(just_capabilities=False, filter=None): + filters = [] + else: + filters = filters_tmp.split(',') +- if not(filter is None or filter in filters): ++ if not (filter is None or filter in filters): + continue + if el.tagName == "files": + newest_first = getBoolAttr(el, 'newest_first') @@ -1037,7 +1039,7 @@ def make_tar(subdir, suffix, output_fd, output_file): s = os.stat(v['filename']) ti.mtime = s.st_mtime diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index f311e63..9972f48 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: 193%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 194%{?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 @@ -715,6 +715,14 @@ exit 0 %endif %changelog +* Thu Aug 04 2022 Open vSwitch CI - 2.13.0-194 +- Merging upstream branch-2.13 [RH git: 7d779052a1] + Commit list: + fff104f8fb python: Fix E275 missing whitespace after keyword. + c58feeb68d dpif-netlink: Fix incorrect bit shift in compat mode. + 83d2026c56 packets: Re-calculate IPv6 checksum only for first frag upon modify. + + * Fri Jul 29 2022 Open vSwitch CI - 2.13.0-193 - Merging upstream branch-2.13 [RH git: 91ba12ea05] Commit list: