diff mbox

RDMA/ocrdma: Fix structure layout for ocrdma_alloc_pd

Message ID 20180319173043.GA24189@ziepe.ca (mailing list archive)
State Accepted
Headers show

Commit Message

Jason Gunthorpe March 19, 2018, 5:30 p.m. UTC
The udata's for alloc_pd cannot contain u64s due to alignment
constraints. Switch the two never-used u64's to arrays of u32 to reduce
the required struct alignment to 4 bytes.

These reserved fields are totally unnecessary, never written and never
read.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 include/uapi/rdma/ocrdma-abi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jason Gunthorpe March 23, 2018, 8:54 p.m. UTC | #1
On Mon, Mar 19, 2018 at 11:30:43AM -0600, Jason Gunthorpe wrote:
> The udata's for alloc_pd cannot contain u64s due to alignment
> constraints. Switch the two never-used u64's to arrays of u32 to reduce
> the required struct alignment to 4 bytes.
> 
> These reserved fields are totally unnecessary, never written and never
> read.
> 
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> ---
>  include/uapi/rdma/ocrdma-abi.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to -next

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/uapi/rdma/ocrdma-abi.h b/include/uapi/rdma/ocrdma-abi.h
index e0475d59cdf00d..32ef8670583a32 100644
--- a/include/uapi/rdma/ocrdma-abi.h
+++ b/include/uapi/rdma/ocrdma-abi.h
@@ -65,7 +65,7 @@  struct ocrdma_alloc_ucontext_resp {
 };
 
 struct ocrdma_alloc_pd_ureq {
-	__u64 rsvd1;
+	__u32 rsvd[2];
 };
 
 struct ocrdma_alloc_pd_uresp {
@@ -73,7 +73,7 @@  struct ocrdma_alloc_pd_uresp {
 	__u32 dpp_enabled;
 	__u32 dpp_page_addr_hi;
 	__u32 dpp_page_addr_lo;
-	__u64 rsvd1;
+	__u32 rsvd[2];
 };
 
 struct ocrdma_create_cq_ureq {