diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index f75913b..a8327e8 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -1772,10 +1772,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"); @@ -1804,6 +1804,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 @@ -3461,6 +3465,58 @@ index bbb31ef275..7054f8e745 100644 for (i = 0; i < n_hooks; i++) { struct hook *h = &hooks[i]; if (h->cancel_cb) { +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 @@ -6706,10 +6762,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); @@ -6745,6 +6818,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 e05ffe3128..9c6a63d7fb 100644 --- a/ofproto/ofproto-dpif-upcall.c @@ -10771,7 +10857,7 @@ index 14aa554169..6a07e23c64 100644 + AT_CLEANUP diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at -index fa6111c1ed..22b123655c 100644 +index fa6111c1ed..beb33713c7 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -547,6 +547,23 @@ ovs-appctl time/warp 1000 100 @@ -10816,7 +10902,36 @@ index fa6111c1ed..22b123655c 100644 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11 ]) OVS_VSWITCHD_STOP -@@ -944,7 +961,7 @@ done +@@ -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 +@@ -944,7 +983,7 @@ done AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/dp_hash(.*\/0xf)/dp_hash(0xXXXX\/0xf)/' | sed 's/packets.*actions:/actions:/' | strip_ufid | strip_used | sort], [0], [dnl flow-dump from the main thread: recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:hash(sym_l4(0)),recirc(0x1) @@ -10825,7 +10940,7 @@ index fa6111c1ed..22b123655c 100644 ]) OVS_VSWITCHD_STOP -@@ -959,7 +976,7 @@ AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_ds +@@ -959,7 +998,7 @@ AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_ds # Must match on the source address to be able to restore it's value for # the third bucket AT_CHECK([tail -2 stdout], [0], @@ -10834,7 +10949,7 @@ index fa6111c1ed..22b123655c 100644 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11 ]) OVS_VSWITCHD_STOP -@@ -1536,17 +1553,17 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) +@@ -1536,17 +1575,17 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout]) AT_CHECK([tail -4 stdout], [0], [ Final flow: ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=1,nw_frag=no @@ -10855,7 +10970,7 @@ index fa6111c1ed..22b123655c 100644 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4 ]) -@@ -1656,7 +1673,7 @@ AT_CHECK([ovs-vsctl -- \ +@@ -1656,7 +1695,7 @@ AT_CHECK([ovs-vsctl -- \ --id=@q2 create Queue dscp=2], [0], [ignore]) AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(9),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xff,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) AT_CHECK([tail -2 stdout], [0], @@ -10864,7 +10979,7 @@ index fa6111c1ed..22b123655c 100644 Datapath actions: dnl 100,dnl set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl -@@ -5349,7 +5366,7 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) +@@ -5349,7 +5388,7 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) AT_CHECK_UNQUOTED([tail -1 stdout], [0], @@ -10873,7 +10988,7 @@ index fa6111c1ed..22b123655c 100644 ]) flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" -@@ -5388,7 +5405,7 @@ flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x080 +@@ -5388,7 +5427,7 @@ flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x080 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) actual=`tail -1 stdout | sed 's/Datapath actions: //'` @@ -10882,7 +10997,7 @@ index fa6111c1ed..22b123655c 100644 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout]) mv stdout expout AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout]) -@@ -5656,7 +5673,7 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) +@@ -5656,7 +5695,7 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) AT_CHECK_UNQUOTED([tail -1 stdout], [0], @@ -10891,7 +11006,7 @@ index fa6111c1ed..22b123655c 100644 ]) flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" -@@ -5854,6 +5871,40 @@ OVS_WAIT_UNTIL([check_flows], [ovs-ofctl dump-flows br0]) +@@ -5854,6 +5893,40 @@ OVS_WAIT_UNTIL([check_flows], [ovs-ofctl dump-flows br0]) OVS_VSWITCHD_STOP AT_CLEANUP @@ -10932,7 +11047,7 @@ index fa6111c1ed..22b123655c 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 @@ -10990,7 +11105,7 @@ index fa6111c1ed..22b123655c 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) ]) @@ -11008,7 +11123,7 @@ index fa6111c1ed..22b123655c 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 @@ -11024,7 +11139,7 @@ index fa6111c1ed..22b123655c 100644 ]) dnl add rule for int-br to force packet onto tunnel. There is no ifindex -@@ -11884,7 +11991,7 @@ ovs-ofctl dump-flows br0 +@@ -11884,7 +12013,7 @@ ovs-ofctl dump-flows br0 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) AT_CHECK([tail -3 stdout], [0], [dnl diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index f612339..f253251 100644 --- a/SPECS/openvswitch3.1.spec +++ b/SPECS/openvswitch3.1.spec @@ -63,7 +63,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.1.0 -Release: 114%{?dist} +Release: 115%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -757,6 +757,14 @@ exit 0 %endif %changelog +* Fri May 03 2024 Open vSwitch CI - 3.1.0-115 +- Merging upstream branch-3.1 [RH git: 76b4091dc6] + Commit list: + 59135a75ee ofproto-dpif-trace: Fix access to an out-of-scope stack memory. + 483bc24e46 hash, jhash: Fix unaligned access to the hash remainder. + 0e513282b0 sparse: Add additional define for sparse on GCC >= 14. + + * Tue Apr 30 2024 Open vSwitch CI - 3.1.0-114 - Merging upstream branch-3.1 [RH git: 2b7e596ed6] Commit list: