From: Jason Gunthorpe <jgg@ziepe.ca>
To: Jianxin Xiong <jianxin.xiong@intel.com>
Cc: linux-rdma@vger.kernel.org, Doug Ledford <dledford@redhat.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
Leon Romanovsky <leon@kernel.org>
Subject: Re: [RFC PATCH 2/3] RDMA/uverbs: Add uverbs commands for fd-based MR registration
Date: Thu, 16 Apr 2020 14:47:48 -0300 [thread overview]
Message-ID: <20200416174748.GS5100@ziepe.ca> (raw)
In-Reply-To: <1587056973-101760-3-git-send-email-jianxin.xiong@intel.com>
On Thu, Apr 16, 2020 at 10:09:32AM -0700, Jianxin Xiong wrote:
> diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
> index f6c2552..b3f7261 100644
> --- a/drivers/infiniband/core/device.c
> +++ b/drivers/infiniband/core/device.c
> @@ -2654,9 +2654,11 @@ void ib_set_device_ops(struct ib_device *dev, const struct ib_device_ops *ops)
> SET_DEVICE_OP(dev_ops, read_counters);
> SET_DEVICE_OP(dev_ops, reg_dm_mr);
> SET_DEVICE_OP(dev_ops, reg_user_mr);
> + SET_DEVICE_OP(dev_ops, reg_user_mr_fd);
> SET_DEVICE_OP(dev_ops, req_ncomp_notif);
> SET_DEVICE_OP(dev_ops, req_notify_cq);
> SET_DEVICE_OP(dev_ops, rereg_user_mr);
> + SET_DEVICE_OP(dev_ops, rereg_user_mr_fd);
I'm not so found of adding such a specific callback.. It seems better
to have a generic reg_user_mr that accepts a ib_umem created by the
core code. Burying the umem_get in the drivers was probably a mistake.
> static int ib_uverbs_dereg_mr(struct uverbs_attr_bundle *attrs)
> {
> struct ib_uverbs_dereg_mr cmd;
> @@ -3916,7 +4081,19 @@ static int ib_uverbs_ex_modify_cq(struct uverbs_attr_bundle *attrs)
> ib_uverbs_rereg_mr,
> UAPI_DEF_WRITE_UDATA_IO(struct ib_uverbs_rereg_mr,
> struct ib_uverbs_rereg_mr_resp),
> - UAPI_DEF_METHOD_NEEDS_FN(rereg_user_mr))),
> + UAPI_DEF_METHOD_NEEDS_FN(rereg_user_mr)),
> + DECLARE_UVERBS_WRITE(
> + IB_USER_VERBS_CMD_REG_MR_FD,
> + ib_uverbs_reg_mr_fd,
> + UAPI_DEF_WRITE_UDATA_IO(struct ib_uverbs_reg_mr_fd,
> + struct ib_uverbs_reg_mr_resp),
> + UAPI_DEF_METHOD_NEEDS_FN(reg_user_mr_fd)),
> + DECLARE_UVERBS_WRITE(
> + IB_USER_VERBS_CMD_REREG_MR_FD,
> + ib_uverbs_rereg_mr_fd,
> + UAPI_DEF_WRITE_UDATA_IO(struct ib_uverbs_rereg_mr_fd,
> + struct ib_uverbs_rereg_mr_resp),
> + UAPI_DEF_METHOD_NEEDS_FN(rereg_user_mr_fd))),
New write based methods are not allowed, they have to be done as ioctl
methods.
Jason
next prev parent reply other threads:[~2020-04-16 17:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 17:09 [RFC PATCH 0/3] RDMA: Add dma-buf support Jianxin Xiong
2020-04-16 17:09 ` [RFC PATCH 1/3] RDMA/umem: Support importing dma-buf as user memory region Jianxin Xiong
2020-04-16 18:01 ` Jason Gunthorpe
2020-04-16 19:41 ` Xiong, Jianxin
2020-04-17 12:31 ` Jason Gunthorpe
2020-04-17 15:49 ` Xiong, Jianxin
2020-04-16 18:02 ` Leon Romanovsky
2020-04-16 18:04 ` Jason Gunthorpe
2020-04-16 18:30 ` Leon Romanovsky
2020-04-16 21:08 ` Xiong, Jianxin
2020-04-16 17:09 ` [RFC PATCH 2/3] RDMA/uverbs: Add uverbs commands for fd-based MR registration Jianxin Xiong
2020-04-16 17:47 ` Jason Gunthorpe [this message]
2020-04-16 18:32 ` Xiong, Jianxin
2020-04-17 12:35 ` Jason Gunthorpe
2020-04-16 17:09 ` [RFC PATCH 3/3] RDMA/mlx5: Support new uverbs commands for registering fd-based MR Jianxin Xiong
2020-04-16 17:54 ` [RFC PATCH 0/3] RDMA: Add dma-buf support Jason Gunthorpe
2020-04-16 19:08 ` Xiong, Jianxin
2020-04-16 19:34 ` Jason Gunthorpe
2020-04-16 21:02 ` Xiong, Jianxin
2020-04-17 12:35 ` Jason Gunthorpe
2020-04-17 16:49 ` Xiong, Jianxin
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=20200416174748.GS5100@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=dledford@redhat.com \
--cc=jianxin.xiong@intel.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).