diff --git a/SOURCES/openvswitch-3.3.0.patch b/SOURCES/openvswitch-3.3.0.patch index 192a342..6897645 100644 --- a/SOURCES/openvswitch-3.3.0.patch +++ b/SOURCES/openvswitch-3.3.0.patch @@ -230,10 +230,10 @@ index c1229870bb..45e6202c52 100644 include/sparse/bits/floatn.h \ diff --git a/include/sparse/immintrin.h b/include/sparse/immintrin.h new file mode 100644 -index 0000000000..dd742be9f5 +index 0000000000..9a23d7f746 --- /dev/null +++ b/include/sparse/immintrin.h -@@ -0,0 +1,30 @@ +@@ -0,0 +1,34 @@ +/* Copyright (c) 2024 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); @@ -262,6 +262,10 @@ index 0000000000..dd742be9f5 +#define _KEYLOCKERINTRIN_H_INCLUDED +#define __AVX512FP16INTRIN_H_INCLUDED +#define __AVX512FP16VLINTRIN_H_INCLUDED ++/* GCC >=14 changed the '__AVX512FP16INTRIN_H_INCLUDED' to have only single ++ * underscore. We need both to keep compatibility between various GCC ++ * versions. */ ++#define _AVX512FP16INTRIN_H_INCLUDED + +#include_next diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in @@ -468,6 +472,58 @@ index 46e24d204d..99ff9b3693 100644 dp_netdev_input__(pmd, packets, true, 0); } +diff --git a/lib/hash.c b/lib/hash.c +index c722f3c3cc..3d574de9b4 100644 +--- a/lib/hash.c ++++ b/lib/hash.c +@@ -29,15 +29,16 @@ hash_3words(uint32_t a, uint32_t b, uint32_t c) + uint32_t + hash_bytes(const void *p_, size_t n, uint32_t basis) + { +- const uint32_t *p = p_; ++ const uint8_t *p = p_; + size_t orig_n = n; + uint32_t hash; + + hash = basis; + while (n >= 4) { +- hash = hash_add(hash, get_unaligned_u32(p)); ++ hash = hash_add(hash, ++ get_unaligned_u32(ALIGNED_CAST(const uint32_t *, p))); + n -= 4; +- p += 1; ++ p += 4; + } + + if (n) { +diff --git a/lib/jhash.c b/lib/jhash.c +index c59b51b611..a8e3f457b9 100644 +--- a/lib/jhash.c ++++ b/lib/jhash.c +@@ -96,18 +96,18 @@ jhash_words(const uint32_t *p, size_t n, uint32_t basis) + uint32_t + jhash_bytes(const void *p_, size_t n, uint32_t basis) + { +- const uint32_t *p = p_; ++ const uint8_t *p = p_; + uint32_t a, b, c; + + a = b = c = 0xdeadbeef + n + basis; + + while (n >= 12) { +- a += get_unaligned_u32(p); +- b += get_unaligned_u32(p + 1); +- c += get_unaligned_u32(p + 2); ++ a += get_unaligned_u32(ALIGNED_CAST(const uint32_t *, p)); ++ b += get_unaligned_u32(ALIGNED_CAST(const uint32_t *, p + 4)); ++ c += get_unaligned_u32(ALIGNED_CAST(const uint32_t *, p + 8)); + jhash_mix(&a, &b, &c); + n -= 12; +- p += 3; ++ p += 12; + } + + if (n) { diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 45f61930d4..9249b9e9c6 100644 --- a/lib/netdev-dpdk.c @@ -1164,10 +1220,27 @@ index cfdf44f854..c31869a4c7 100644 /* Updates 'bond''s overall configuration to 's'. * diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c -index b86e7fe07e..87506aa785 100644 +index b86e7fe07e..e43d9f88c9 100644 --- a/ofproto/ofproto-dpif-trace.c +++ b/ofproto/ofproto-dpif-trace.c -@@ -845,17 +845,35 @@ ofproto_trace(struct ofproto_dpif *ofproto, const struct flow *flow, +@@ -102,7 +102,7 @@ oftrace_add_recirc_node(struct ovs_list *recirc_queue, + node->flow = *flow; + node->flow.recirc_id = recirc_id; + node->flow.ct_zone = zone; +- node->nat_act = ofn; ++ node->nat_act = ofn ? xmemdup(ofn, sizeof *ofn) : NULL; + node->packet = packet ? dp_packet_clone(packet) : NULL; + + return true; +@@ -113,6 +113,7 @@ oftrace_recirc_node_destroy(struct oftrace_recirc_node *node) + { + if (node) { + recirc_free_id(node->recirc_id); ++ free(node->nat_act); + dp_packet_delete(node->packet); + free(node); + } +@@ -845,17 +846,35 @@ ofproto_trace(struct ofproto_dpif *ofproto, const struct flow *flow, bool names) { struct ovs_list recirc_queue = OVS_LIST_INITIALIZER(&recirc_queue); @@ -1203,6 +1276,19 @@ index b86e7fe07e..87506aa785 100644 } void +diff --git a/ofproto/ofproto-dpif-trace.h b/ofproto/ofproto-dpif-trace.h +index f579a5ca46..f023b10cdf 100644 +--- a/ofproto/ofproto-dpif-trace.h ++++ b/ofproto/ofproto-dpif-trace.h +@@ -73,7 +73,7 @@ struct oftrace_recirc_node { + uint32_t recirc_id; + struct flow flow; + struct dp_packet *packet; +- const struct ofpact_nat *nat_act; ++ struct ofpact_nat *nat_act; + }; + + /* A node within a next_ct_states list. */ diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index b5cbeed878..a046f8a339 100644 --- a/ofproto/ofproto-dpif-upcall.c @@ -2173,7 +2259,7 @@ index 55296e5593..0040a50b36 100644 AT_CHECK([ diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at -index e305e7b9cd..3eaccb13a6 100644 +index e305e7b9cd..0b23fd6c5e 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -547,6 +547,23 @@ ovs-appctl time/warp 1000 100 @@ -2200,7 +2286,36 @@ index e305e7b9cd..3eaccb13a6 100644 OVS_VSWITCHD_STOP() AT_CLEANUP -@@ -6178,6 +6195,57 @@ AT_CHECK([test 1 = `$PYTHON3 "$top_srcdir/utilities/ovs-pcap.in" p2-tx.pcap | wc +@@ -930,6 +947,28 @@ AT_CHECK([tail -1 stdout], [0], + OVS_VSWITCHD_STOP + AT_CLEANUP + ++AT_SETUP([ofproto-dpif - group with ct and dnat recirculation in action list]) ++OVS_VSWITCHD_START ++add_of_ports br0 1 10 ++AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 \ ++ 'group_id=1234,type=all,bucket=ct(nat(dst=10.10.10.7:80),commit,table=2)']) ++AT_DATA([flows.txt], [dnl ++table=0 ip,ct_state=-trk actions=group:1234 ++table=2 ip,ct_state=+trk actions=output:10 ++]) ++AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt]) ++AT_CHECK([ovs-appctl ofproto/trace br0 ' ++ in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800, ++ nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,nw_frag=no, ++ icmp_type=8,icmp_code=0 ++'], [0], [stdout]) ++AT_CHECK([grep 'Datapath actions' stdout], [0], [dnl ++Datapath actions: ct(commit,nat(dst=10.10.10.7:80)),recirc(0x1) ++Datapath actions: 10 ++]) ++OVS_VSWITCHD_STOP ++AT_CLEANUP ++ + AT_SETUP([ofproto-dpif - group actions have no effect afterwards]) + OVS_VSWITCHD_START + add_of_ports br0 1 10 +@@ -6178,6 +6217,57 @@ AT_CHECK([test 1 = `$PYTHON3 "$top_srcdir/utilities/ovs-pcap.in" p2-tx.pcap | wc OVS_VSWITCHD_STOP AT_CLEANUP @@ -2258,7 +2373,7 @@ index e305e7b9cd..3eaccb13a6 100644 AT_SETUP([ofproto-dpif - continuation with patch port]) AT_KEYWORDS([continuations pause resume]) OVS_VSWITCHD_START( -@@ -7653,12 +7721,14 @@ dummy@ovs-dummy: hit:0 missed:0 +@@ -7653,12 +7743,14 @@ dummy@ovs-dummy: hit:0 missed:0 vm1 5/3: (dummy: ifindex=2011) ]) @@ -2276,7 +2391,7 @@ index e305e7b9cd..3eaccb13a6 100644 dnl Prime ARP Cache for 1.1.2.92 AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)']) -@@ -7669,10 +7739,13 @@ ovs-vsctl \ +@@ -7669,10 +7761,13 @@ ovs-vsctl \ --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" agent=127.0.0.1 \ header=128 sampling=1 polling=0 diff --git a/SPECS/openvswitch3.3.spec b/SPECS/openvswitch3.3.spec index 463cb51..c6b0d2e 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: 15%{?dist} +Release: 16%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -767,6 +767,14 @@ exit 0 %endif %changelog +* Fri May 03 2024 Open vSwitch CI - 3.3.0-16 +- Merging upstream branch-3.3 [RH git: 8c52aecb56] + Commit list: + 4756bf4baf ofproto-dpif-trace: Fix access to an out-of-scope stack memory. + 01eca18be1 hash, jhash: Fix unaligned access to the hash remainder. + 4f61523c0d sparse: Add additional define for sparse on GCC >= 14. + + * Tue Apr 30 2024 Open vSwitch CI - 3.3.0-15 - Merging upstream branch-3.3 [RH git: 1cb679f528] Commit list: