From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 3FDDA1C01 for ; Wed, 25 Jul 2018 15:19:06 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from shahafs@mellanox.com) with ESMTPS (AES256-SHA encrypted); 25 Jul 2018 16:22:18 +0300 Received: from unicorn01.mtl.labs.mlnx. (unicorn01.mtl.labs.mlnx [10.7.12.62]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w6PDJ3Mi027492; Wed, 25 Jul 2018 16:19:03 +0300 From: Shahaf Shuler To: yskoh@mellanox.com Cc: dev@dpdk.org, Yaroslav Brustinov , stable@dpdk.org, nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com Date: Wed, 25 Jul 2018 16:18:54 +0300 Message-Id: <20180725131854.51881-1-shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180724085445.52206-1-shahafs@mellanox.com> References: <20180724085445.52206-1-shahafs@mellanox.com> Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix linkage error for glue lib 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: , X-List-Received-Date: Wed, 25 Jul 2018 13:19:06 -0000 From: Yaroslav Brustinov addressing a gcc 4.7.2 bug that cannot be reproduced with latter versions: "bin/ld: Warning: alignment 8 of symbol `mlx5_glue' in src/dpdk/drivers/net/mlx5/mlx5_glue.c.21.o is smaller than 16 in src/dpdk/drivers/net/mlx5/mlx5_rxq.c.21.o" Fix it be forcing the alignment of the glue lib. Fixes: 0e83b8e536c1 ("net/mlx5: move rdma-core calls to separate file") Cc: stable@dpdk.org Cc: nelio.laranjeiro@6wind.com Cc: adrien.mazarguil@6wind.com Signed-off-by: Yaroslav Brustinov Signed-off-by: Shahaf Shuler --- On v2: - Forced alignment using alignas to the size of the cacheline. --- drivers/net/mlx5/mlx5_glue.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c index c7965e51fe..705232f614 100644 --- a/drivers/net/mlx5/mlx5_glue.c +++ b/drivers/net/mlx5/mlx5_glue.c @@ -6,6 +6,7 @@ #include #include #include +#include /* * Not needed by this file; included to work around the lack of off_t @@ -23,6 +24,8 @@ #pragma GCC diagnostic error "-Wpedantic" #endif +#include + #include "mlx5_autoconf.h" #include "mlx5_glue.h" @@ -343,7 +346,8 @@ mlx5_glue_dv_create_qp(struct ibv_context *context, #endif } -const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){ +alignas(RTE_CACHE_LINE_SIZE) +const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) { .version = MLX5_GLUE_VERSION, .fork_init = mlx5_glue_fork_init, .alloc_pd = mlx5_glue_alloc_pd, -- 2.12.0