From 2854ba22c583cd4b40c2d52e3279dece175ce1ca Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Thu, 19 Jul 2018 13:00:22 +0300 Subject: [PATCH] net/mlx5: fix linkage of glue lib with gcc 4.7.2 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 Signed-off-by: Yaroslav Brustinov Signed-off-by: Shahaf Shuler Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_glue.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c index c7965e51fe..84f9492a7b 100644 --- a/drivers/net/mlx5/mlx5_glue.c +++ b/drivers/net/mlx5/mlx5_glue.c @@ -4,6 +4,7 @@ */ #include +#include #include #include @@ -23,6 +24,8 @@ #pragma GCC diagnostic error "-Wpedantic" #endif +#include + #include "mlx5_autoconf.h" #include "mlx5_glue.h" @@ -343,6 +346,7 @@ mlx5_glue_dv_create_qp(struct ibv_context *context, #endif } +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, -- 2.20.1