From patchwork Thu Apr 6 17:05:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 23303 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 040342C6B; Thu, 6 Apr 2017 19:05:41 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id F41482B9B for ; Thu, 6 Apr 2017 19:05:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491498340; x=1523034340; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=lxFeSPbSn9Zfe2YIhQp/YTjLZAiL9VNQm1SRv2U65F4=; b=p9isOq1WBDwwb0gLbsIto8Nm63V7yqXrxY+LO5BsnEuVDAgyswms38w6 0u3VteLfCgzBe2h/dJTSoK/9DEzZvA==; Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2017 10:05:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,160,1488873600"; d="scan'208";a="84194142" Received: from sivswdev02.ir.intel.com ([10.237.217.46]) by orsmga005.jf.intel.com with ESMTP; 06 Apr 2017 10:05:13 -0700 From: Ferruh Yigit To: Jerin Jacob , Bruce Richardson , Harry van Haaren , Thomas Monjalon Cc: dev@dpdk.org, Ferruh Yigit Date: Thu, 6 Apr 2017 18:05:09 +0100 Message-Id: <20170406170511.22289-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20170406134637.4484-1-ferruh.yigit@intel.com> References: <20170406134637.4484-1-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH v3 1/3] net/thunderx: disable PMD for older compilers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Disable for gcc < 4.7 and icc <= 14.0 PMD uses some compiler builtins and new compiler options. Tested with gcc 4.5.1 and following were not supported: option: -Ofast macros: _Static_assert __ORDER_LITTLE_ENDIAN__ __ORDER_BIG_ENDIAN__ __BYTE_ORDER__ __atomic_fetch_add __ATOMIC_ACQUIRE __atomic_load_n __ATOMIC_RELAXED __atomic_store_n __ATOMIC_RELEASE It is not easy to fix all in PMD, disabling PMD for older compilers. Signed-off-by: Ferruh Yigit --- drivers/net/Makefile | 5 +++++ mk/toolchain/gcc/rte.toolchain-compat.mk | 5 +++++ mk/toolchain/icc/rte.toolchain-compat.mk | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/drivers/net/Makefile b/drivers/net/Makefile index b94582d..3481eff 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -31,6 +31,11 @@ include $(RTE_SDK)/mk/rte.vars.mk +# set in mk/toolchain/xxx/rte.toolchain-compat.mk +ifeq ($(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD),d) + $(warning thunderx pmd is not supported by older compilers) +endif + core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether core-libs += librte_net librte_kvargs diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk index 6eed20c..280dde2 100644 --- a/mk/toolchain/gcc/rte.toolchain-compat.mk +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk @@ -89,4 +89,9 @@ else ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1) MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS)) endif + + # Disable thunderx PMD for gcc < 4.7 + ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1) + CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d + endif endif diff --git a/mk/toolchain/icc/rte.toolchain-compat.mk b/mk/toolchain/icc/rte.toolchain-compat.mk index 4134466..73770f7 100644 --- a/mk/toolchain/icc/rte.toolchain-compat.mk +++ b/mk/toolchain/icc/rte.toolchain-compat.mk @@ -72,4 +72,9 @@ else # remove march options MACHINE_CFLAGS := $(patsubst -march=%,-xSSE3,$(MACHINE_CFLAGS)) endif + + # Disable thunderx PMD for icc <= 14.0 + ifeq ($(shell test $(ICC_MAJOR_VERSION) -le 14 && echo 1), 1) + CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d + endif endif