mbox series

[00/11] Reduce uverbs_cmd_mask and remove uverbs_ex_cmd_mask

Message ID 0-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com (mailing list archive)
Headers show
Series Reduce uverbs_cmd_mask and remove uverbs_ex_cmd_mask | expand

Message

Jason Gunthorpe Oct. 3, 2020, 11:20 p.m. UTC
These have become increasingly redundant as the uverbs core layer has got
better at not invoking drivers in situations they are not supporting.

The remaining uses are only in rxe and rvt for kernel datapath commands
these drivers expose to userspace.

There are many, many weird and wrong things in the drivers related to
these masks. This closes a number of troublesome cases.

Jason Gunthorpe (11):
  RDMA/cxgb4: Remove MW support
  RDMA: Remove uverbs_ex_cmd_mask values that are linked to functions
  RDMA: Remove elements in uverbs_cmd_mask that all drivers set
  RDMA: Move more uverbs_cmd_mask settings to the core
  RDMA: Check srq_type during create_srq
  RDMA: Check attr_mask during modify_qp
  RDMA: Check flags during create_cq
  RDMA: Check create_flags during create_qp
  RDMA/core Remove uverbs_ex_cmd_mask
  RDMA: Remove uverbs cmds from drivers that don't use them
  RDMA: Remove AH from uverbs_cmd_mask

 drivers/infiniband/core/device.c              | 33 ++++++++
 drivers/infiniband/core/uverbs_cmd.c          | 26 +++---
 drivers/infiniband/core/uverbs_uapi.c         |  5 +-
 drivers/infiniband/core/verbs.c               |  5 +-
 drivers/infiniband/hw/bnxt_re/ib_verbs.c      | 10 ++-
 drivers/infiniband/hw/bnxt_re/main.c          | 30 +------
 drivers/infiniband/hw/cxgb4/cq.c              |  2 +-
 drivers/infiniband/hw/cxgb4/iw_cxgb4.h        |  2 -
 drivers/infiniband/hw/cxgb4/mem.c             | 84 -------------------
 drivers/infiniband/hw/cxgb4/provider.c        | 24 ------
 drivers/infiniband/hw/cxgb4/qp.c              |  8 +-
 drivers/infiniband/hw/efa/efa_main.c          | 22 +----
 drivers/infiniband/hw/efa/efa_verbs.c         |  6 ++
 drivers/infiniband/hw/hns/hns_roce_cq.c       |  3 +
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c    |  9 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c    |  3 +
 drivers/infiniband/hw/hns/hns_roce_main.c     | 35 +-------
 drivers/infiniband/hw/hns/hns_roce_qp.c       | 14 +---
 drivers/infiniband/hw/hns/hns_roce_srq.c      |  4 +
 drivers/infiniband/hw/i40iw/i40iw_verbs.c     | 29 ++-----
 drivers/infiniband/hw/mlx4/main.c             | 52 +-----------
 drivers/infiniband/hw/mlx4/qp.c               |  5 +-
 drivers/infiniband/hw/mlx4/srq.c              |  4 +
 drivers/infiniband/hw/mlx5/main.c             | 55 +-----------
 drivers/infiniband/hw/mlx5/qp.c               | 10 ++-
 drivers/infiniband/hw/mlx5/srq.c              |  5 ++
 drivers/infiniband/hw/mthca/mthca_provider.c  | 28 +------
 drivers/infiniband/hw/mthca/mthca_qp.c        |  3 +
 drivers/infiniband/hw/ocrdma/ocrdma_main.c    | 38 +--------
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c   | 11 ++-
 drivers/infiniband/hw/qedr/main.c             | 29 -------
 drivers/infiniband/hw/qedr/verbs.c            | 13 +++
 drivers/infiniband/hw/usnic/usnic_ib_main.c   | 19 -----
 drivers/infiniband/hw/usnic/usnic_ib_verbs.c  |  7 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c  |  3 +
 .../infiniband/hw/vmw_pvrdma/pvrdma_main.c    | 28 -------
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c  |  5 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c |  2 +-
 drivers/infiniband/sw/rdmavt/ah.c             |  1 -
 drivers/infiniband/sw/rdmavt/cq.c             |  2 +-
 drivers/infiniband/sw/rdmavt/qp.c             | 10 ++-
 drivers/infiniband/sw/rdmavt/vt.c             | 28 +------
 drivers/infiniband/sw/rxe/rxe_verbs.c         | 45 +++-------
 drivers/infiniband/sw/siw/siw_main.c          | 24 ------
 drivers/infiniband/sw/siw/siw_verbs.c         | 12 +++
 include/rdma/ib_verbs.h                       |  5 +-
 include/uapi/rdma/ib_user_verbs.h             | 14 ----
 47 files changed, 206 insertions(+), 606 deletions(-)

