From e88610a7942f1ada4099f8a4248dc4b2b3a3e7f2 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Apr 30 2024 21:45:22 +0000 Subject: Import openvswitch2.17-2.17.0-148 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.17.0.patch b/SOURCES/openvswitch-2.17.0.patch index 46bc388..febcb0f 100644 --- a/SOURCES/openvswitch-2.17.0.patch +++ b/SOURCES/openvswitch-2.17.0.patch @@ -95500,6 +95500,53 @@ index 228b185c3a..8e6c46a85f 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/include/sparse/numa.h b/include/sparse/numa.h index 3691a0eaf7..a185972e31 100644 --- a/include/sparse/numa.h @@ -105218,7 +105265,7 @@ index fcaddf10ad..71039e24f1 100644 /* Attempts to guess the content type of a stream whose first few bytes were diff --git a/lib/tc.c b/lib/tc.c -index adb2d3182a..c4ae6d355a 100644 +index adb2d3182a..aa30e90be5 100644 --- a/lib/tc.c +++ b/lib/tc.c @@ -36,6 +36,7 @@ @@ -105769,7 +105816,7 @@ index adb2d3182a..c4ae6d355a 100644 max_offset = m->offset + m->size; start_offset = ROUND_DOWN(m->offset, 4); -@@ -2473,7 +2596,8 @@ csum_update_flag(struct tc_flower *flower, +@@ -2473,19 +2596,20 @@ csum_update_flag(struct tc_flower *flower, static int nl_msg_put_flower_rewrite_pedits(struct ofpbuf *request, @@ -105777,8 +105824,28 @@ index adb2d3182a..c4ae6d355a 100644 + struct tc_flower *flower, + struct tc_action *action) { - struct { +- 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; @@ -2497,12 +2621,12 @@ nl_msg_put_flower_rewrite_pedits(struct ofpbuf *request, continue; } @@ -105795,6 +105862,26 @@ index adb2d3182a..c4ae6d355a 100644 if (j == 0) { mask_word &= first_word_mask; +@@ -2519,8 +2643,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; +@@ -2540,7 +2664,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); + + return 0; + } @@ -2556,6 +2680,29 @@ nl_msg_put_flower_acts_release(struct ofpbuf *request, uint16_t act_index) nl_msg_end_nested(request, act_offset); } @@ -124129,7 +124216,7 @@ index 01aeaf8478..56028b1d97 100644 ovs_fatal(0, "usage: test-rstp INPUT.RSTP"); } diff --git a/tests/test-util.c b/tests/test-util.c -index f0fd042108..7d899fbbfd 100644 +index f0fd042108..5d88d38f26 100644 --- a/tests/test-util.c +++ b/tests/test-util.c @@ -43,17 +43,16 @@ check_log_2_floor(uint32_t x, int n) @@ -124164,6 +124251,36 @@ index f0fd042108..7d899fbbfd 100644 /* Check maximum x such that f(x) == n. */ check_ctz32(UINT32_MAX << n, n); +@@ -1117,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")); +@@ -1131,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/test-vconn.c b/tests/test-vconn.c index fc8ce4a2c0..96c89bd4e6 100644 --- a/tests/test-vconn.c diff --git a/SPECS/openvswitch2.17.spec b/SPECS/openvswitch2.17.spec index 6550633..6ac4ccb 100644 --- a/SPECS/openvswitch2.17.spec +++ b/SPECS/openvswitch2.17.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.17.0 -Release: 147%{?dist} +Release: 148%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -751,6 +751,14 @@ exit 0 %endif %changelog +* Tue Apr 30 2024 Open vSwitch CI - 2.17.0-148 +- Merging upstream branch-2.17 [RH git: 30aa1c5a97] + Commit list: + 755b66f68e sparse: Add immintrin.h header. + c029de2482 tc: Fix -Wgnu-variable-sized-type-not-at-end warning with Clang 18. + 0efdca5d34 tests: Fix build failure with Clang 18 due to -Wformat-truncation. + + * Wed Apr 24 2024 Open vSwitch CI - 2.17.0-147 - Merging upstream branch-2.17 [RH git: 82345a570a] Commit list: