Skip to content

Commit

Permalink
uapi: fix rdma/mlx5-abi.h userspace compilation errors
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
  • Loading branch information
ldv-alt authored and dledford committed Mar 25, 2017
1 parent 0957c29 commit 812755d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/uapi/rdma/mlx5-abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 812755d

Please sign in to comment.