From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 7C74CA0096 for ; Tue, 4 Jun 2019 16:50:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A02A61BBD6; Tue, 4 Jun 2019 16:50:05 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 4B01A1B9DF; Tue, 4 Jun 2019 16:50:03 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2019 07:50:02 -0700 X-ExtLoop1: 1 Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.26]) ([10.237.221.26]) by orsmga005.jf.intel.com with ESMTP; 04 Jun 2019 07:49:59 -0700 To: Bruce Richardson , dev@dpdk.org, Shahaf Shuler , Yongseok Koh Cc: Shreyansh Jain , Alejandro Lucero , Anatoly Burakov , stable@dpdk.org, Maxime Coquelin , Zhihong Wang , Luca Boccassi , Zhang XuemingX References: <20190527161509.50252-1-bruce.richardson@intel.com> <20190528110748.10772-1-bruce.richardson@intel.com> <20190528110748.10772-3-bruce.richardson@intel.com> From: Ferruh Yigit Openpgp: preference=signencrypt Autocrypt: addr=ferruh.yigit@intel.com; prefer-encrypt=mutual; keydata= mQINBFXZCFABEADCujshBOAaqPZpwShdkzkyGpJ15lmxiSr3jVMqOtQS/sB3FYLT0/d3+bvy qbL9YnlbPyRvZfnP3pXiKwkRoR1RJwEo2BOf6hxdzTmLRtGtwWzI9MwrUPj6n/ldiD58VAGQ +iR1I/z9UBUN/ZMksElA2D7Jgg7vZ78iKwNnd+vLBD6I61kVrZ45Vjo3r+pPOByUBXOUlxp9 GWEKKIrJ4eogqkVNSixN16V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6gZe4jie8q MJpeHB9O+936fSXA0W2X0het60wJQQ45O8TpTcxpc9nGzcE4MTaLAI3E8TjIXAO0cPqUNLyp g0DXezmTw5BU+SKZ51+jSKOtFmzJCHOJZQaMeCHD+G3CrdUHQVQBb5AeuH3KFv9ltgDcWsc8 YO70o3+tGHwcEnyXLdrI0q05wV7ncnLdkgVo+VUN4092bNMPwYly1TZWcU3Jw5gczOUEfTY7 sgo6E/sGX3B+FzgIs5t4yi1XOweCAQ/mPnb6uFeNENEFyGKyMG1HtjwBqnftbiFO3qitEIUY xWGQH23oKscv7i9lT0gg2D+ktzZhVWwHJVY/2vWSB9aCSWChcH2BT+lWrkwSpoPhy+almM84 Qz2wF72/d4ce4L27pSrS+vOXtXHLGOOGcAn8yr9TV0kM4aR+NbGBRXGKhG6w4lY54uNd9IBa ARIPUhij5JSygxZCBaJKo+X64AHGkk5bXq+f0anwAMNuJXbYC/lz4DEdKmPgQGShOWNs1Y1a N3cI87Hun/RBVwQ0a3Tr1g6OWJ6xK8cYbMcoR8NZ7L9ALMeJeuUDQR39+fEeHg/6sQN0P0mv 0sL+//BAJphCzDk8ztbrFw+JaPtgzZpRSM6JhxnY+YMAsatJRXA0WSpYP5zzl7yu/GZJIgsv VQ== Message-ID: Date: Tue, 4 Jun 2019 15:49:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190528110748.10772-3-bruce.richardson@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2 2/5] 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" On 5/28/2019 12:07 PM, Bruce Richardson wrote: > 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 > Acked-by: Luca Boccassi > --- > 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 2dd38a9..ae0af09 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 27b1147..dc8c10a 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 3f48f67..c867883 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 Previously, 'off_t' was "long int" both for 32-bit or 64-bit, so in the printf using "%ld" was OK. But with this change 'off_t' becomes 'uint64_t' and just using '%ld' in the format will cause error, as it is happening in 'mlx5' [1]. All 'off_t' usage should be checked for this change. Shahaf, Yongseok, Can you please send a fix for below build error? Thanks, ferruh [1] In file included from .../dpdk/i686-native-linuxapp-gcc/include/rte_compat.h:8, from .../dpdk/i686-native-linuxapp-gcc/include/rte_mbuf.h:35, from .../dpdk/drivers/net/mlx5/mlx5_txq.c:24: .../dpdk/drivers/net/mlx5/mlx5_txq.c: In function ‘mlx5_txq_ibv_new’: .../dpdk/drivers/net/mlx5/mlx5_defs.h:14:26: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘off_t’ {aka ‘long long int’} [-Werror=format=] 14 | #define MLX5_DRIVER_NAME "net_mlx5" | ^~~~~~~~~~ .../dpdk/i686-native-linuxapp-gcc/include/rte_common.h:642:27: note: in definition of macro ‘RTE_FMT’ 642 | #define RTE_FMT(fmt, ...) fmt "%.0s", __VA_ARGS__ "" | ^~~ .../dpdk/drivers/net/mlx5/mlx5_utils.h:79:11: note: in expansion of macro ‘MLX5_DRIVER_NAME’ 79 | RTE_FMT(MLX5_DRIVER_NAME ": " \ | ^~~~~~~~~~~~~~~~ .../dpdk/drivers/net/mlx5/mlx5_utils.h:101:2: note: in expansion of macro ‘PMD_DRV_LOG___’ 101 | PMD_DRV_LOG___(level, __VA_ARGS__) | ^~~~~~~~~~~~~~ .../dpdk/drivers/net/mlx5/mlx5_utils.h:103:2: note: in expansion of macro ‘PMD_DRV_LOG__’ 103 | PMD_DRV_LOG__(level, s "\n", __VA_ARGS__) | ^~~~~~~~~~~~~ .../dpdk/drivers/net/mlx5/mlx5_utils.h:109:2: note: in expansion of macro ‘PMD_DRV_LOG_’ 109 | PMD_DRV_LOG_(level, \ | ^~~~~~~~~~~~ .../dpdk/drivers/net/mlx5/mlx5_txq.c:569:3: note: in expansion of macro ‘DRV_LOG’ 569 | DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx", | ^~~~~~~ .../dpdk/drivers/net/mlx5/mlx5_txq.c:569:48: note: format string is defined here 569 | DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx", | ~~^ | | | long unsigned int | %llx cc1: all warnings being treated as errors