From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3921AA0C4E; Mon, 2 Aug 2021 02:17:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE31040143; Mon, 2 Aug 2021 02:17:58 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id D169B40140; Mon, 2 Aug 2021 02:17:56 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10063"; a="277130243" X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="277130243" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2021 17:17:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="509768407" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by FMSMGA003.fm.intel.com with ESMTP; 01 Aug 2021 17:17:54 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Sun, 1 Aug 2021 17:17:54 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 2 Aug 2021 08:17:52 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.010; Mon, 2 Aug 2021 08:17:52 +0800 From: "Zhang, Qi Z" To: "Lu, Wenzhuo" , "shaikh@niometrics.com" CC: "dev@dpdk.org" , "stable@dpdk.org" , "Xing, Beilei" Thread-Topic: [dpdk-dev] [PATCH 1/1] net/i40e: fix compilation failure on core-avx-i Thread-Index: Add4S7RJeg85aOxhSP2qFpIg1Oq2PAO6AGUg Date: Mon, 2 Aug 2021 00:17:52 +0000 Message-ID: <8d87678956ad49f9bca3e9f0af9991fd@intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/1] net/i40e: fix compilation failure on core-avx-i X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Shahed, Could you answer Wenzhuo' s question? > -----Original Message----- > From: dev On Behalf Of Lu, Wenzhuo > Sent: Wednesday, July 14, 2021 9:06 AM > To: shaikh@niometrics.com > Cc: dev@dpdk.org; stable@dpdk.org; Xing, Beilei > Subject: Re: [dpdk-dev] [PATCH 1/1] net/i40e: fix compilation failure on > core-avx-i >=20 > Hi Shahed, >=20 >=20 >=20 > > -----Original Message----- >=20 > > From: Shahed Shaikh > > >=20 > > Sent: Tuesday, June 22, 2021 5:37 PM >=20 > > To: Xing, Beilei > >=20 > > Cc: dev@dpdk.org; Shahed Shaikh > >; >=20 > > stable@dpdk.org >=20 > > Subject: [PATCH 1/1] net/i40e: fix compilation failure on core-avx-i >=20 > > >=20 > > i40e_rxtx_vec_sse.c fails to compile with below configuration: >=20 > > - #define RTE_LIBRTE_I40E_16BYTE_RX_DESC 1 in config/rte_config.h >=20 > > - cpu=3Dcore-axv-i >=20 > > - gcc which supports -mavx2 (e.g. gcc 4.8.5) >=20 > > >=20 > > This is because commit 0604b1f2208f ("net/i40e: fix crash in AVX512") >=20 > > added >=20 > > i40e_rxq_rearm_common() to i40e_rxtx_vec_common.h which is included by >=20 > > i40e_rxtx_vec_sse.c. >=20 > > >=20 > > This function is enabled for compilation if CC_AVX2_SUPPORT is defined. >=20 > > As per drivers/net/i40e/meson.build, CC_AVX2_SUPPORT is defined when >=20 > > either CPU supports __AVX2__ or compiler supports -mavx2 option. >=20 > > >=20 > > So for given configuration, CC_AVX2_SUPPORT gets defined but we don't >=20 > > pass -mavx2 explicitly to gcc while compiling i40e_rxtx_vec_sse.c. >=20 > Looks like it's better and more clear if a new specific avx head file is = added. >=20 > 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. >=20 > And more, if so, why the avx2 code doesn't meet the same problem? >=20 > Thanks. >=20 >=20 >=20 > > Hence it fails due to avx2 specific code from i40e_rxq_rearm_command(). >=20 > > >=20 > > This patch tries to fix the compilation by moving >=20 > > i40e_rxq_rearm_common() to a new header file which will only be >=20 > > included by i40e_rxtx_vec_avx2.c and i40e_rxtx_vec_avx512.c. >=20 > > >=20 > > Fixes: 0604b1f2208f ("net/i40e: fix crash in AVX512") >=20 > > Cc: stable@dpdk.org >=20 > > >=20 > > Signed-off-by: Shahed Shaikh > >