From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH v10 3/3] iFPGA: Add Intel FPGA BUS Rawdev Driver Date: Wed, 9 May 2018 16:37:12 +0100 Message-ID: <20180509153712.GA19692@bricha3-MOBL.ger.corp.intel.com> References: <1521553556-62982-1-git-send-email-rosen.xu@intel.com> <1525851801-16101-1-git-send-email-rosen.xu@intel.com> <1525851801-16101-4-git-send-email-rosen.xu@intel.com> <2225742.ccNGmmKHOr@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Thomas Monjalon , "Xu, Rosen" , "dev@dpdk.org" , "Zhang, Roy Fan" , "Doherty, Declan" , "shreyansh.jain@nxp.com" , "Yigit, Ferruh" , "Ananyev, Konstantin" , "Liu, Song" , "Wu, Hao" , "gaetan.rivet@6wind.com" , "Wu, Yanglong" To: "Zhang, Tianfei" Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 0BEE11B6FF for ; Wed, 9 May 2018 17:37:21 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, May 09, 2018 at 04:33:45PM +0100, Zhang, Tianfei wrote: > > > > -----Original Message----- > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > Sent: Wednesday, May 9, 2018 10:47 PM > > To: Xu, Rosen > > Cc: dev@dpdk.org; Zhang, Roy Fan ; Doherty, > > Declan ; Richardson, Bruce > > ; shreyansh.jain@nxp.com; Yigit, Ferruh > > ; Ananyev, Konstantin > > ; Zhang, Tianfei ; > > Liu, Song ; Wu, Hao ; > > gaetan.rivet@6wind.com; Wu, Yanglong > > Subject: Re: [dpdk-dev] [PATCH v10 3/3] iFPGA: Add Intel FPGA BUS Rawdev > > Driver > > > > 09/05/2018 09:43, Xu, Rosen: > > > From: Rosen Xu > > > > > > Add Intel FPGA BUS Rawdev Driver which is based on librte_rawdev > > > library. > > > > > > Signed-off-by: Rosen Xu > > > Signed-off-by: Yanglong Wu > > > Signed-off-by: Tianfei Zhang > > > Acked-by: Shreyansh Jain > > > > I have a compilation error: > > drivers/raw/ifpga_rawdev/base/ifpga_fme_pr.c:10:15: error: > > instruction requires: AVX-512 ISA > > > > because of vmovdqu64: > > > > #if defined(RTE_ARCH_X86_64) > > static inline void copy512(const void *src, void *dst) { > > asm volatile("vmovdqu64 (%0), %%zmm0;" > > "vmovntdq %%zmm0, (%1);" > > : > > : "r"(src), "r"(dst)); > > } > > #else > > static inline void copy512(const void *src, void *dst) { > > UNUSED(src); > > UNUSED(dst); > > WARN_ON(1); > > } > > #endif > > > > I suggest to fix it quickly without waiting a v11 with this: > > > > static inline void copy512(const void *src, void *dst) { #ifdef > > CC_SUPPORT_AVX512F > > asm volatile("vmovdqu64 (%0), %%zmm0;" > > "vmovntdq %%zmm0, (%1);" > > : > > : "r"(src), "r"(dst)); > > #else > > UNUSED(src); > > UNUSED(dst); > > WARN_ON(1); > > #endif > > } > > > > It does not make any runtime detection, but it's better than previously. > > > > Which linux distribution are you use? We can compile it on Ubuntu 16.04 and RHEL 7.4. > We will fix it on V11. > This shows up with meson builds for non-avx-512 architectures using clang. The makefile has the following snippet that doesn't have an equivalent in the meson.build file. 26 ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)$ 27 >-------CFLAGS_ifpga_fme_pr.o += -march=knl$ 28 endif$ However, it does also bring up the questions as to the unconditional use of AVX-512 code? What happens if this code is run on a system without AVX-512 support? Regards, /Bruce