[dpdk-dev] [PATCH] net/i40e: disable AVX512 for Windows

Dmitry Kozlyuk dmitry.kozliuk at gmail.com
Wed Jan 20 20:27:37 CET 2021


On Wed, 20 Jan 2021 18:24:43 +0000, Ferruh Yigit wrote:
> On 1/20/2021 6:21 PM, Dmitry Kozlyuk wrote:
> > 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.
> >   
> 
> Is there a way to disable it selectively, only for the compiler versions that 
> doesn't support it?

It was a guesswork and it proved wrong, setsmp/longjmp flavour [1] with
GCC 8.1.0 also fails. Fedora 32 has GCC 9.2.1 (works), while Fedora 33 has
GCC 10.2.1 (fails). I use a reproducible environment [2] with GCC 9.3.0,
which succeeds. Seems like GCC 9 is the only known version that works, which
is pretty close to "doesn't work with MinGW at all".

[1]:
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z

[2]: https://github.com/PlushBeaver/nix-shells/tree/master/dpdk


More information about the dev mailing list