From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 8A8534A63 for ; Thu, 14 Apr 2016 18:03:50 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 14 Apr 2016 09:03:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,485,1455004800"; d="scan'208";a="945239260" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 14 Apr 2016 09:02:58 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u3EG2uct023827; Thu, 14 Apr 2016 17:02:56 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id u3EG2u9E011923; Thu, 14 Apr 2016 17:02:56 +0100 Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id u3EG2uxg011919; Thu, 14 Apr 2016 17:02:56 +0100 From: Bruce Richardson To: dev@dpdk.org Cc: Helin Zhang , Jingjing Wu , Bruce Richardson Date: Thu, 14 Apr 2016 17:02:35 +0100 Message-Id: <1460649757-11862-2-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1460649757-11862-1-git-send-email-bruce.richardson@intel.com> References: <1460628921-25635-1-git-send-email-bruce.richardson@intel.com> <1460649757-11862-1-git-send-email-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH v2 1/3] i40e: require SSE4.1 support for vector driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 16:03:51 -0000 Later commits to improve the driver will make use of the SSE4.1 _mm_blend_epi16 intrinsic, so: * set the compilation level to always have SSE4.1 support, * and add in a runtime check for SSE4.1 as part of the condition checks for vector driver selection. Signed-off-by: Bruce Richardson --- drivers/net/i40e/Makefile | 6 ++++++ drivers/net/i40e/i40e_rxtx_vec.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile index 6dd6eaa..56b20d5 100644 --- a/drivers/net/i40e/Makefile +++ b/drivers/net/i40e/Makefile @@ -102,6 +102,12 @@ SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_ethdev_vf.c SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_pf.c SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_fdir.c +# vector PMD driver needs SSE4.1 support +ifeq ($(findstring RTE_MACHINE_CPUFLAG_SSE4_1,$(CFLAGS)),) +CFLAGS_i40e_rxtx_vec.o += -msse4.1 +endif + + # this lib depends upon: DEPDIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += lib/librte_eal lib/librte_ether DEPDIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += lib/librte_mempool lib/librte_mbuf diff --git a/drivers/net/i40e/i40e_rxtx_vec.c b/drivers/net/i40e/i40e_rxtx_vec.c index 047aff5..1e2fadd 100644 --- a/drivers/net/i40e/i40e_rxtx_vec.c +++ b/drivers/net/i40e/i40e_rxtx_vec.c @@ -751,6 +751,10 @@ i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev) struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode; struct rte_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf; + /* need SSE4.1 support */ + if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_1)) + return -1; + #ifndef RTE_LIBRTE_I40E_RX_OLFLAGS_ENABLE /* whithout rx ol_flags, no VP flag report */ if (rxmode->hw_vlan_strip != 0 || -- 2.5.5