Re: [PATCH] uapi: fix rdma/mlx5-abi.h userspace compilation errors

From: Doug Ledford
Date: Fri Mar 24 2017 - 22:03:17 EST


On Fri, 2017-02-24 at 03:28 +0300, Dmitry V. Levin wrote:
> Consistently use types from linux/types.h to fix the following
> rdma/mlx5-abi.h userspace compilation errors:
>
> /usr/include/rdma/mlx5-abi.h:69:25: error: 'u64' undeclared here (not
> in a function)
> Â MLX5_LIB_CAP_4K_UAR = (u64)1 << 0,
> /usr/include/rdma/mlx5-abi.h:69:29: error: expected ',' or '}' before
> numeric constant
> Â MLX5_LIB_CAP_4K_UAR = (u64)1 << 0,
>
> Include <linux/if_ether.h> to fix the following rdma/mlx5-abi.h
> userspace compilation error:
>
> /usr/include/rdma/mlx5-abi.h:286:12: error: 'ETH_ALEN' undeclared
> here (not in a function)
> Â __u8 dmac[ETH_ALEN];
>
> Signed-off-by: Dmitry V. Levin <ldv@xxxxxxxxxxxx>

Thanks, applied.

> ---
> Âinclude/uapi/rdma/mlx5-abi.h | 3 ++-
> Â1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/rdma/mlx5-abi.h b/include/uapi/rdma/mlx5-
> abi.h
> index da7cd62..0b3d308 100644
> --- a/include/uapi/rdma/mlx5-abi.h
> +++ b/include/uapi/rdma/mlx5-abi.h
> @@ -34,6 +34,7 @@
> Â#define MLX5_ABI_USER_H
> Â
> Â#include <linux/types.h>
> +#include <linux/if_ether.h> /* For ETH_ALEN. */
> Â
> Âenum {
> Â MLX5_QP_FLAG_SIGNATURE = 1 << 0,
> @@ -66,7 +67,7 @@ struct mlx5_ib_alloc_ucontext_req {
> Â};
> Â
> Âenum mlx5_lib_caps {
> - MLX5_LIB_CAP_4K_UAR = (u64)1 << 0,
> + MLX5_LIB_CAP_4K_UAR = (__u64)1 << 0,
> Â};
> Â
> Âstruct mlx5_ib_alloc_ucontext_req_v2 {
--
Doug Ledford <dledford@xxxxxxxxxx>
  GPG KeyID: B826A3330E572FDD
 Â
Key fingerprint = AE6B 1BDA 122B 23B4 265B Â1274 B826 A333 0E57 2FDD