From 579744b630ca34339e2e2a4ea7bc4ca34d1c9243 Mon Sep 17 00:00:00 2001 From: Open vSwitch CI Date: Jun 29 2022 21:06:02 +0000 Subject: Import openvswitch2.15-2.15.0-109 from Fast DataPath --- diff --git a/SOURCES/openvswitch-2.15.0.patch b/SOURCES/openvswitch-2.15.0.patch index 05e6595..d3fa8fc 100644 --- a/SOURCES/openvswitch-2.15.0.patch +++ b/SOURCES/openvswitch-2.15.0.patch @@ -20599,6 +20599,65 @@ index b7d577870d..fe24f9abdf 100644 "cannot use CPU flag based optimizations"); return false; } +diff --git a/lib/dpif-netdev-lookup-avx512-gather.c b/lib/dpif-netdev-lookup-avx512-gather.c +index 5e3634249d..55fcc327b0 100644 +--- a/lib/dpif-netdev-lookup-avx512-gather.c ++++ b/lib/dpif-netdev-lookup-avx512-gather.c +@@ -237,16 +237,10 @@ dpcls_avx512_gather_mf_any(struct dpcls_subtable *subtable, uint32_t keys_map, + } + + dpcls_subtable_lookup_func +-dpcls_subtable_avx512_gather_probe(uint32_t u0_bits, uint32_t u1_bits) ++dpcls_subtable_avx512_gather_probe__(uint32_t u0_bits, uint32_t u1_bits) + { + dpcls_subtable_lookup_func f = NULL; + +- int avx512f_available = dpdk_get_cpu_has_isa("x86_64", "avx512f"); +- int bmi2_available = dpdk_get_cpu_has_isa("x86_64", "bmi2"); +- if (!avx512f_available || !bmi2_available) { +- return NULL; +- } +- + CHECK_LOOKUP_FUNCTION(5, 1); + CHECK_LOOKUP_FUNCTION(4, 1); + CHECK_LOOKUP_FUNCTION(4, 0); +diff --git a/lib/dpif-netdev-lookup.c b/lib/dpif-netdev-lookup.c +index bd0a99abe7..c19ac8dd37 100644 +--- a/lib/dpif-netdev-lookup.c ++++ b/lib/dpif-netdev-lookup.c +@@ -22,6 +22,19 @@ + + VLOG_DEFINE_THIS_MODULE(dpif_netdev_lookup); + ++#if (__x86_64__ && HAVE_AVX512F && HAVE_LD_AVX512_GOOD && __SSE4_2__) ++static dpcls_subtable_lookup_func ++dpcls_subtable_avx512_gather_probe(uint32_t u0_bits, uint32_t u1_bits) ++{ ++ if (!dpdk_get_cpu_has_isa("x86_64", "avx512f") ++ || !dpdk_get_cpu_has_isa("x86_64", "bmi2")) { ++ return NULL; ++ } ++ ++ return dpcls_subtable_avx512_gather_probe__(u0_bits, u1_bits); ++} ++#endif ++ + /* Actual list of implementations goes here */ + static struct dpcls_subtable_lookup_info_t subtable_lookups[] = { + /* The autovalidator implementation will not be used by default, it must +diff --git a/lib/dpif-netdev-lookup.h b/lib/dpif-netdev-lookup.h +index bd72aa29b8..2c6c6532da 100644 +--- a/lib/dpif-netdev-lookup.h ++++ b/lib/dpif-netdev-lookup.h +@@ -44,7 +44,7 @@ dpcls_subtable_generic_probe(uint32_t u0_bit_count, uint32_t u1_bit_count); + + /* Probe function for AVX-512 gather implementation */ + dpcls_subtable_lookup_func +-dpcls_subtable_avx512_gather_probe(uint32_t u0_bit_cnt, uint32_t u1_bit_cnt); ++dpcls_subtable_avx512_gather_probe__(uint32_t u0_bit_cnt, uint32_t u1_bit_cnt); + + + /* Subtable registration and iteration helpers */ diff --git a/lib/dpif-netdev-private.h b/lib/dpif-netdev-private.h index 4fda1220b0..45360dc3e1 100644 --- a/lib/dpif-netdev-private.h diff --git a/SPECS/openvswitch2.15.spec b/SPECS/openvswitch2.15.spec index e9e68c7..0f68d63 100644 --- a/SPECS/openvswitch2.15.spec +++ b/SPECS/openvswitch2.15.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.15.0 -Release: 108%{?dist} +Release: 109%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -702,6 +702,12 @@ exit 0 %endif %changelog +* Wed Jun 29 2022 Open vSwitch CI - 2.15.0-109 +- Merging upstream branch-2.15 [RH git: 566da17c56] + Commit list: + e8c27d116d dpif-netdev: Refactor AVX512 runtime checks. (#2100393) + + * Tue Jun 28 2022 Open vSwitch CI - 2.15.0-108 - Merging upstream branch-2.15 [RH git: 4fe2b46365] Commit list: