All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Akiva Goldberger <agoldberger@nvidia.com>,
	Ajay Sharma <sharmaajay@microsoft.com>,
	Bernard Metzler <bmt@zurich.ibm.com>,
	Chengchang Tang <tangchengchang@huawei.com>,
	Cheng Xu <chengyou@linux.alibaba.com>,
	Junxian Huang <huangjunxian6@hisilicon.com>,
	Kai Shen <kaishen@linux.alibaba.com>,
	linux-rdma@vger.kernel.org, Long Li <longli@microsoft.com>,
	Michael Margolin <mrgolin@amazon.com>,
	Mustafa Ismail <mustafa.ismail@intel.com>,
	Potnuri Bharat Teja <bharat@chelsio.com>,
	Selvin Xavier <selvin.xavier@broadcom.com>,
	Shiraz Saleem <shiraz.saleem@intel.com>,
	Yishai Hadas <yishaih@nvidia.com>,
	Zhu Yanjun <zyjzyj2000@gmail.com>
Subject: Re: [PATCH rdma-next 1/2] RDMA: Pass entire uverbs attr bundle to create cq function
Date: Mon, 17 Jun 2024 09:17:46 +0300	[thread overview]
Message-ID: <20240617061746.GA6805@unreal> (raw)
In-Reply-To: <7d0deae3798c9314ea41f4eb7a211d1b8b05a7fd.1718554263.git.leon@kernel.org>

On Sun, Jun 16, 2024 at 07:15:57PM +0300, Leon Romanovsky wrote:
> From: Akiva Goldberger <agoldberger@nvidia.com>
> 
> 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@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  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

  reply	other threads:[~2024-06-17  6:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-16 16:15 [PATCH rdma-next 0/2] Extend mlx5 CQ creation with large UAR page index Leon Romanovsky
2024-06-16 16:15 ` [PATCH rdma-next 1/2] RDMA: Pass entire uverbs attr bundle to create cq function Leon Romanovsky
2024-06-17  6:17   ` Leon Romanovsky [this message]
2024-06-17 13:44   ` Jason Gunthorpe
2024-06-17 15:49     ` Leon Romanovsky
2024-06-17 20:10       ` Jason Gunthorpe
2024-06-18  5:05         ` Leon Romanovsky
2024-06-18 13:08           ` Jason Gunthorpe
2024-06-18 16:05             ` Leon Romanovsky
2024-06-18 16:13               ` Jason Gunthorpe
2024-06-19  8:57                 ` Leon Romanovsky
2024-06-17 16:00   ` Zhu Yanjun
2024-06-16 16:15 ` [PATCH rdma-next 2/2] RDMA/mlx5: Send UAR page index as ioctl attribute Leon Romanovsky
2024-06-16 21:47 ` [PATCH rdma-next 0/2] Extend mlx5 CQ creation with large UAR page index Zhu Yanjun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240617061746.GA6805@unreal \
    --to=leon@kernel.org \
    --cc=agoldberger@nvidia.com \
    --cc=bharat@chelsio.com \
    --cc=bmt@zurich.ibm.com \
    --cc=chengyou@linux.alibaba.com \
    --cc=huangjunxian6@hisilicon.com \
    --cc=jgg@nvidia.com \
    --cc=kaishen@linux.alibaba.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=mrgolin@amazon.com \
    --cc=mustafa.ismail@intel.com \
    --cc=selvin.xavier@broadcom.com \
    --cc=sharmaajay@microsoft.com \
    --cc=shiraz.saleem@intel.com \
    --cc=tangchengchang@huawei.com \
    --cc=yishaih@nvidia.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.