Skip to content

Commit

Permalink
IB/uverbs: Use __aligned_u64 for uapi headers
Browse files Browse the repository at this point in the history
This has no impact on the structure layout since these structs already
have their u64s already properly aligned, but it does document that we
have this requirement for 32 bit compatibility.

Signed-off-by: Leon Romanovsky <[email protected]>
Reviewed-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
  • Loading branch information
jgunthorpe committed Feb 15, 2018
1 parent 3d89459 commit 5d2beb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/uapi/rdma/rdma_user_ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ struct ib_uverbs_attr {
__u16 len; /* only for pointers */
__u16 flags; /* combination of UVERBS_ATTR_F_XXXX */
__u16 reserved;
__u64 data; /* ptr to command, inline data or idr/fd */
__aligned_u64 data; /* ptr to command, inline data or idr/fd */
};

struct ib_uverbs_ioctl_hdr {
__u16 length;
__u16 object_id;
__u16 method_id;
__u16 num_attrs;
__u64 reserved;
__aligned_u64 reserved;
struct ib_uverbs_attr attrs[0];
};

Expand Down

0 comments on commit 5d2beb5

Please sign in to comment.