[PATCH 09/11] RDMA/core Remove uverbs_ex_cmd_mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No driver sets it, and the core code sets a maximum mask, simply remove
it.

Disabled operations are now handled either by having a NULL ops pointer,
or by having the common driver callbacks check for unsupported extended
attributes.

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
---
 drivers/infiniband/core/device.c      | 15 ---------------
 drivers/infiniband/core/uverbs_uapi.c |  5 +----
 include/rdma/ib_verbs.h               |  1 -
 3 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 4b808827ffcae5..b2325e7a7f2db3 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -630,21 +630,6 @@ struct ib_device *_ib_alloc_device(size_t size)
 		BIT_ULL(IB_USER_VERBS_CMD_REG_MR) |
 		BIT_ULL(IB_USER_VERBS_CMD_REREG_MR) |
 		BIT_ULL(IB_USER_VERBS_CMD_RESIZE_CQ);
-
-	device->uverbs_ex_cmd_mask =
-		BIT_ULL(IB_USER_VERBS_EX_CMD_CREATE_CQ) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_CREATE_FLOW) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_CREATE_QP) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_CREATE_RWQ_IND_TBL) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_CREATE_WQ) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_DESTROY_FLOW) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_DESTROY_WQ) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_MODIFY_CQ) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_MODIFY_QP) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_MODIFY_WQ) |
-		BIT_ULL(IB_USER_VERBS_EX_CMD_QUERY_DEVICE);
-
 	return device;
 }
 EXPORT_SYMBOL(_ib_alloc_device);
diff --git a/drivers/infiniband/core/uverbs_uapi.c b/drivers/infiniband/core/uverbs_uapi.c
index 5addc8fae3f3bd..62f5bcb712cf17 100644
--- a/drivers/infiniband/core/uverbs_uapi.c
+++ b/drivers/infiniband/core/uverbs_uapi.c
@@ -79,10 +79,7 @@ static int uapi_create_write(struct uverbs_api *uapi,
 
 	method_elm->is_ex = def->write.is_ex;
 	method_elm->handler = def->func_write;
-	if (def->write.is_ex)
-		method_elm->disabled = !(ibdev->uverbs_ex_cmd_mask &
-					 BIT_ULL(def->write.command_num));
-	else
+	if (!def->write.is_ex)
 		method_elm->disabled = !(ibdev->uverbs_cmd_mask &
 					 BIT_ULL(def->write.command_num));
 
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index ddcd0478c00dc3..437508290bc9bf 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2667,7 +2667,6 @@ struct ib_device {
 	const struct attribute_group	*groups[3];
 
 	u64			     uverbs_cmd_mask;
-	u64			     uverbs_ex_cmd_mask;
 
 	char			     node_desc[IB_DEVICE_NODE_DESC_MAX];
 	__be64			     node_guid;
-- 
2.28.0





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux