diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-03 20:20:08 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-26 19:27:59 -0300 |
commit | 1f11a7610e50982150b90b31d1f749f6217fbde6 (patch) | |
tree | bde2987aaea5a6bcf70c8c1cdd1f932b871e271b /drivers/infiniband/core | |
parent | 1c407cb5d70568a57a32a0e6f5aee27c5083ef37 (diff) | |
download | lwn-1f11a7610e50982150b90b31d1f749f6217fbde6.tar.gz lwn-1f11a7610e50982150b90b31d1f749f6217fbde6.zip |
RDMA: Check create_flags during create_qp
Each driver should check that the QP attrs create_flags is supported.
Unfortuantely when create_flags was added to the QP attrs the drivers were
not updated. uverbs_ex_cmd_mask was used to block it - even though kernel
drivers use these flags too.
Check that flags is zero in all drivers that don't use it, remove
IB_USER_VERBS_EX_CMD_CREATE_QP from uverbs_ex_cmd_mask. Fix the error code
to be EOPNOTSUPP.
Link: https://lore.kernel.org/r/8-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index 64129646f6a6..e5f5d656951d 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -634,6 +634,7 @@ struct ib_device *_ib_alloc_device(size_t size) 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) | |