From: Yongseok Koh Date: Wed, 14 Mar 2018 17:51:48 +0000 (-0700) Subject: net/mlx5: fix ARM build X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=264713ba1025e18436433a00fb14da8fc3f27101;p=dpdk.git net/mlx5: fix ARM build rdma-core v16 has a bug. The following compilation error occurs on ARM hosts. In file included from drivers/net/mlx5/mlx5_glue.h:16:0, from drivers/net/mlx5/mlx5_glue.c:11: /usr/include/infiniband/mlx5dv.h:144:2: error: unknown type name 'off_t' off_t uar_mmap_offset; ^ As a temporary fix, sys/types.h is included in PMD. This has been fixed in rdma-core v17. This can be removed when all the Linux distros are shipped with rdma-core v17 or back-ported fix. As of now, RedHat 7.5 is known to have rdma-core v16. Cc: stable@dpdk.org Signed-off-by: Yongseok Koh Acked-by: Adrien Mazarguil --- diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c index 1c4396adaa..be684d3787 100644 --- a/drivers/net/mlx5/mlx5_glue.c +++ b/drivers/net/mlx5/mlx5_glue.c @@ -7,6 +7,12 @@ #include #include +/* + * Not needed by this file; included to work around the lack of off_t + * definition for mlx5dv.h with unpatched rdma-core versions. + */ +#include + /* Verbs headers do not support -pedantic. */ #ifdef PEDANTIC #pragma GCC diagnostic ignored "-Wpedantic" diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c index e6971097be..3a7bcf654b 100644 --- a/drivers/net/mlx5/mlx5_vlan.c +++ b/drivers/net/mlx5/mlx5_vlan.c @@ -8,6 +8,12 @@ #include #include +/* + * Not needed by this file; included to work around the lack of off_t + * definition for mlx5dv.h with unpatched rdma-core versions. + */ +#include + /* Verbs headers do not support -pedantic. */ #ifdef PEDANTIC #pragma GCC diagnostic ignored "-Wpedantic"