Comments

Shiraz Saleem Oct. 6, 2020, 6:32 p.m. UTC | #1
> Subject: [PATCH 00/11] Reduce uverbs_cmd_mask and remove
> uverbs_ex_cmd_mask
> 
> These have become increasingly redundant as the uverbs core layer has got better
> at not invoking drivers in situations they are not supporting.
> 
> The remaining uses are only in rxe and rvt for kernel datapath commands these
> drivers expose to userspace.
> 
> There are many, many weird and wrong things in the drivers related to these
> masks. This closes a number of troublesome cases.
> 
> Jason Gunthorpe (11):
>   RDMA/cxgb4: Remove MW support
>   RDMA: Remove uverbs_ex_cmd_mask values that are linked to functions
>   RDMA: Remove elements in uverbs_cmd_mask that all drivers set
>   RDMA: Move more uverbs_cmd_mask settings to the core
>   RDMA: Check srq_type during create_srq
>   RDMA: Check attr_mask during modify_qp
>   RDMA: Check flags during create_cq
>   RDMA: Check create_flags during create_qp
>   RDMA/core Remove uverbs_ex_cmd_mask
>   RDMA: Remove uverbs cmds from drivers that don't use them
>   RDMA: Remove AH from uverbs_cmd_mask
> 
>  drivers/infiniband/core/device.c              | 33 ++++++++
>  drivers/infiniband/core/uverbs_cmd.c          | 26 +++---
>  drivers/infiniband/core/uverbs_uapi.c         |  5 +-
>  drivers/infiniband/core/verbs.c               |  5 +-
>  drivers/infiniband/hw/bnxt_re/ib_verbs.c      | 10 ++-
>  drivers/infiniband/hw/bnxt_re/main.c          | 30 +------
>  drivers/infiniband/hw/cxgb4/cq.c              |  2 +-
>  drivers/infiniband/hw/cxgb4/iw_cxgb4.h        |  2 -
>  drivers/infiniband/hw/cxgb4/mem.c             | 84 -------------------
>  drivers/infiniband/hw/cxgb4/provider.c        | 24 ------
>  drivers/infiniband/hw/cxgb4/qp.c              |  8 +-
>  drivers/infiniband/hw/efa/efa_main.c          | 22 +----
>  drivers/infiniband/hw/efa/efa_verbs.c         |  6 ++
>  drivers/infiniband/hw/hns/hns_roce_cq.c       |  3 +
>  drivers/infiniband/hw/hns/hns_roce_hw_v1.c    |  9 +-
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c    |  3 +
>  drivers/infiniband/hw/hns/hns_roce_main.c     | 35 +-------
>  drivers/infiniband/hw/hns/hns_roce_qp.c       | 14 +---
>  drivers/infiniband/hw/hns/hns_roce_srq.c      |  4 +
>  drivers/infiniband/hw/i40iw/i40iw_verbs.c     | 29 ++-----

i40iw bit looks ok to me.
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>
Jason Gunthorpe Oct. 26, 2020, 10:39 p.m. UTC | #2
On Sat, Oct 03, 2020 at 08:20:00PM -0300, Jason Gunthorpe wrote:
> These have become increasingly redundant as the uverbs core layer has got
> better at not invoking drivers in situations they are not supporting.
> 
> The remaining uses are only in rxe and rvt for kernel datapath commands
> these drivers expose to userspace.
> 
> There are many, many weird and wrong things in the drivers related to
> these masks. This closes a number of troublesome cases.
> 
> Jason Gunthorpe (11):
>   RDMA/cxgb4: Remove MW support
>   RDMA: Remove uverbs_ex_cmd_mask values that are linked to functions
>   RDMA: Remove elements in uverbs_cmd_mask that all drivers set
>   RDMA: Move more uverbs_cmd_mask settings to the core
>   RDMA: Check srq_type during create_srq
>   RDMA: Check attr_mask during modify_qp
>   RDMA: Check flags during create_cq
>   RDMA: Check create_flags during create_qp
>   RDMA/core Remove uverbs_ex_cmd_mask
>   RDMA: Remove uverbs cmds from drivers that don't use them
>   RDMA: Remove AH from uverbs_cmd_mask

Applied to for-next

Jason