diff --git a/SOURCES/openvswitch-3.2.0.patch b/SOURCES/openvswitch-3.2.0.patch index 664ec06..7b76ba1 100644 --- a/SOURCES/openvswitch-3.2.0.patch +++ b/SOURCES/openvswitch-3.2.0.patch @@ -1573,10 +1573,10 @@ index e966371192..2b1dd0e005 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"); @@ -1605,6 +1605,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 @@ -2749,6 +2753,58 @@ index 77f0c87dd4..9531500747 100644 fatal_signal_create_wakeup_events(); #ifdef _WIN32 +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/jsonrpc.c b/lib/jsonrpc.c index c8ce5362e1..3db5f76e28 100644 --- a/lib/jsonrpc.c @@ -3990,10 +4046,27 @@ index bb0e490910..5132f9c952 100644 ofproto_dpif_send_packet(mport->ofport, false, packet); } diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c -index 527e2f17ed..4fbe85018e 100644 +index 527e2f17ed..ed3468871e 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); @@ -4029,6 +4102,19 @@ index 527e2f17ed..4fbe85018e 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 04b583f816..7d324e7e0a 100644 --- a/ofproto/ofproto-dpif-upcall.c @@ -6278,7 +6364,7 @@ index 14aa554169..6a07e23c64 100644 + AT_CLEANUP diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at -index f242f77f31..6d0a0172b3 100644 +index f242f77f31..9edb743792 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -547,6 +547,23 @@ ovs-appctl time/warp 1000 100 @@ -6305,7 +6391,36 @@ index f242f77f31..6d0a0172b3 100644 OVS_VSWITCHD_STOP() AT_CLEANUP -@@ -5854,6 +5871,40 @@ OVS_WAIT_UNTIL([check_flows], [ovs-ofctl dump-flows br0]) +@@ -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 +@@ -5854,6 +5893,40 @@ OVS_WAIT_UNTIL([check_flows], [ovs-ofctl dump-flows br0]) OVS_VSWITCHD_STOP AT_CLEANUP @@ -6346,7 +6461,7 @@ index f242f77f31..6d0a0172b3 100644 AT_SETUP([ofproto-dpif - debug_slow action]) OVS_VSWITCHD_START add_of_ports br0 1 2 3 -@@ -6144,6 +6195,57 @@ AT_CHECK([test 1 = `$PYTHON3 "$top_srcdir/utilities/ovs-pcap.in" p2-tx.pcap | wc +@@ -6144,6 +6217,57 @@ AT_CHECK([test 1 = `$PYTHON3 "$top_srcdir/utilities/ovs-pcap.in" p2-tx.pcap | wc OVS_VSWITCHD_STOP AT_CLEANUP @@ -6404,7 +6519,7 @@ index f242f77f31..6d0a0172b3 100644 AT_SETUP([ofproto-dpif - continuation with patch port]) AT_KEYWORDS([continuations pause resume]) OVS_VSWITCHD_START( -@@ -7619,12 +7721,14 @@ dummy@ovs-dummy: hit:0 missed:0 +@@ -7619,12 +7743,14 @@ dummy@ovs-dummy: hit:0 missed:0 vm1 5/3: (dummy: ifindex=2011) ]) @@ -6422,7 +6537,7 @@ index f242f77f31..6d0a0172b3 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)']) -@@ -7635,10 +7739,13 @@ ovs-vsctl \ +@@ -7635,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.2.spec b/SPECS/openvswitch3.2.spec index 64fee23..1fc69cf 100644 --- a/SPECS/openvswitch3.2.spec +++ b/SPECS/openvswitch3.2.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.2.0 -Release: 75%{?dist} +Release: 76%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -761,6 +761,14 @@ exit 0 %endif %changelog +* Fri May 03 2024 Open vSwitch CI - 3.2.0-76 +- Merging upstream branch-3.2 [RH git: 242679aa6d] + Commit list: + a38ff0a233 ofproto-dpif-trace: Fix access to an out-of-scope stack memory. + 34b4675aa6 hash, jhash: Fix unaligned access to the hash remainder. + 389a8df2fa sparse: Add additional define for sparse on GCC >= 14. + + * Tue Apr 30 2024 Open vSwitch CI - 3.2.0-75 - Merging upstream branch-3.2 [RH git: d38df1262f] Commit list: