Skip to contentSkip to conversation

uapi: fix rdma/mlx5-abi.h userspace compilation errors

PATCH Applied Dmitry V. Levin 2 participants 2 messages Feb 24, 2017 – Mar 25, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uapi: fix rdma/mlx5-abi.h userspace compilation errors

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];

---
 include/uapi/rdma/mlx5-abi.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/rdma/mlx5-abi.h +2 -1
index da7cd62..0b3d308 100644
@@ -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 {
Signature · 1 line
ldv
Applied
#1 lore raw
Quoted 10 lines · Dmitry V. Levin

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,

Quoted 8 lines

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];

Thanks, applied.

Quoted 26 lines

---
 include/uapi/rdma/mlx5-abi.h | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/rdma/mlx5- renamed from include/uapi/rdma/mlx5-abi.h +0 -0

abi.h
index da7cd62..0b3d308 100644

include/uapi/rdma/mlx5-abi.h +0 -0
@@ -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,

include/uapi/rdma/mlx5-abi.h +0 -0
@@ -66,7 +67,7 @@ struct mlx5_ib_alloc_ucontext_req {
  };


 enum mlx5_lib_caps {

include/uapi/rdma/mlx5-abi.h +1 -1
-	MLX5_LIB_CAP_4K_UAR	= (u64)1 << 0,
+	MLX5_LIB_CAP_4K_UAR	= (__u64)1 << 0,

 };

 struct mlx5_ib_alloc_ucontext_req_v2 {

Signature · 9 lines
Doug Ledford <[email protected]>
    GPG KeyID: B826A3330E572FDD
   
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html