From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 5DE4CA0A0A;
	Wed, 20 Jan 2021 19:21:28 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id E1B73140E6C;
	Wed, 20 Jan 2021 19:21:27 +0100 (CET)
Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com
 [209.85.167.54])
 by mails.dpdk.org (Postfix) with ESMTP id D9092140E6B
 for <dev@dpdk.org>; Wed, 20 Jan 2021 19:21:26 +0100 (CET)
Received: by mail-lf1-f54.google.com with SMTP id h7so6162209lfc.6
 for <dev@dpdk.org>; Wed, 20 Jan 2021 10:21:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=AeHMXL8eRSLEu2EDS5z6Om09TaGErrnI7Ka8zQgiOjE=;
 b=CSr5HaBcdWlgBu8iYYQo72pXF6iXiHMkW+rIC17jb7iHTrWc8idSXeIKwU/zU8cD/S
 unSppXIMtQ5CNd/0Fz8PimD05LxwMoBz5L3r+JYy92PnPlYeyj9UroGAToH5mkBX4VhF
 m8MqE0KZUoAgvNAbKgCKTvqkhHe0mpcQDfwmq+KUWckTIcipsjinMjDoIr58+XePdwFo
 HkeZwbF5WhGyFoEMJOslaM8yZTwPuA6l9LHIVkcIgVfrIQLw3ELh7ZHj55YqrNHcU8Zk
 t1K560GsPOkYyv7Hw0sHhRaNPfSBQ4yU+bjSRJ/I/CDjT/oqYwnrGcS2f5MUJs6vLnqn
 E1AQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=AeHMXL8eRSLEu2EDS5z6Om09TaGErrnI7Ka8zQgiOjE=;
 b=UQ4tbJk9ERHypMu0YVD1aZTnLId/dAsNgZRxseqNxCGXOCmJYxUY94byRKbafOkM6P
 44WjAKyPrLp5jWQSW7/WtaJajJIAxSfkqgNyFuTEhJdGzrj+15jI3wvg1ydzGWZaEQkI
 XsifUqjOti1eqRZPAeG5VKOtGKmfuypj2/ZRZT2piS8oy75ltst/ntUy1To8dOn485m/
 JRALW9l4iJqVGXMNgJrHCXaCBWQSexHzxho1QDt65X3AlLpE9vcdRgbx5WMHvn4zMOtg
 gcehMv3Nphto/HjIhU+JZZk9oOyl8WnCp147iEWDZuBQ3/rLSZAncN9Uz9f+6MeJ2IIg
 5bjA==
X-Gm-Message-State: AOAM533BEzBgqCgZgA/ZwrdTz551ij40zmCHaO8tZ4N46txBO6RHGjg7
 Fv73eenSfUksmi90eyaiNNs=
X-Google-Smtp-Source: ABdhPJyyJNtM6VNbJ76sA3zxww7ByBeJGkx5QR77/qI1oigc+SpF14XMZIT6A0oKWyyXC2d7ouW2hw==
X-Received: by 2002:a05:6512:1088:: with SMTP id
 j8mr4448489lfg.475.1611166886347; 
 Wed, 20 Jan 2021 10:21:26 -0800 (PST)
Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru.
 [37.110.65.23])
 by smtp.gmail.com with ESMTPSA id 84sm272100lfg.210.2021.01.20.10.21.25
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 20 Jan 2021 10:21:25 -0800 (PST)
Date: Wed, 20 Jan 2021 21:21:24 +0300
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, navasile@linux.microsoft.com, dmitrym@microsoft.com,
 pallavi.kadam@intel.com, ferruh.yigit@intel.com, Beilei Xing
 <beilei.xing@intel.com>, Jeff Guo <jia.guo@intel.com>, Wenzhuo Lu
 <wenzhuo.lu@intel.com>, Leyi Rong <leyi.rong@intel.com>, Bruce Richardson
 <bruce.richardson@intel.com>
Message-ID: <20210120212124.72fe1289@sovereign>
In-Reply-To: <20210120164016.26745-1-david.marchand@redhat.com>
References: <20210120164016.26745-1-david.marchand@redhat.com>
X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH] net/i40e: disable AVX512 for Windows
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Wed, 20 Jan 2021 17:40:16 +0100, David Marchand wrote:
> There is probably better to do rather than disabling AVX512 globally for
> Windows but since I saw no patch fixing this, here it is.
>
> ---
>  drivers/net/i40e/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
> index c0acdf4fd4..c9a1a50407 100644
> --- a/drivers/net/i40e/meson.build
> +++ b/drivers/net/i40e/meson.build
> @@ -54,7 +54,7 @@ if arch_subdir == 'x86'
>  		cc.has_argument('-mavx512f') and
>  		cc.has_argument('-mavx512bw'))
>  
> -	if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true
> +	if not is_windows and (i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true)
>  		cflags += ['-DCC_AVX512_SUPPORT']
>  		avx512_args = [cflags, '-mavx512f', '-mavx512bw']
>  		if cc.has_argument('-march=skylake-avx512')

Clang doesn't seem to be affected, suggesting a cc.get_id() == 'gcc' check.

The error seems related to SEH (structured exception handling). Some MinGW
flavours don't use it, which can explain why the bug isn't not 100%
reproducible. IMO, just disabling AVX512 for MinGW is enough.

A nit, is there a reason to prefer "x == true" over "x"?