> On 8/10/21 12:11 PM, Stokes, Ian wrote: > >>> -----Original Message----- > >>> From: Van Haaren, Harry <[email protected]> > >>> Sent: Thursday, July 29, 2021 5:55 PM > >>> To: [email protected] > >>> Cc: Stokes, Ian <[email protected]>; Van Haaren, Harry > >>> <[email protected]> > >>> Subject: [PATCH] dpcls: fix build on compilers without AVX512-VPOPCNT > >>> > >>> This commit adds extra checks around the AVX-512 vpopcnt instruction > >>> enabling, ensuring that in the function where the ISA is enabled the > >>> compiler has also indicated its support for the ISA. This is achieved > >>> by checking the __AVX512VPOPCNTDQ__ define, which the compiler sets if > >>> it is capable of handling the vpopcnt instruction. > >>> > >>> If the compiler is not capable of handling vpopcnt, we fall back to > >>> the emulated vpopcnt implementation. > >>> > >>> Reported-by: Ian Stokes <[email protected]> > >>> Signed-off-by: Harry van Haaren <[email protected]> > >>> > >>> --- > >>> > >>> Based on a very old system with GCC 7, an issue was identified > >>> where the compiler doesn't support the vpopcnt ISA, and resulted > >>> in compilation failures. > >> > >> Ping on this patch, would be good to get integrated on 2.16 and master to > >> ensure Gcc7 builds correctly. > > > > HI Harry, > > > > Just testing this now. > > > > Regards > > Ian > > FWIW, > I tried to test this yesterday, but I realized that you need gcc 7.0.0 > for this, because AVX512VPOPCNTDQ is supported starting 7.0.1. > That's a very weird system you have. :) > > Unfortunately, I realized this too late when I already built 7.5.0 from > sources and I didn't want to waste another 40 mins building 7.0.0. > So, I carved out support for AVX512VPOPCNTDQ from gcc 7.5.0. > In this configuration it failed to build OVS with the following error: > > lib/dpif-netdev-lookup-avx512-gather.c: In function > ‘_mm512_popcnt_epi64_wrapper’: > lib/dpif-netdev-lookup-avx512-gather.c:62:12: error: implicit declaration of > function ‘_mm512_popcnt_epi64’; did you mean ‘_mm512_lzcnt_epi64’? [- > Werror=implicit-function-declaration] > return _mm512_popcnt_epi64(v_in); > ^~~~~~~~~~~~~~~~~~~ > _mm512_lzcnt_epi64 > > With the patch applied, this modified gcc was able to build OVS > successfully.
Thanks for checking Ilya. I've an older system in our lab that I was able to check and reproduce the issue and confirm it resolves the issue. I'll add a fixes tag and apply to master and branch 2.16. Thanks Ian > > Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
