Thanks a lot. Hi Harry, Any ideas? -DHAVE_AVX512F and -DHAVE_LD_AVX512_GOOD are always enabled.
On Wed, Jun 8, 2022 at 3:15 PM Pai G, Sunil <[email protected]> wrote: > > Adding Harry to help answer these questions on DPDK and OVS building with > AVX512. > > Thanks and Regards, > Sunil > > > -----Original Message----- > > From: Li Zhang <[email protected]> > > Sent: Wednesday, June 8, 2022 4:26 PM > > To: Pai G, Sunil <[email protected]> > > Cc: [email protected] > > Subject: Re: [ovs-discuss] One question about AVX512 support > > > > Hi Pai, > > > > I have been trying to disable avx512 in OVS for the platform which doesn't > > support avx512. > > Building fails and it seems that it is not disabled. Any idea about it? > > > > # ./configure --with-dpdk=yes --prefix=/usr --localstatedir=/var -- > > sysconfdir=/etc CFLAGS="-mno-avx512f" > > # make > > > > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I ./include -I ./include -I > > ./lib -I ./lib -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare - > > Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter > > -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style- > > definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict- > > aliasing -Wswitch-bool -Wlogical-not-parentheses -Wsizeof-array-argument - > > Wbool-compare -Wshift-negative-value -Wduplicated-cond -Wshadow -mssse3 - > > include rte_config.h -DOPENSSL_LOAD_CONF -I/usr/local/include > > -D_FILE_OFFSET_BITS=64 -mno-avx512f -DHAVE_AVX512F -DHAVE_LD_AVX512_GOOD - > > MT lib/netdev-dpdk.lo -MD -MP -MF lib/.deps/netdev-dpdk.Tpo -c lib/netdev- > > dpdk.c -o lib/netdev-dpdk.o In file included from /usr/lib64/gcc/x86_64- > > suse-linux/7/include/immintrin.h:41:0, > > from /usr/lib64/gcc/x86_64-suse- > > linux/7/include/x86intrin.h:48, > > from /usr/local/include/rte_vect.h:28, > > from /usr/local/include/rte_memcpy.h:17, > > from /usr/local/include/rte_ether.h:21, > > from /usr/local/include/rte_ethdev.h:159, > > from lib/netdev-dpdk.c:39: > > /usr/local/include/rte_memcpy.h: In function βrte_mov32β: > > /usr/lib64/gcc/x86_64-suse-linux/7/include/avxintrin.h:926:1: error: > > inlining failed in call to always_inline β_mm256_storeu_si256β: target > > specific option mismatch > > _mm256_storeu_si256 (__m256i_u *__P, __m256i __A) ^~~~~~~~~~~~~~~~~~~ In > > file included from /usr/local/include/rte_ether.h:21:0, > > from /usr/local/include/rte_ethdev.h:159, > > from lib/netdev-dpdk.c:39: > > /usr/local/include/rte_memcpy.h:320:2: note: called from here > > _mm256_storeu_si256((__m256i *)dst, ymm0); > > > > On Thu, Jun 2, 2022 at 4:00 PM Pai G, Sunil <[email protected]> wrote: > > > > > > Hi Li, > > > > > > The assumption of ovs being dependent on dpdk for avx512 might not be > > true. > > > I found these two commits below in ovs-2.14.2 which strips out the "- > > march" and "-mno-avx512f" flags exported by dpdk i.e removes dependency on > > DPDK. The reason for this is rightly mentioned below as well. Hope this > > helps. > > > > > > > > > commit bb8f0e2a810889241f1d886d160ccee9b96c4d63 > > > Author: Ian Stokes <[email protected]> > > > Date: Fri Jan 15 15:46:02 2021 +0000 > > > > > > acinclude: Strip out -mno-avx512f provided by DPDK. > > > > > > DPDK forces '-mno-avx512f' flag for the application if the toolchain > > > used to build DPDK had broken AVX512 support. > > > > > > DPDK forces '-mno-avx512f' flag for the application if the toolchain > > > used to build DPDK had broken AVX512 support. But OVS could be > > built > > > with a completely different or fixed toolchain with correct avx512 > > > support. > > > > > > Fix that by stripping out `-mno-avx512f` as we already do for '- > > march'. > > > This will allow the OVS to decide if the AVX512 can be used. > > > > > > Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not > > an > > > option since autotools might reorder them back later and it's very > > > unpredictable. > > > > > > Reported-at: https://github.com/openvswitch/ovs-issues/issues/201 > > > Signed-off-by: Ilya Maximets <[email protected]> > > > Co-authored-by: Ilya Maximets <[email protected]> > > > Signed-off-by: Ian Stokes <[email protected]> > > > > > > commit e9f9104d00006a83ce7efd702120171835991779 > > > Author: Ian Stokes <[email protected]> > > > Date: Fri Jan 15 14:54:04 2021 +0000 > > > > > > acinclude: Strip out -march provided by DPDK. > > > > > > DPDK flags may include -march. Forcing -march could be > > > considered too heavy a requirement when users compile OVS from > > > source and could override user provided options. > > > > > > Resolve this by stripping -march from provided DPDK flags. > > > > > > Signed-off-by: Ian Stokes <[email protected]> > > > > > > > > > > > > Thanks and Regards, > > > Sunil > > > > > > > -----Original Message----- > > > > From: discuss <[email protected]> On Behalf Of Li > > > > Zhang > > > > Sent: Thursday, June 2, 2022 6:35 PM > > > > To: [email protected] > > > > Subject: [ovs-discuss] One question about AVX512 support > > > > > > > > Hi all, > > > > > > > > We are using openvswitch 2.14.2, and dpdk-19.11.4. I found avx512 is > > > > enabled by default but it's disabled in DPDK. But I think ovs is > > > > dependent on the dpdk library, right? But why does ovs work with > > > > avx512 disabled in DPDK? > > > > > > > > I am not quite sure about the relationship between OVS and DPDK, any > > > > suggestions? > > > > > > > > -- > > > > > > > > Best Regards > > > > -Li > > > > _______________________________________________ > > > > discuss mailing list > > > > [email protected] > > > > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss > > > > > > > > -- > > > > Best Regards > > -Li -- Best Regards -Li _______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
