diff --git a/SOURCES/openvswitch-3.2.0.patch b/SOURCES/openvswitch-3.2.0.patch index 3420109..664ec06 100644 --- a/SOURCES/openvswitch-3.2.0.patch +++ b/SOURCES/openvswitch-3.2.0.patch @@ -1560,6 +1560,53 @@ index cf009f8264..52614a5ac0 100644 #if __GNUC__ && !__CHECKER__ #define OVS_UNUSED __attribute__((__unused__)) #define OVS_PRINTF_FORMAT(FMT, ARG1) __attribute__((__format__(printf, FMT, ARG1))) +diff --git a/include/sparse/automake.mk b/include/sparse/automake.mk +index e966371192..2b1dd0e005 100644 +--- a/include/sparse/automake.mk ++++ b/include/sparse/automake.mk +@@ -1,5 +1,6 @@ + noinst_HEADERS += \ + include/sparse/rte_byteorder.h \ ++ include/sparse/immintrin.h \ + include/sparse/xmmintrin.h \ + include/sparse/arpa/inet.h \ + include/sparse/bits/floatn.h \ +diff --git a/include/sparse/immintrin.h b/include/sparse/immintrin.h +new file mode 100644 +index 0000000000..dd742be9f5 +--- /dev/null ++++ b/include/sparse/immintrin.h +@@ -0,0 +1,30 @@ ++/* Copyright (c) 2024 Red Hat, 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. ++ */ ++ ++#ifndef __CHECKER__ ++#error "Use this header only with sparse. It is not a correct implementation." ++#endif ++ ++/* Sparse doesn't know some types used by AVX512 and some other headers. ++ * Mark those headers as already included to avoid failures. This is fragile, ++ * so may need adjustments with compiler changes. */ ++#define _AVX512BF16INTRIN_H_INCLUDED ++#define _AVX512BF16VLINTRIN_H_INCLUDED ++#define _AVXNECONVERTINTRIN_H_INCLUDED ++#define _KEYLOCKERINTRIN_H_INCLUDED ++#define __AVX512FP16INTRIN_H_INCLUDED ++#define __AVX512FP16VLINTRIN_H_INCLUDED ++ ++#include_next diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in index 7945162f9f..bc7ac55237 100755 --- a/ipsec/ovs-monitor-ipsec.in @@ -3676,9 +3723,55 @@ index 2f01966f79..90e8094599 100644 NULL); unixctl_command_register("rstp/show", "[bridge]", 0, 1, rstp_unixctl_show, diff --git a/lib/tc.c b/lib/tc.c -index f49048cdab..6b38925c30 100644 +index f49048cdab..0f805412ae 100644 --- a/lib/tc.c +++ b/lib/tc.c +@@ -3049,17 +3049,17 @@ nl_msg_put_flower_rewrite_pedits(struct ofpbuf *request, + struct tc_action *action, + uint32_t action_pc) + { +- struct { ++ union { + struct tc_pedit sel; +- struct tc_pedit_key keys[MAX_PEDIT_OFFSETS]; +- struct tc_pedit_key_ex keys_ex[MAX_PEDIT_OFFSETS]; +- } sel = { +- .sel = { +- .nkeys = 0 +- } +- }; ++ uint8_t buffer[sizeof(struct tc_pedit) ++ + MAX_PEDIT_OFFSETS * sizeof(struct tc_pedit_key)]; ++ } sel; ++ struct tc_pedit_key_ex keys_ex[MAX_PEDIT_OFFSETS]; + int i, j, err; + ++ memset(&sel, 0, sizeof sel); ++ memset(keys_ex, 0, sizeof keys_ex); ++ + for (i = 0; i < ARRAY_SIZE(flower_pedit_map); i++) { + struct flower_key_to_pedit *m = &flower_pedit_map[i]; + struct tc_pedit_key *pedit_key = NULL; +@@ -3093,8 +3093,8 @@ nl_msg_put_flower_rewrite_pedits(struct ofpbuf *request, + return EOPNOTSUPP; + } + +- pedit_key = &sel.keys[sel.sel.nkeys]; +- pedit_key_ex = &sel.keys_ex[sel.sel.nkeys]; ++ pedit_key = &sel.sel.keys[sel.sel.nkeys]; ++ pedit_key_ex = &keys_ex[sel.sel.nkeys]; + pedit_key_ex->cmd = TCA_PEDIT_KEY_EX_CMD_SET; + pedit_key_ex->htype = m->htype; + pedit_key->off = cur_offset; +@@ -3114,7 +3114,7 @@ nl_msg_put_flower_rewrite_pedits(struct ofpbuf *request, + } + } + } +- nl_msg_put_act_pedit(request, &sel.sel, sel.keys_ex, ++ nl_msg_put_act_pedit(request, &sel.sel, keys_ex, + flower->csum_update_flags ? TC_ACT_PIPE : action_pc); + + return 0; @@ -3851,15 +3851,13 @@ log_tc_flower_match(const char *msg, ds_put_cstr(&s, "\nExpected Actions:\n"); @@ -9296,6 +9389,40 @@ index 9c1026ec1a..707ee3a6c8 100644 if (argc != 2) { ovs_fatal(0, "usage: test-rstp INPUT.RSTP"); } +diff --git a/tests/test-util.c b/tests/test-util.c +index 7d899fbbfd..5d88d38f26 100644 +--- a/tests/test-util.c ++++ b/tests/test-util.c +@@ -1116,12 +1116,16 @@ test_snprintf(struct ovs_cmdl_context *ctx OVS_UNUSED) + { + char s[16]; + ++ /* GCC 7+ and Clang 18+ warn about the following calls that truncate ++ * a string using snprintf(). We're testing that truncation works ++ * properly, so temporarily disable the warning. */ + #if __GNUC__ >= 7 +- /* GCC 7+ warns about the following calls that truncate a string using +- * snprintf(). We're testing that truncation works properly, so +- * temporarily disable the warning. */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wformat-truncation" ++#endif ++#if __clang_major__ >= 18 ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Wformat-truncation" + #endif + ovs_assert(snprintf(s, 4, "abcde") == 5); + ovs_assert(!strcmp(s, "abc")); +@@ -1130,6 +1134,9 @@ test_snprintf(struct ovs_cmdl_context *ctx OVS_UNUSED) + ovs_assert(!strcmp(s, "abcd")); + #if __GNUC__ >= 7 + #pragma GCC diagnostic pop ++#endif ++#if __clang_major__ >= 18 ++#pragma clang diagnostic pop + #endif + + ovs_assert(snprintf(s, 6, "abcde") == 5); diff --git a/tests/tunnel-push-pop-ipv6.at b/tests/tunnel-push-pop-ipv6.at index a8dd28c5b5..3f2cf84292 100644 --- a/tests/tunnel-push-pop-ipv6.at diff --git a/SPECS/openvswitch3.2.spec b/SPECS/openvswitch3.2.spec index 539ac60..64fee23 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: 74%{?dist} +Release: 75%{?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 +* Tue Apr 30 2024 Open vSwitch CI - 3.2.0-75 +- Merging upstream branch-3.2 [RH git: d38df1262f] + Commit list: + 03c165e436 sparse: Add immintrin.h header. + f53e3568fa tc: Fix -Wgnu-variable-sized-type-not-at-end warning with Clang 18. + d5284c2a39 tests: Fix build failure with Clang 18 due to -Wformat-truncation. + + * Mon Apr 29 2024 Open vSwitch CI - 3.2.0-74 - Merging upstream branch-3.2 [RH git: f695da9bb6] Commit list: