RDMA: Remove uverbs_ex_cmd_mask values that are linked to functions
authorJason Gunthorpe <jgg@nvidia.com>
Sat, 3 Oct 2020 23:20:02 +0000 (20:20 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 26 Oct 2020 22:27:56 +0000 (19:27 -0300)
commitb8e3130dd96b7b2d6d92e62dcd1515af30212fe2
tree991c149f5f285ba2c7ed466fb2dd16a0295be9b2
parenta5c29a262ebe4c5b85643bac833b9e7e00ebe8a4
RDMA: Remove uverbs_ex_cmd_mask values that are linked to functions

Since a while now the uverbs layer checks if the driver implements a
function before allowing the ucmd to proceed. This largely obsoletes the
cmd_mask stuff, but there is some tricky bits in drivers preventing it
from being removed.

Remove the easy elements of uverbs_ex_cmd_mask by pre-setting them in the
core code. These are triggered soley based on the related ops function
pointer.

query_device_ex is not triggered based on an op, but all drivers already
implement something compatible with the extension, so enable it globally
too.

Link: https://lore.kernel.org/r/2-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/device.c
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/hw/efa/efa_main.c
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
drivers/infiniband/hw/hns/hns_roce_main.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx5/main.c