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 DA311A0C4C for ; Wed, 18 Aug 2021 18:38:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDAFA4069E; Wed, 18 Aug 2021 18:38:46 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 61CF24069E; Wed, 18 Aug 2021 18:38:45 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10080"; a="277396144" X-IronPort-AV: E=Sophos;i="5.84,330,1620716400"; d="scan'208";a="277396144" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2021 09:38:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,330,1620716400"; d="scan'208";a="471597617" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by orsmga008.jf.intel.com with ESMTP; 18 Aug 2021 09:38:42 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: brian90013@gmail.com, Bruce Richardson , wenzhuo.lu@intel.com, stable@dpdk.org, Beilei Xing Date: Wed, 18 Aug 2021 17:38:15 +0100 Message-Id: <20210818163816.19143-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 1/2] net/i40e: fix generic build on FreeBSD X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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: 0604b1f2208f ("net/i40e: fix crash in AVX512") Cc: wenzhuo.lu@intel.com Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- drivers/net/i40e/i40e_rxtx_vec_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index f52ed98d62..65715ed1ce 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -268,7 +268,7 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev) #endif } -#ifdef CC_AVX2_SUPPORT +#ifdef __AVX2__ static __rte_always_inline void i40e_rxq_rearm_common(struct i40e_rx_queue *rxq, __rte_unused bool avx512) { @@ -329,7 +329,7 @@ i40e_rxq_rearm_common(struct i40e_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