RE: [PATCH 07/11] RDMA: Check flags during create_cq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: [PATCH 07/11] RDMA: Check flags during create_cq
> 
> Each driver should check that the CQ attrs is supported. Unfortuantely when flags
> was added to the CQ attrs the drivers were not updated, uverbs_ex_cmd_mask
> was used to block it. This was missed when create CQ was converted to ioctl, so
> non-zero flags could have been passed into drivers.
> 
> Check that flags is zero in all drivers that don't use it, remove
> IB_USER_VERBS_EX_CMD_CREATE_CQ from uverbs_ex_cmd_mask.
> 
> Fixes: 41b2a71fc848 ("IB/uverbs: Move ioctl path of create_cq and destroy_cq to
> a new file")
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> ---
>  drivers/infiniband/core/device.c             | 1 +
>  drivers/infiniband/hw/bnxt_re/ib_verbs.c     | 3 +++
>  drivers/infiniband/hw/cxgb4/cq.c             | 2 +-
>  drivers/infiniband/hw/efa/efa_verbs.c        | 3 +++
>  drivers/infiniband/hw/hns/hns_roce_cq.c      | 3 +++
>  drivers/infiniband/hw/i40iw/i40iw_verbs.c    | 3 +++
>  drivers/infiniband/hw/mlx4/main.c            | 1 -
>  drivers/infiniband/hw/mlx5/main.c            | 1 -
>  drivers/infiniband/hw/mthca/mthca_provider.c | 2 +-
> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c  | 2 +-
>  drivers/infiniband/hw/qedr/verbs.c           | 3 +++
>  drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +-
> drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 3 +++
>  drivers/infiniband/sw/rdmavt/cq.c            | 2 +-
>  drivers/infiniband/sw/rxe/rxe_verbs.c        | 2 +-
>  drivers/infiniband/sw/siw/siw_verbs.c        | 3 +++
>  16 files changed, 28 insertions(+), 8 deletions(-)
> 

[...]

> a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> index 26a61af2d3977f..4aade66ad2aea8 100644
> --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> @@ -1107,6 +1107,9 @@ static int i40iw_create_cq(struct ib_cq *ibcq,
>  	int err_code;
>  	int entries = attr->cqe;
> 
> +	if (attr->flags)
> +		return -EOPNOTSUPP;
> +

I am slightly confused.
So these flags are set for drivers that support the extended create CQ API?

Shiraz



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux