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 8A025A0C53; Wed, 1 Sep 2021 08:24:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 75A6240DDE; Wed, 1 Sep 2021 08:24:24 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id D219E4013F; Wed, 1 Sep 2021 08:24:22 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10093"; a="198206661" X-IronPort-AV: E=Sophos;i="5.84,368,1620716400"; d="scan'208";a="198206661" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2021 23:24:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,368,1620716400"; d="scan'208";a="541406042" Received: from irsmsx605.ger.corp.intel.com ([163.33.146.138]) by fmsmga002.fm.intel.com with ESMTP; 31 Aug 2021 23:24:21 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by IRSMSX605.ger.corp.intel.com (163.33.146.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 1 Sep 2021 07:24:19 +0100 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; Wed, 1 Sep 2021 14:24:16 +0800 From: "Zhang, Qi Z" To: "Rong, Leyi" , "Richardson, Bruce" , "dev@dpdk.org" CC: "brian90013@gmail.com" , "Lu, Wenzhuo" , "stable@dpdk.org" , "Yang, Qiming" Thread-Topic: [PATCH 2/2] net/ice: fix generic build on FreeBSD Thread-Index: AQHXlE+HOitkWMEDak+WbtX0xpwt8KuLQG2AgAOK3yA= Date: Wed, 1 Sep 2021 06:24:16 +0000 Message-ID: References: <20210818163816.19143-1-bruce.richardson@intel.com> <20210818163816.19143-2-bruce.richardson@intel.com> 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 2/2] net/ice: fix generic build on FreeBSD 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" > -----Original Message----- > From: Rong, Leyi > Sent: Monday, August 30, 2021 4:18 PM > To: Richardson, Bruce ; dev@dpdk.org > Cc: brian90013@gmail.com; Lu, Wenzhuo ; > stable@dpdk.org; Yang, Qiming ; Zhang, Qi Z > > Subject: RE: [PATCH 2/2] net/ice: fix generic build on FreeBSD >=20 >=20 > > -----Original Message----- > > From: Richardson, Bruce > > Sent: Thursday, August 19, 2021 12:38 AM > > To: dev@dpdk.org > > Cc: brian90013@gmail.com; Richardson, Bruce > > ; Lu, Wenzhuo ; > > Rong, Leyi ; stable@dpdk.org; Yang, Qiming > > ; Zhang, Qi Z > > Subject: [PATCH 2/2] net/ice: fix generic build on FreeBSD > > > > The common header file for vectorization is included in multiple > > files, and so must use macros for the current compilation unit, rather > > than the compiler- capability flag set for the whole driver. With the > > current, incorrect, macro, the > > AVX512 or AVX2 flags may be set when compiling up SSE code, leading to > > compilation errors. Changing from "CC_AVX*_SUPPORT" > > to the compiler-defined "__AVX*__" macros fixes this issue. > > > > Bugzilla ID: 788 > > Fixes: a4e480de268e ("net/ice: optimize Tx by using AVX512") > > Fixes: 20daa1c978b7 ("net/ice: fix crash in AVX512") > > Cc: wenzhuo.lu@intel.com > > Cc: leyi.rong@intel.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Bruce Richardson > > --- > > drivers/net/ice/ice_rxtx_vec_common.h | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/ice/ice_rxtx_vec_common.h > > b/drivers/net/ice/ice_rxtx_vec_common.h > > index 2d8ef7dc8a..e609a75fc6 100644 > > --- a/drivers/net/ice/ice_rxtx_vec_common.h > > +++ b/drivers/net/ice/ice_rxtx_vec_common.h > > @@ -194,7 +194,7 @@ _ice_tx_queue_release_mbufs_vec(struct > > ice_tx_queue > > *txq) > > */ > > i =3D txq->tx_next_dd - txq->tx_rs_thresh + 1; > > > > -#ifdef CC_AVX512_SUPPORT > > +#ifdef __AVX512VL__ > > struct rte_eth_dev *dev =3D &rte_eth_devices[txq->vsi->adapter- > > >pf.dev_data->port_id]; > > > > if (dev->tx_pkt_burst =3D=3D ice_xmit_pkts_vec_avx512 || @@ -352,7 > > +352,7 @@ ice_tx_vec_dev_check_default(struct rte_eth_dev *dev) > > return result; > > } > > > > -#ifdef CC_AVX2_SUPPORT > > +#ifdef __AVX2__ > > static __rte_always_inline void > > ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool > > avx512) { @@ -414,7 +414,7 @@ ice_rxq_rearm_common(struct > ice_rx_queue > > *rxq, __rte_unused bool avx512) > > _mm_store_si128((__m128i *)&rxdp++->read, dma_addr1); > > } > > #else > > -#ifdef CC_AVX512_SUPPORT > > +#ifdef __AVX512VL__ > > if (avx512) { > > struct rte_mbuf *mb0, *mb1, *mb2, *mb3; > > struct rte_mbuf *mb4, *mb5, *mb6, *mb7; > > -- > > 2.30.2 >=20 > Acked-by: Leyi Rong Applied to dpdk-next-net-intel. Thanks Qi