From e568269f335ccdb9c8a4e537ae590eb4130e9e69 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Apr 30 2024 20:48:10 +0000 Subject: Import openvswitch3.1-3.1.0-114 from Fast DataPath --- diff --git a/SOURCES/openvswitch-3.1.0.patch b/SOURCES/openvswitch-3.1.0.patch index 500c665..f75913b 100644 --- a/SOURCES/openvswitch-3.1.0.patch +++ b/SOURCES/openvswitch-3.1.0.patch @@ -1759,6 +1759,53 @@ index 045dce8f5f..3b0220aaa2 100644 #ifdef __cplusplus } #endif +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 @@ -5936,7 +5983,7 @@ index 62da9febb6..86747e58ba 100644 SSL_CTX_set_tmp_dh_callback(ctx, tmp_dh_callback); #else diff --git a/lib/tc.c b/lib/tc.c -index 4c07e22162..0c0f077676 100644 +index 4c07e22162..5b193bc395 100644 --- a/lib/tc.c +++ b/lib/tc.c @@ -36,6 +36,7 @@ @@ -6054,6 +6101,52 @@ index 4c07e22162..0c0f077676 100644 return tc_transact(&request, NULL); } +@@ -2937,17 +2952,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; +@@ -2981,8 +2996,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; +@@ -3002,7 +3017,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; @@ -3720,15 +3735,13 @@ log_tc_flower_match(const char *msg, ds_put_cstr(&s, "\nExpected Actions:\n"); @@ -15160,6 +15253,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/testsuite.at b/tests/testsuite.at index cf4e3eadfb..9d77a9f512 100644 --- a/tests/testsuite.at diff --git a/SPECS/openvswitch3.1.spec b/SPECS/openvswitch3.1.spec index 03c4596..f612339 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: 113%{?dist} +Release: 114%{?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 +* Tue Apr 30 2024 Open vSwitch CI - 3.1.0-114 +- Merging upstream branch-3.1 [RH git: 2b7e596ed6] + Commit list: + 1937dbe20f sparse: Add immintrin.h header. + bed6894440 tc: Fix -Wgnu-variable-sized-type-not-at-end warning with Clang 18. + ebc6bbfb91 tests: Fix build failure with Clang 18 due to -Wformat-truncation. + + * Wed Apr 24 2024 Open vSwitch CI - 3.1.0-113 - Merging upstream branch-3.1 [RH git: 10583df489] Commit list: