On Thu, Jun 18, 2020 at 9:53 AM Harry van Haaren
<[email protected]> wrote:
>
> This commit checks at configure time if the assembling in use
> has a known bug in assembling AVX512 code. If this bug is present,
> all AVX512 code is disabled.
>
> Checking the version string of the binutils or assembler is not
> a good method to detect the issue, as backported fixes would not
> be reflected.
>
> The method used here is also proposed for DPDK:
> http://patches.dpdk.org/patch/71723/
>
> Signed-off-by: Harry van Haaren <[email protected]>
>
> ---
>
> v4:
> - This patch is left seperate to ease reviews, as this is a logically
> seperate check. In v5 this code change will be merged with the commit
> that introduces the AVX512 code itself to ensure build consistency.
> ---
> configure.ac | 1 +
> lib/dpif-netdev-lookup.c | 2 ++
> m4/openvswitch.m4 | 24 ++++++++++++++++++++++++
> 3 files changed, 27 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 1367c868b..76d6de4e8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -184,6 +184,7 @@ OVS_ENABLE_WERROR
> OVS_ENABLE_SPARSE
> OVS_CTAGS_IDENTIFIERS
> OVS_CHECK_DPCLS_AUTOVALIDATOR
> +OVS_CHECK_BINUTILS_AVX512
>
> AC_ARG_VAR(KARCH, [Kernel Architecture String])
> AC_SUBST(KARCH)
> diff --git a/lib/dpif-netdev-lookup.c b/lib/dpif-netdev-lookup.c
> index 2c740399b..2a77814f2 100644
> --- a/lib/dpif-netdev-lookup.c
> +++ b/lib/dpif-netdev-lookup.c
> @@ -45,6 +45,7 @@ static struct dpcls_subtable_lookup_info_t
> subtable_lookups[] = {
>
> #ifdef __x86_64__
> #if HAVE_AVX512F
> +#if HAVE_LD_AVX512_GOOD
> #ifdef __SSE4_2__
nit:
maybe combine these three conditions into one #if?
> /* Only available on x86_64 bit builds with SSE 4.2 used for OVS core. */
> { .prio = 0,
> @@ -59,6 +60,7 @@ static struct dpcls_subtable_lookup_info_t
> subtable_lookups[] = {
> #endif
> #endif
> #endif
> +#endif
> };
The rest looks good to me, thanks
William
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev