Re: [PATCH rdma-next 1/2] RDMA: Pass entire uverbs attr bundle to create cq function

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

 



On Sun, Jun 16, 2024 at 07:15:57PM +0300, Leon Romanovsky wrote:
> From: Akiva Goldberger <agoldberger@xxxxxxxxxx>
> 
> Changes the create_cq verb signature by sending the entire uverbs attr
> bundle as a parameter. This allows drivers to send driver specific attrs
> through ioctl for the create_cq verb and access them in their driver
> specific code.
> 
> Also adds a new enum value for driver specific ioctl attritbutes for
> methods already supporting UHW.
> 
> Signed-off-by: Akiva Goldberger <agoldberger@xxxxxxxxxx>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
> ---
>  drivers/infiniband/core/uverbs_cmd.c          | 2 +-
>  drivers/infiniband/core/uverbs_std_types_cq.c | 2 +-
>  drivers/infiniband/hw/bnxt_re/ib_verbs.c      | 3 ++-
>  drivers/infiniband/hw/bnxt_re/ib_verbs.h      | 2 +-
>  drivers/infiniband/hw/cxgb4/cq.c              | 3 ++-
>  drivers/infiniband/hw/cxgb4/iw_cxgb4.h        | 2 +-
>  drivers/infiniband/hw/efa/efa.h               | 2 +-
>  drivers/infiniband/hw/efa/efa_verbs.c         | 3 ++-
>  drivers/infiniband/hw/erdma/erdma_verbs.c     | 3 ++-
>  drivers/infiniband/hw/erdma/erdma_verbs.h     | 2 +-
>  drivers/infiniband/hw/hns/hns_roce_cq.c       | 3 ++-
>  drivers/infiniband/hw/hns/hns_roce_device.h   | 2 +-
>  drivers/infiniband/hw/irdma/verbs.c           | 5 +++--
>  drivers/infiniband/hw/mana/cq.c               | 2 +-
>  drivers/infiniband/hw/mana/mana_ib.h          | 2 +-
>  drivers/infiniband/hw/mlx4/cq.c               | 3 ++-
>  drivers/infiniband/hw/mlx4/mlx4_ib.h          | 2 +-
>  drivers/infiniband/hw/mlx5/cq.c               | 3 ++-
>  drivers/infiniband/hw/mlx5/mlx5_ib.h          | 2 +-
>  drivers/infiniband/hw/mthca/mthca_provider.c  | 3 ++-
>  drivers/infiniband/sw/rxe/rxe_verbs.c         | 3 ++-
>  drivers/infiniband/sw/siw/siw_verbs.c         | 2 +-
>  drivers/infiniband/sw/siw/siw_verbs.h         | 2 +-
>  include/rdma/ib_verbs.h                       | 2 +-
>  include/uapi/rdma/ib_user_ioctl_cmds.h        | 1 +
>  25 files changed, 36 insertions(+), 25 deletions(-)

<...>

> --- a/drivers/infiniband/hw/mthca/mthca_provider.c
> +++ b/drivers/infiniband/hw/mthca/mthca_provider.c
> @@ -574,7 +574,8 @@ static int mthca_destroy_qp(struct ib_qp *qp, struct ib_udata *udata)
>  
>  static int mthca_create_cq(struct ib_cq *ibcq,
>  			   const struct ib_cq_init_attr *attr,
> -			   struct ib_udata *udata)
> +			   struct ib_udata *udata,
> +			   struct uverbs_attr_bundle *attrs)
>  {

This hunk needs to be fixed with the following patch:

diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 677ebb145dbf..6a1e2e79ddc3 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -574,9 +574,9 @@ static int mthca_destroy_qp(struct ib_qp *qp, struct ib_udata *udata)

 static int mthca_create_cq(struct ib_cq *ibcq,
                           const struct ib_cq_init_attr *attr,
-                          struct ib_udata *udata,
                           struct uverbs_attr_bundle *attrs)
 {
+       struct ib_udata *udata = &attrs->driver_udata;
        struct ib_device *ibdev = ibcq->device;
        int entries = attr->cqe;
        struct mthca_create_cq ucmd;


Thanks




[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