On Wed, Mar 19, 2025 at 05:29:30PM +0000, Bruce Richardson wrote: > A number of libs and drivers had special optimized AVX2 and AVX512 code > paths for performance reasons, and these tended to have copy-pasted > logic to build those files. Centralise that logic in the main > drivers/ and lib/ meson.build files to avoid duplication. > > v4: rebase on latest main branch > minor fixes following feedback > limit use of -march=skylake-avx512 to when we don't already have a > -march flag supporting AVX512. > v3: add patch for event/dlb2 AVX512 handling. > add common code for libraries as well as drivers. > v2: add patch 4 to remove use of unnecessary CC_AVX2_SUPPORT flag > A related follow-up to this patchset. Checking with "godbolt.org", it appears that both clang 3.6[1] and gcc 5[2] (the minimum called out compiler versions in our docs[1]) support the set of AVX-512 compiler flags we use. Therefore, it seems we can simplify our code further by removing the "cc_has_avx512" variable.
/Bruce PS: I'd also note that these minimum versions look to be ~10-year old versions of compilers. I would expect end users to actually be using more modern releases that these. Maybe we should look to update our compiler minimum versions.... [1] https://godbolt.org/z/Ys9K6axMf [2] https://godbolt.org/z/v6WP7d6Pf [3] https://doc.dpdk.org/guides/linux_gsg/sys_reqs.html#compilation-of-the-dpdk