RDMA: Move more uverbs_cmd_mask settings to the core
authorJason Gunthorpe <jgg@nvidia.com>
Sat, 3 Oct 2020 23:20:04 +0000 (20:20 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 26 Oct 2020 22:27:58 +0000 (19:27 -0300)
commit44ce37bc8bf30283d16c5e5f20964b638bebd429
tree492ddcf5d12b08be7750424c7ba5a2f231c2267c
parentc074bb1e30f9b51032245300798613a290e42f25
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>
15 files changed:
drivers/infiniband/core/device.c
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/cxgb4/provider.c
drivers/infiniband/hw/hns/hns_roce_main.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mthca/mthca_provider.c
drivers/infiniband/hw/ocrdma/ocrdma_main.c
drivers/infiniband/hw/qedr/main.c
drivers/infiniband/hw/usnic/usnic_ib_main.c
drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
drivers/infiniband/sw/rdmavt/vt.c
drivers/infiniband/sw/rxe/rxe_verbs.c
drivers/infiniband/sw/siw/siw_main.c