These changes were accepted into rdma-core mainline as part of the series that uses only the kernel headers. This patch is a simpler version for backporting. Based on kernel: commit 366380a0c835 ("RDMA/mlx4: Fix uABI structure layouts for 32/64 compat") commit f2e9bfac13c9 ("RDMA/rxe: Fix uABI structure layouts for 32/64 compat") Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- kernel-headers/rdma/rdma_user_rxe.h | 31 +++++++++++++++++++---------- providers/mlx4/mlx4-abi.h | 1 + providers/rxe/rxe-abi.h | 1 + 3 files changed, 22 insertions(+), 11 deletions(-) Nicolas, this patch is for all of the stable backports. It is bit complicated because we probably shouldn't just backport the transition to DECLARE_DRV_CMD into -stable This does not get applied to rdma-core HEAD since it is already present in some form.. Jason diff --git a/kernel-headers/rdma/rdma_user_rxe.h b/kernel-headers/rdma/rdma_user_rxe.h index e3e6852b58eb45..7e05018ff04154 100644 --- a/kernel-headers/rdma/rdma_user_rxe.h +++ b/kernel-headers/rdma/rdma_user_rxe.h @@ -58,6 +58,8 @@ struct rxe_global_route { struct rxe_av { __u8 port_num; __u8 network_type; + __u16 reserved1; + __u32 reserved2; struct rxe_global_route grh; union { struct sockaddr_in _sockaddr_in; @@ -66,7 +68,7 @@ struct rxe_av { }; struct rxe_send_wr { - __u64 wr_id; + __aligned_u64 wr_id; __u32 num_sge; __u32 opcode; __u32 send_flags; @@ -76,36 +78,42 @@ struct rxe_send_wr { } ex; union { struct { - __u64 remote_addr; + __aligned_u64 remote_addr; __u32 rkey; + __u32 reserved; } rdma; struct { - __u64 remote_addr; - __u64 compare_add; - __u64 swap; + __aligned_u64 remote_addr; + __aligned_u64 compare_add; + __aligned_u64 swap; __u32 rkey; + __u32 reserved; } atomic; struct { __u32 remote_qpn; __u32 remote_qkey; __u16 pkey_index; } ud; + /* reg is only used by the kernel and is not part of the uapi */ struct { - struct ib_mr *mr; + union { + struct ib_mr *mr; + __aligned_u64 reserved; + }; __u32 key; - int access; + __u32 access; } reg; } wr; }; struct rxe_sge { - __u64 addr; + __aligned_u64 addr; __u32 length; __u32 lkey; }; struct mminfo { - __u64 offset; + __aligned_u64 offset; __u32 size; __u32 pad; }; @@ -116,6 +124,7 @@ struct rxe_dma_info { __u32 cur_sge; __u32 num_sge; __u32 sge_offset; + __u32 reserved; union { __u8 inline_data[0]; struct rxe_sge sge[0]; @@ -127,7 +136,7 @@ struct rxe_send_wqe { struct rxe_av av; __u32 status; __u32 state; - __u64 iova; + __aligned_u64 iova; __u32 mask; __u32 first_psn; __u32 last_psn; @@ -138,7 +147,7 @@ struct rxe_send_wqe { }; struct rxe_recv_wqe { - __u64 wr_id; + __aligned_u64 wr_id; __u32 num_sge; __u32 padding; struct rxe_dma_info dma; diff --git a/providers/mlx4/mlx4-abi.h b/providers/mlx4/mlx4-abi.h index 3b58ff5eb83306..3713d838000164 100644 --- a/providers/mlx4/mlx4-abi.h +++ b/providers/mlx4/mlx4-abi.h @@ -111,6 +111,7 @@ struct mlx4_query_device_ex_resp { __u32 response_length; __u64 hca_core_clock_offset; __u32 max_inl_recv_sz; + __u32 reserved; struct mlx4_rss_caps rss_caps; /* vendor data channel */ }; diff --git a/providers/rxe/rxe-abi.h b/providers/rxe/rxe-abi.h index 72b8438dbf6009..08657407b49295 100644 --- a/providers/rxe/rxe-abi.h +++ b/providers/rxe/rxe-abi.h @@ -68,6 +68,7 @@ struct rxe_create_srq_resp { struct ib_uverbs_create_srq_resp ibv_resp; struct mmap_info mi; __u32 srq_num; + __u32 reserved; }; struct rxe_modify_srq_cmd { -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html