From patchwork Mon May 27 16:15:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53711 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8CD0A1B944; Mon, 27 May 2019 18:15:37 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B534A3DC; Mon, 27 May 2019 18:15:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 May 2019 09:15:34 -0700 X-ExtLoop1: 1 Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by fmsmga004.fm.intel.com with ESMTP; 27 May 2019 09:15:32 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Shreyansh Jain , Alejandro Lucero , Anatoly Burakov , stable@dpdk.org, Maxime Coquelin , Zhihong Wang , Luca Boccassi , Zhang XuemingX , Bruce Richardson Date: Mon, 27 May 2019 17:15:07 +0100 Message-Id: <20190527161509.50252-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190527161509.50252-1-bruce.richardson@intel.com> References: <20190527161509.50252-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 1/3] net/nfp: disable nfp for 32-bit meson builds 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" From comment in the build config for the make build-system: "NFP PMD is not supported on 32-bit" Therefore disable NFP for 32-bit meson builds as well as for 32-bit make ones. Signed-off-by: Bruce Richardson --- drivers/net/nfp/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/meson.build b/drivers/net/nfp/meson.build index ea51ac3c3..cc68b4870 100644 --- a/drivers/net/nfp/meson.build +++ b/drivers/net/nfp/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -if not is_linux +if not is_linux or not dpdk_conf.get('RTE_ARCH_64') build = false endif sources = files('nfpcore/nfp_cpp_pcie_ops.c', From patchwork Mon May 27 16:15:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53712 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D7DEB1B948; Mon, 27 May 2019 18:15:43 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 94D3B3576; Mon, 27 May 2019 18:15:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 May 2019 09:15:41 -0700 X-ExtLoop1: 1 Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by fmsmga004.fm.intel.com with ESMTP; 27 May 2019 09:15:39 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Shreyansh Jain , Alejandro Lucero , Anatoly Burakov , stable@dpdk.org, Maxime Coquelin , Zhihong Wang , Luca Boccassi , Zhang XuemingX , Bruce Richardson Date: Mon, 27 May 2019 17:15:08 +0100 Message-Id: <20190527161509.50252-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190527161509.50252-1-bruce.richardson@intel.com> References: <20190527161509.50252-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/3] build: enable large file support on 32-bit 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" By default on 32-bit systems, file offsets are given as 32-bit values which prevents support for large files. While this is unlikely to be a problem, enabling large file support globally makes "make" and "meson" builds consistent, since meson always enables large file support, and without this change, the size of "struct stat" fields will be different between the two builds. The only location where this appears to be significant is in the dpaax common code, where a printf needs to be updated for 32-bit builds. Signed-off-by: Bruce Richardson --- drivers/common/dpaax/dpaax_iova_table.c | 4 ++-- mk/arch/arm/rte.vars.mk | 2 +- mk/arch/i686/rte.vars.mk | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c index 2dd38a920..ae0af0919 100644 --- a/drivers/common/dpaax/dpaax_iova_table.c +++ b/drivers/common/dpaax/dpaax_iova_table.c @@ -99,7 +99,7 @@ read_memory_node(unsigned int *count) goto cleanup; } - DPAAX_DEBUG("Size of device-tree mem node: %lu", statbuf.st_size); + DPAAX_DEBUG("Size of device-tree mem node: %" PRIu64, statbuf.st_size); if (statbuf.st_size > MEM_NODE_FILE_LEN) { DPAAX_DEBUG("More memory nodes available than assumed."); DPAAX_DEBUG("System may not work properly!"); @@ -118,7 +118,7 @@ read_memory_node(unsigned int *count) */ *count = (statbuf.st_size / 16); if ((*count) <= 0 || (statbuf.st_size % 16 != 0)) { - DPAAX_DEBUG("Invalid memory node values or count. (size=%lu)", + DPAAX_DEBUG("Invalid memory node values or count. (size=%" PRIu64 ")", statbuf.st_size); goto cleanup; } diff --git a/mk/arch/arm/rte.vars.mk b/mk/arch/arm/rte.vars.mk index 27b114761..dc8c10a24 100644 --- a/mk/arch/arm/rte.vars.mk +++ b/mk/arch/arm/rte.vars.mk @@ -4,7 +4,7 @@ ARCH ?= arm CROSS ?= -CPU_CFLAGS ?= -marm -munaligned-access +CPU_CFLAGS ?= -marm -munaligned-access -D_FILE_OFFSET_BITS=64 CPU_LDFLAGS ?= CPU_ASFLAGS ?= -felf diff --git a/mk/arch/i686/rte.vars.mk b/mk/arch/i686/rte.vars.mk index 3f48f6744..c867883f1 100644 --- a/mk/arch/i686/rte.vars.mk +++ b/mk/arch/i686/rte.vars.mk @@ -24,7 +24,7 @@ ARCH ?= i386 ARCH_DIR := x86 CROSS ?= -CPU_CFLAGS ?= -m32 +CPU_CFLAGS ?= -m32 -D_FILE_OFFSET_BITS=64 CPU_LDFLAGS ?= -melf_i386 CPU_ASFLAGS ?= -felf From patchwork Mon May 27 16:15:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53713 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BFFCF1B955; Mon, 27 May 2019 18:15:48 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5FDBD1B952; Mon, 27 May 2019 18:15:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 May 2019 09:15:46 -0700 X-ExtLoop1: 1 Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by fmsmga004.fm.intel.com with ESMTP; 27 May 2019 09:15:44 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Shreyansh Jain , Alejandro Lucero , Anatoly Burakov , stable@dpdk.org, Maxime Coquelin , Zhihong Wang , Luca Boccassi , Zhang XuemingX , Bruce Richardson Date: Mon, 27 May 2019 17:15:09 +0100 Message-Id: <20190527161509.50252-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190527161509.50252-1-bruce.richardson@intel.com> References: <20190527161509.50252-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 3/3] build: remove unnecessary large file support defines 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" Since we now always use _FILE_OFFSET_BITS=64 flag when building DPDK, we can remove the Makefile and C-file #defines setting it individually for parts of the build. Signed-off-by: Bruce Richardson --- examples/vhost_crypto/meson.build | 1 - examples/vhost_scsi/meson.build | 1 - lib/librte_eal/linux/eal/eal_memalloc.c | 1 - lib/librte_eal/linux/eal/eal_memory.c | 1 - lib/librte_vhost/Makefile | 2 +- 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vhost_crypto/meson.build b/examples/vhost_crypto/meson.build index 8e9860f03..2485f3bd1 100644 --- a/examples/vhost_crypto/meson.build +++ b/examples/vhost_crypto/meson.build @@ -9,7 +9,6 @@ build = dpdk_conf.has('RTE_LIBRTE_VHOST') allow_experimental_apis = true deps += ['vhost', 'cryptodev'] -cflags += ['-D_FILE_OFFSET_BITS=64'] sources = files( 'main.c' ) diff --git a/examples/vhost_scsi/meson.build b/examples/vhost_scsi/meson.build index 2972e4d61..77e5201bd 100644 --- a/examples/vhost_scsi/meson.build +++ b/examples/vhost_scsi/meson.build @@ -15,7 +15,6 @@ if not cc.has_header('linux/virtio_scsi.h') endif deps += 'vhost' -cflags += ['-D_FILE_OFFSET_BITS=64'] sources = files( 'scsi.c', 'vhost_scsi.c' ) diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c index 1e9ebb86d..b1849a28a 100644 --- a/lib/librte_eal/linux/eal/eal_memalloc.c +++ b/lib/librte_eal/linux/eal/eal_memalloc.c @@ -2,7 +2,6 @@ * Copyright(c) 2017-2018 Intel Corporation */ -#define _FILE_OFFSET_BITS 64 #include #include #include diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c index 416dad898..40a0f687a 100644 --- a/lib/librte_eal/linux/eal/eal_memory.c +++ b/lib/librte_eal/linux/eal/eal_memory.c @@ -3,7 +3,6 @@ * Copyright(c) 2013 6WIND S.A. */ -#define _FILE_OFFSET_BITS 64 #include #include #include diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile index 5dd318987..8623e91c0 100644 --- a/lib/librte_vhost/Makefile +++ b/lib/librte_vhost/Makefile @@ -11,7 +11,7 @@ EXPORT_MAP := rte_vhost_version.map LIBABIVER := 4 CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -D_FILE_OFFSET_BITS=64 +CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 CFLAGS += -I vhost_user CFLAGS += -fno-strict-aliasing LDLIBS += -lpthread