RDMA: Change all uapi headers to use __aligned_u64 instead of __u64

The new auditing standard for the subsystem will be to only use
__aligned_64 in uapi headers to try and prevent 32/64 compat bugs
from existing in the future.

Changing all existing usage will help ensure new developers copy the
right idea.

The before/after of this patch was tested using pahole on 32 and 64
bit compiles to confirm it has no change in the structure layout, so
this patch is a NOP.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Jason Gunthorpe
2018-03-20 14:19:51 -06:00
parent f2e9bfac13
commit 26b9906612
19 changed files with 276 additions and 276 deletions

View File

@@ -80,8 +80,8 @@ struct rdma_ucm_cmd_hdr {
};
struct rdma_ucm_create_id {
__u64 uid;
__u64 response;
__aligned_u64 uid;
__aligned_u64 response;
__u16 ps;
__u8 qp_type;
__u8 reserved[5];
@@ -92,7 +92,7 @@ struct rdma_ucm_create_id_resp {
};
struct rdma_ucm_destroy_id {
__u64 response;
__aligned_u64 response;
__u32 id;
__u32 reserved;
};
@@ -102,7 +102,7 @@ struct rdma_ucm_destroy_id_resp {
};
struct rdma_ucm_bind_ip {
__u64 response;
__aligned_u64 response;
struct sockaddr_in6 addr;
__u32 id;
};
@@ -143,13 +143,13 @@ enum {
};
struct rdma_ucm_query {
__u64 response;
__aligned_u64 response;
__u32 id;
__u32 option;
};
struct rdma_ucm_query_route_resp {
__u64 node_guid;
__aligned_u64 node_guid;
struct ib_user_path_rec ib_route[2];
struct sockaddr_in6 src_addr;
struct sockaddr_in6 dst_addr;
@@ -159,7 +159,7 @@ struct rdma_ucm_query_route_resp {
};
struct rdma_ucm_query_addr_resp {
__u64 node_guid;
__aligned_u64 node_guid;
__u8 port_num;
__u8 reserved;
__u16 pkey;
@@ -210,7 +210,7 @@ struct rdma_ucm_listen {
};
struct rdma_ucm_accept {
__u64 uid;
__aligned_u64 uid;
struct rdma_ucm_conn_param conn_param;
__u32 id;
__u32 reserved;
@@ -228,7 +228,7 @@ struct rdma_ucm_disconnect {
};
struct rdma_ucm_init_qp_attr {
__u64 response;
__aligned_u64 response;
__u32 id;
__u32 qp_state;
};
@@ -239,8 +239,8 @@ struct rdma_ucm_notify {
};
struct rdma_ucm_join_ip_mcast {
__u64 response; /* rdma_ucm_create_id_resp */
__u64 uid;
__aligned_u64 response; /* rdma_ucm_create_id_resp */
__aligned_u64 uid;
struct sockaddr_in6 addr;
__u32 id;
};
@@ -253,8 +253,8 @@ enum {
};
struct rdma_ucm_join_mcast {
__u64 response; /* rdma_ucma_create_id_resp */
__u64 uid;
__aligned_u64 response; /* rdma_ucma_create_id_resp */
__aligned_u64 uid;
__u32 id;
__u16 addr_size;
__u16 join_flags;
@@ -262,11 +262,11 @@ struct rdma_ucm_join_mcast {
};
struct rdma_ucm_get_event {
__u64 response;
__aligned_u64 response;
};
struct rdma_ucm_event_resp {
__u64 uid;
__aligned_u64 uid;
__u32 id;
__u32 event;
__u32 status;
@@ -296,7 +296,7 @@ enum {
};
struct rdma_ucm_set_option {
__u64 optval;
__aligned_u64 optval;
__u32 id;
__u32 level;
__u32 optname;
@@ -304,7 +304,7 @@ struct rdma_ucm_set_option {
};
struct rdma_ucm_migrate_id {
__u64 response;
__aligned_u64 response;
__u32 id;
__u32 fd;
};