* [dpdk-dev] [PATCH v2 1/5] net/nfp: disable nfp for 32-bit meson builds
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 0/5] " Bruce Richardson
@ 2019-05-28 11:07 ` Bruce Richardson
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 2/5] build: enable large file support on 32-bit Bruce Richardson
` (5 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Bruce Richardson @ 2019-05-28 11:07 UTC (permalink / raw)
To: dev
Cc: Shreyansh Jain, Alejandro Lucero, Anatoly Burakov, stable,
Maxime Coquelin, Zhihong Wang, Luca Boccassi, Zhang XuemingX,
Bruce Richardson
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 <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
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 ea51ac3..8c87c5b 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',
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v2 2/5] build: enable large file support on 32-bit
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 0/5] " Bruce Richardson
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 1/5] net/nfp: disable nfp for " Bruce Richardson
@ 2019-05-28 11:07 ` Bruce Richardson
2019-05-30 6:45 ` Shreyansh Jain
2019-06-04 14:49 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 3/5] build: remove unnecessary large file support defines Bruce Richardson
` (4 subsequent siblings)
6 siblings, 2 replies; 18+ messages in thread
From: Bruce Richardson @ 2019-05-28 11:07 UTC (permalink / raw)
To: dev
Cc: Shreyansh Jain, Alejandro Lucero, Anatoly Burakov, stable,
Maxime Coquelin, Zhihong Wang, Luca Boccassi, Zhang XuemingX,
Bruce Richardson
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 <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
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
CPU_LDFLAGS ?= -melf_i386
CPU_ASFLAGS ?= -felf
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/5] build: enable large file support on 32-bit
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 2/5] build: enable large file support on 32-bit Bruce Richardson
@ 2019-05-30 6:45 ` Shreyansh Jain
2019-06-04 14:49 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
1 sibling, 0 replies; 18+ messages in thread
From: Shreyansh Jain @ 2019-05-30 6:45 UTC (permalink / raw)
To: Bruce Richardson, dev
Cc: Alejandro Lucero, Anatoly Burakov, stable, Maxime Coquelin,
Zhihong Wang, Luca Boccassi, Zhang XuemingX
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Tuesday, May 28, 2019 4:38 PM
> To: dev@dpdk.org
> Cc: Shreyansh Jain <shreyansh.jain@nxp.com>; Alejandro Lucero
> <alejandro.lucero@netronome.com>; Anatoly Burakov
> <anatoly.burakov@intel.com>; stable@dpdk.org; Maxime Coquelin
> <maxime.coquelin@redhat.com>; Zhihong Wang <zhihong.wang@intel.com>; Luca
> Boccassi <bluca@debian.org>; Zhang XuemingX <xuemingx.zhang@intel.com>; Bruce
> Richardson <bruce.richardson@intel.com>
> Subject: [PATCH v2 2/5] build: enable large file support on 32-bit
>
> 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.
From DPAAX perspective, I am not worried about 32bit and dependency of large file support.
So, this 'don't care' from my side.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Luca Boccassi <bluca@debian.org>
> ---
> 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(-)
>
If this patch is merged, please ignore [1]
[1] http://patches.dpdk.org/patch/53798/
Acked-by: Shreyansh Jain <Shreyansh.jain@nxp.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v2 2/5] build: enable large file support on 32-bit
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 2/5] build: enable large file support on 32-bit Bruce Richardson
2019-05-30 6:45 ` Shreyansh Jain
@ 2019-06-04 14:49 ` Ferruh Yigit
1 sibling, 0 replies; 18+ messages in thread
From: Ferruh Yigit @ 2019-06-04 14:49 UTC (permalink / raw)
To: Bruce Richardson, dev, Shahaf Shuler, Yongseok Koh
Cc: Shreyansh Jain, Alejandro Lucero, Anatoly Burakov, stable,
Maxime Coquelin, Zhihong Wang, Luca Boccassi, Zhang XuemingX
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 <bruce.richardson@intel.com>
> Acked-by: Luca Boccassi <bluca@debian.org>
> ---
> 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
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v2 3/5] build: remove unnecessary large file support defines
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 0/5] " Bruce Richardson
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 1/5] net/nfp: disable nfp for " Bruce Richardson
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 2/5] build: enable large file support on 32-bit Bruce Richardson
@ 2019-05-28 11:07 ` Bruce Richardson
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 4/5] eal: mark unused function in 32-bit builds Bruce Richardson
` (3 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Bruce Richardson @ 2019-05-28 11:07 UTC (permalink / raw)
To: dev
Cc: Shreyansh Jain, Alejandro Lucero, Anatoly Burakov, stable,
Maxime Coquelin, Zhihong Wang, Luca Boccassi, Zhang XuemingX,
Bruce Richardson
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 <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
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 8e9860f..2485f3b 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 2972e4d..77e5201 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 1e9ebb8..b1849a2 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 <errno.h>
#include <stdarg.h>
#include <stdbool.h>
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 416dad8..40a0f68 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 <errno.h>
#include <fcntl.h>
#include <stdarg.h>
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 5dd3189..8623e91 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
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v2 4/5] eal: mark unused function in 32-bit builds
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 0/5] " Bruce Richardson
` (2 preceding siblings ...)
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 3/5] build: remove unnecessary large file support defines Bruce Richardson
@ 2019-05-28 11:07 ` Bruce Richardson
2019-05-28 11:46 ` Luca Boccassi
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 5/5] build: add libatomic dependency for 32-bit clang compile Bruce Richardson
` (2 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Bruce Richardson @ 2019-05-28 11:07 UTC (permalink / raw)
To: dev
Cc: Shreyansh Jain, Alejandro Lucero, Anatoly Burakov, stable,
Maxime Coquelin, Zhihong Wang, Luca Boccassi, Zhang XuemingX,
Bruce Richardson
The get_socket_mem_size() function is only used in 64-bit builds,
causing clang to warn about it for 32-bit builds. Add the __rte_unused
attribute to the function to silence the warning.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_eal/linux/eal/eal_memory.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 40a0f68..1853ace 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -1088,6 +1088,7 @@ remap_needed_hugepages(struct hugepage_file *hugepages, int n_pages)
return 0;
}
+__rte_unused /* function is unused on 32-bit builds */
static inline uint64_t
get_socket_mem_size(int socket)
{
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2 4/5] eal: mark unused function in 32-bit builds
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 4/5] eal: mark unused function in 32-bit builds Bruce Richardson
@ 2019-05-28 11:46 ` Luca Boccassi
0 siblings, 0 replies; 18+ messages in thread
From: Luca Boccassi @ 2019-05-28 11:46 UTC (permalink / raw)
To: Bruce Richardson, dev
On Tue, 2019-05-28 at 12:07 +0100, Bruce Richardson wrote:
> The get_socket_mem_size() function is only used in 64-bit builds,
> causing clang to warn about it for 32-bit builds. Add the
> __rte_unused
> attribute to the function to silence the warning.
>
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
> lib/librte_eal/linux/eal/eal_memory.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_eal/linux/eal/eal_memory.c
> b/lib/librte_eal/linux/eal/eal_memory.c
> index 40a0f68..1853ace 100644
> --- a/lib/librte_eal/linux/eal/eal_memory.c
> +++ b/lib/librte_eal/linux/eal/eal_memory.c
> @@ -1088,6 +1088,7 @@ remap_needed_hugepages(struct hugepage_file
> *hugepages, int n_pages)
> return 0;
> }
>
> +__rte_unused /* function is unused on 32-bit builds */
> static inline uint64_t
> get_socket_mem_size(int socket)
> {
Acked-by: Luca Boccassi <bluca@debian.org>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v2 5/5] build: add libatomic dependency for 32-bit clang compile
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 0/5] " Bruce Richardson
` (3 preceding siblings ...)
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 4/5] eal: mark unused function in 32-bit builds Bruce Richardson
@ 2019-05-28 11:07 ` Bruce Richardson
2019-05-28 11:46 ` Luca Boccassi
2019-06-03 22:00 ` [dpdk-dev] [PATCH v2 0/5] fix 32-bit meson builds Thomas Monjalon
2019-10-02 15:11 ` Kevin Traynor
6 siblings, 1 reply; 18+ messages in thread
From: Bruce Richardson @ 2019-05-28 11:07 UTC (permalink / raw)
To: dev
Cc: Shreyansh Jain, Alejandro Lucero, Anatoly Burakov, stable,
Maxime Coquelin, Zhihong Wang, Luca Boccassi, Zhang XuemingX,
Bruce Richardson
When compiling with clang on 32-bit platforms, we are missing copies
of 64-bit atomic functions. We can solve this by linking against
libatomic for the drivers and libs which need those atomic ops.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/event/octeontx/meson.build | 5 +++++
drivers/event/opdl/meson.build | 5 +++++
lib/librte_rcu/meson.build | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/drivers/event/octeontx/meson.build b/drivers/event/octeontx/meson.build
index 2b74bb6..3f83be6 100644
--- a/drivers/event/octeontx/meson.build
+++ b/drivers/event/octeontx/meson.build
@@ -11,3 +11,8 @@ sources = files('ssovf_worker.c',
)
deps += ['common_octeontx', 'mempool_octeontx', 'bus_vdev', 'pmd_octeontx']
+
+# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
+if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
+ ext_deps += cc.find_library('atomic')
+endif
diff --git a/drivers/event/opdl/meson.build b/drivers/event/opdl/meson.build
index cc6029c..e1cfb2d 100644
--- a/drivers/event/opdl/meson.build
+++ b/drivers/event/opdl/meson.build
@@ -9,3 +9,8 @@ sources = files(
'opdl_test.c',
)
deps += ['bus_vdev']
+
+# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
+if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
+ ext_deps += cc.find_library('atomic')
+endif
diff --git a/lib/librte_rcu/meson.build b/lib/librte_rcu/meson.build
index 0c2d5a2..43edb87 100644
--- a/lib/librte_rcu/meson.build
+++ b/lib/librte_rcu/meson.build
@@ -5,3 +5,8 @@ allow_experimental_apis = true
sources = files('rte_rcu_qsbr.c')
headers = files('rte_rcu_qsbr.h')
+
+# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
+if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
+ ext_deps += cc.find_library('atomic')
+endif
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2 5/5] build: add libatomic dependency for 32-bit clang compile
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 5/5] build: add libatomic dependency for 32-bit clang compile Bruce Richardson
@ 2019-05-28 11:46 ` Luca Boccassi
0 siblings, 0 replies; 18+ messages in thread
From: Luca Boccassi @ 2019-05-28 11:46 UTC (permalink / raw)
To: Bruce Richardson, dev
On Tue, 2019-05-28 at 12:07 +0100, Bruce Richardson wrote:
> When compiling with clang on 32-bit platforms, we are missing copies
> of 64-bit atomic functions. We can solve this by linking against
> libatomic for the drivers and libs which need those atomic ops.
>
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
> drivers/event/octeontx/meson.build | 5 +++++
> drivers/event/opdl/meson.build | 5 +++++
> lib/librte_rcu/meson.build | 5 +++++
> 3 files changed, 15 insertions(+)
>
> diff --git a/drivers/event/octeontx/meson.build
> b/drivers/event/octeontx/meson.build
> index 2b74bb6..3f83be6 100644
> --- a/drivers/event/octeontx/meson.build
> +++ b/drivers/event/octeontx/meson.build
> @@ -11,3 +11,8 @@ sources = files('ssovf_worker.c',
> )
>
> deps += ['common_octeontx', 'mempool_octeontx', 'bus_vdev',
> 'pmd_octeontx']
> +
> +# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
> +if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
> + ext_deps += cc.find_library('atomic')
> +endif
> diff --git a/drivers/event/opdl/meson.build
> b/drivers/event/opdl/meson.build
> index cc6029c..e1cfb2d 100644
> --- a/drivers/event/opdl/meson.build
> +++ b/drivers/event/opdl/meson.build
> @@ -9,3 +9,8 @@ sources = files(
> 'opdl_test.c',
> )
> deps += ['bus_vdev']
> +
> +# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
> +if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
> + ext_deps += cc.find_library('atomic')
> +endif
> diff --git a/lib/librte_rcu/meson.build b/lib/librte_rcu/meson.build
> index 0c2d5a2..43edb87 100644
> --- a/lib/librte_rcu/meson.build
> +++ b/lib/librte_rcu/meson.build
> @@ -5,3 +5,8 @@ allow_experimental_apis = true
>
> sources = files('rte_rcu_qsbr.c')
> headers = files('rte_rcu_qsbr.h')
> +
> +# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
> +if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
> + ext_deps += cc.find_library('atomic')
> +endif
Acked-by: Luca Boccassi <bluca@debian.org>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/5] fix 32-bit meson builds
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 0/5] " Bruce Richardson
` (4 preceding siblings ...)
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 5/5] build: add libatomic dependency for 32-bit clang compile Bruce Richardson
@ 2019-06-03 22:00 ` Thomas Monjalon
2019-10-02 15:11 ` Kevin Traynor
6 siblings, 0 replies; 18+ messages in thread
From: Thomas Monjalon @ 2019-06-03 22:00 UTC (permalink / raw)
To: Bruce Richardson
Cc: dev, Shreyansh Jain, Alejandro Lucero, Anatoly Burakov, stable,
Maxime Coquelin, Zhihong Wang, Luca Boccassi, Zhang XuemingX
28/05/2019 13:07, Bruce Richardson:
> This set fixes some issues seen on the automated CI system with building
> on 32-bit Linux distro's using meson and ninja. The fixes are to disable
> unsupported parts of the build, and switch the 32-bit builds to always
> having large file support, so that make and meson are consistent in that
> regard.
>
> V2: add two additional patches to fix clang builds. This allows the
> test-meson-builds.sh script to run successfully on 32-bit Ubuntu
> 16.04 systems.
>
> Bruce Richardson (5):
> net/nfp: disable nfp for 32-bit meson builds
> build: enable large file support on 32-bit
> build: remove unnecessary large file support defines
> eal: mark unused function in 32-bit builds
> build: add libatomic dependency for 32-bit clang compile
Applied, thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/5] fix 32-bit meson builds
2019-05-28 11:07 ` [dpdk-dev] [PATCH v2 0/5] " Bruce Richardson
` (5 preceding siblings ...)
2019-06-03 22:00 ` [dpdk-dev] [PATCH v2 0/5] fix 32-bit meson builds Thomas Monjalon
@ 2019-10-02 15:11 ` Kevin Traynor
2019-10-03 8:28 ` Bruce Richardson
6 siblings, 1 reply; 18+ messages in thread
From: Kevin Traynor @ 2019-10-02 15:11 UTC (permalink / raw)
To: Bruce Richardson, dev
Cc: Shreyansh Jain, Alejandro Lucero, Anatoly Burakov, stable,
Maxime Coquelin, Zhihong Wang, Luca Boccassi, Zhang XuemingX,
stable
On 28/05/2019 12:07, Bruce Richardson wrote:
> This set fixes some issues seen on the automated CI system with building
> on 32-bit Linux distro's using meson and ninja. The fixes are to disable
> unsupported parts of the build, and switch the 32-bit builds to always
> having large file support, so that make and meson are consistent in that
> regard.
>
> V2: add two additional patches to fix clang builds. This allows the
> test-meson-builds.sh script to run successfully on 32-bit Ubuntu
> 16.04 systems.
>
> Bruce Richardson (5):
> net/nfp: disable nfp for 32-bit meson builds
> build: enable large file support on 32-bit
> build: remove unnecessary large file support defines
> eal: mark unused function in 32-bit builds
> build: add libatomic dependency for 32-bit clang compile
>
Hi Bruce, Intel validation team reported failures with some 32-bit
builds with meson on 18.11.3-rc1. I've tested with these patches and it
fixes the problems.
I also took d23e141ffa52 ("build: set RTE_ARCH_64 based on pointer
size"), to avoid rebasing the other patches to check 'void *' size
multiple times.
Any objection to applying for 18.11 branch?
Kevin.
> drivers/common/dpaax/dpaax_iova_table.c | 4 ++--
> drivers/event/octeontx/meson.build | 5 +++++
> drivers/event/opdl/meson.build | 5 +++++
> drivers/net/nfp/meson.build | 2 +-
> 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 | 2 +-
> lib/librte_rcu/meson.build | 5 +++++
> lib/librte_vhost/Makefile | 2 +-
> mk/arch/arm/rte.vars.mk | 2 +-
> mk/arch/i686/rte.vars.mk | 2 +-
> 12 files changed, 22 insertions(+), 10 deletions(-)
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/5] fix 32-bit meson builds
2019-10-02 15:11 ` Kevin Traynor
@ 2019-10-03 8:28 ` Bruce Richardson
0 siblings, 0 replies; 18+ messages in thread
From: Bruce Richardson @ 2019-10-03 8:28 UTC (permalink / raw)
To: Kevin Traynor
Cc: dev, Shreyansh Jain, Alejandro Lucero, Anatoly Burakov, stable,
Maxime Coquelin, Zhihong Wang, Luca Boccassi, Zhang XuemingX
On Wed, Oct 02, 2019 at 04:11:56PM +0100, Kevin Traynor wrote:
> On 28/05/2019 12:07, Bruce Richardson wrote:
> > This set fixes some issues seen on the automated CI system with building
> > on 32-bit Linux distro's using meson and ninja. The fixes are to disable
> > unsupported parts of the build, and switch the 32-bit builds to always
> > having large file support, so that make and meson are consistent in that
> > regard.
> >
> > V2: add two additional patches to fix clang builds. This allows the
> > test-meson-builds.sh script to run successfully on 32-bit Ubuntu
> > 16.04 systems.
> >
> > Bruce Richardson (5):
> > net/nfp: disable nfp for 32-bit meson builds
> > build: enable large file support on 32-bit
> > build: remove unnecessary large file support defines
> > eal: mark unused function in 32-bit builds
> > build: add libatomic dependency for 32-bit clang compile
> >
>
> Hi Bruce, Intel validation team reported failures with some 32-bit
> builds with meson on 18.11.3-rc1. I've tested with these patches and it
> fixes the problems.
>
> I also took d23e141ffa52 ("build: set RTE_ARCH_64 based on pointer
> size"), to avoid rebasing the other patches to check 'void *' size
> multiple times.
>
> Any objection to applying for 18.11 branch?
>
> Kevin.
>
Nope, no objections.
Thanks.
^ permalink raw reply [flat|nested] 18+ messages in thread