[dpdk-stable] [dpdk-dev] [PATCH 1/1] net/i40e: fix compilation failure on core-avx-i

Zhang, Qi Z qi.z.zhang at intel.com
Mon Aug 2 02:17:52 CEST 2021


Hi Shahed, Could you answer Wenzhuo' s question?


> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Lu, Wenzhuo
> Sent: Wednesday, July 14, 2021 9:06 AM
> To: shaikh at niometrics.com
> Cc: dev at dpdk.org; stable at dpdk.org; Xing, Beilei <beilei.xing at intel.com>
> Subject: Re: [dpdk-dev] [PATCH 1/1] net/i40e: fix compilation failure on
> core-avx-i
> 
> Hi Shahed,
> 
> 
> 
> > -----Original Message-----
> 
> > From: Shahed Shaikh
> <shaikh at niometrics.com<mailto:shaikh at niometrics.com>>
> 
> > Sent: Tuesday, June 22, 2021 5:37 PM
> 
> > To: Xing, Beilei <beilei.xing at intel.com<mailto:beilei.xing at intel.com>>
> 
> > Cc: dev at dpdk.org<mailto:dev at dpdk.org>; Shahed Shaikh
> <shaikh at niometrics.com<mailto:shaikh at niometrics.com>>;
> 
> > stable at dpdk.org<mailto:stable at dpdk.org>
> 
> > Subject: [PATCH 1/1] net/i40e: fix compilation failure on core-avx-i
> 
> >
> 
> > i40e_rxtx_vec_sse.c fails to compile with below configuration:
> 
> > - #define RTE_LIBRTE_I40E_16BYTE_RX_DESC 1 in config/rte_config.h
> 
> > - cpu=core-axv-i
> 
> > - gcc which supports -mavx2 (e.g. gcc 4.8.5)
> 
> >
> 
> > This is because commit 0604b1f2208f ("net/i40e: fix crash in AVX512")
> 
> > added
> 
> > i40e_rxq_rearm_common() to i40e_rxtx_vec_common.h which is included by
> 
> > i40e_rxtx_vec_sse.c.
> 
> >
> 
> > This function is enabled for compilation if CC_AVX2_SUPPORT is defined.
> 
> > As per drivers/net/i40e/meson.build, CC_AVX2_SUPPORT is defined when
> 
> > either CPU supports __AVX2__ or compiler supports -mavx2 option.
> 
> >
> 
> > So for given configuration, CC_AVX2_SUPPORT gets defined but we don't
> 
> > pass -mavx2 explicitly to gcc while compiling i40e_rxtx_vec_sse.c.
> 
> Looks like it's better and more clear if a new specific avx head file is added.
> 
> Just want to understand more about the problem. I don't see the same
> problem when using 'gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)',
> don't understand why -mavx2 is missing.
> 
> And more, if so, why the avx2 code doesn't meet the same problem?
> 
> Thanks.
> 
> 
> 
> > Hence it fails due to avx2 specific code from i40e_rxq_rearm_command().
> 
> >
> 
> > This patch tries to fix the compilation by moving
> 
> > i40e_rxq_rearm_common() to a new header file which will only be
> 
> > included by i40e_rxtx_vec_avx2.c and i40e_rxtx_vec_avx512.c.
> 
> >
> 
> > Fixes: 0604b1f2208f ("net/i40e: fix crash in AVX512")
> 
> > Cc: stable at dpdk.org<mailto:stable at dpdk.org>
> 
> >
> 
> > Signed-off-by: Shahed Shaikh
> <shaikh at niometrics.com<mailto:shaikh at niometrics.com>>



More information about the stable mailing list