diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-04 02:20:04 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-10-27 01:27:58 +0300 |
commit | 44ce37bc8bf30283d16c5e5f20964b638bebd429 (patch) | |
tree | 492ddcf5d12b08be7750424c7ba5a2f231c2267c /drivers/infiniband/hw/qedr | |
parent | c074bb1e30f9b51032245300798613a290e42f25 (diff) | |
download | linux-44ce37bc8bf30283d16c5e5f20964b638bebd429.tar.xz |
RDMA: Move more uverbs_cmd_mask settings to the core
These functions all depend on the driver providing a specific op:
- REREG_MR is rereg_user_mr(). bnxt_re set this without providing the op
- ATTACH/DEATCH_MCAST is attach_mcast()/detach_mcast(). usnic set this
without providing the op
- OPEN_QP doesn't involve the driver but requires a XRCD. qedr provides
xrcd but forgot to set it, usnic doesn't provide XRCD but set it anyhow.
- OPEN/CLOSE_XRCD are the ops alloc_xrcd()/dealloc_xrcd()
- CREATE_SRQ/DESTROY_SRQ are the ops create_srq()/destroy_srq()
- QUERY/MODIFY_SRQ is op query_srq()/modify_srq(). hns sets this but
sometimes supplies a NULL op.
- RESIZE_CQ is op resize_cq(). bnxt_re sets this boes doesn't supply an op
- ALLOC/DEALLOC_MW is alloc_mw()/dealloc_mw(). cxgb4 provided an
(now deleted) implementation but no userspace
All drivers were checked that no drivers provide the op without also
setting uverbs_cmd_mask so this should have no functional change.
Link: https://lore.kernel.org/r/4-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/qedr')
-rw-r--r-- | drivers/infiniband/hw/qedr/main.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c index 02058f151612..a092e73eb39b 100644 --- a/drivers/infiniband/hw/qedr/main.c +++ b/drivers/infiniband/hw/qedr/main.c @@ -189,8 +189,7 @@ static void qedr_roce_register_device(struct qedr_dev *dev) ib_set_device_ops(&dev->ibdev, &qedr_roce_dev_ops); - dev->ibdev.uverbs_cmd_mask |= QEDR_UVERBS(OPEN_XRCD) | - QEDR_UVERBS(CLOSE_XRCD) | + dev->ibdev.uverbs_cmd_mask |= QEDR_UVERBS(CREATE_XSRQ); } @@ -250,12 +249,7 @@ static int qedr_register_device(struct qedr_dev *dev) memcpy(dev->ibdev.node_desc, QEDR_NODE_DESC, sizeof(QEDR_NODE_DESC)); dev->ibdev.uverbs_cmd_mask |= - QEDR_UVERBS(RESIZE_CQ) | QEDR_UVERBS(REQ_NOTIFY_CQ) | - QEDR_UVERBS(CREATE_SRQ) | - QEDR_UVERBS(DESTROY_SRQ) | - QEDR_UVERBS(QUERY_SRQ) | - QEDR_UVERBS(MODIFY_SRQ) | QEDR_UVERBS(POST_SRQ_RECV) | QEDR_UVERBS(POLL_CQ) | QEDR_UVERBS(POST_SEND) | |