diff mbox

[rdma-core,5/8] verbs: Remove bogus padding from ibv_dealloc_mw

Message ID 20180313220737.4336-6-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Delegated to: shefty
Headers show

Commit Message

Jason Gunthorpe March 13, 2018, 10:07 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

The kernel does not have this padding and totally ignores the structure
length. There is no reason for userspace to be different, so drop it from
here.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 libibverbs/cmd.c      | 1 -
 libibverbs/kern-abi.h | 1 -
 2 files changed, 2 deletions(-)
diff mbox

Patch

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index a036c893d70d11..5fd518d43ef232 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -478,7 +478,6 @@  int ibv_cmd_dealloc_mw(struct ibv_mw *mw,
 {
 	IBV_INIT_CMD(cmd, cmd_size, DEALLOC_MW);
 	cmd->mw_handle = mw->handle;
-	cmd->reserved = 0;
 
 	if (write(mw->context->cmd_fd, cmd, cmd_size) != cmd_size)
 		return errno;
diff --git a/libibverbs/kern-abi.h b/libibverbs/kern-abi.h
index ca5630e2d4f3c5..18563bfe38b427 100644
--- a/libibverbs/kern-abi.h
+++ b/libibverbs/kern-abi.h
@@ -160,7 +160,6 @@  struct ibv_alloc_mw {
 struct ibv_dealloc_mw {
 	struct ib_uverbs_cmd_hdr hdr;
 	__u32 mw_handle;
-	__u32 reserved;
 };
 
 struct ibv_create_comp_channel {