From: Jason Gunthorpe <jgg@nvidia.com>
To: Weihang Li <liweihang@huawei.com>
Cc: <leon@kernel.org>, <dledford@redhat.com>,
<linux-rdma@vger.kernel.org>, <linuxarm@openeuler.org>
Subject: Re: [PATCH RFC rdma-core 2/5] libhns: Introduce DCA for RC QP
Date: Tue, 9 Feb 2021 15:44:00 -0400 [thread overview]
Message-ID: <20210209194400.GS4247@nvidia.com> (raw)
In-Reply-To: <1612667574-56673-3-git-send-email-liweihang@huawei.com>
On Sun, Feb 07, 2021 at 11:12:51AM +0800, Weihang Li wrote:
> +static int register_dca_mem(struct hns_roce_context *ctx, uint64_t key,
> + void *addr, uint32_t size, uint32_t *handle)
> +{
> + struct ib_uverbs_attr *attr;
> + int ret;
> +
> + DECLARE_COMMAND_BUFFER(cmd, HNS_IB_OBJECT_DCA_MEM,
> + HNS_IB_METHOD_DCA_MEM_REG, 4);
> + fill_attr_in_uint32(cmd, HNS_IB_ATTR_DCA_MEM_REG_LEN, size);
> + fill_attr_in_uint64(cmd, HNS_IB_ATTR_DCA_MEM_REG_ADDR, (intptr_t)addr);
This should use ioctl_ptr_to_u64(), the place this was copied from
should also be fixed
> + fill_attr_in_uint64(cmd, HNS_IB_ATTR_DCA_MEM_REG_KEY, key);
> + attr = fill_attr_out_obj(cmd, HNS_IB_ATTR_DCA_MEM_REG_HANDLE);
> +
> + ret = execute_ioctl(&ctx->ibv_ctx.context, cmd);
> + if (!ret)
> + *handle = read_attr_obj(HNS_IB_ATTR_DCA_MEM_REG_HANDLE, attr);
Success oriented flow everywhere please
Jason
next prev parent reply other threads:[~2021-02-09 19:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-07 3:12 [PATCH RFC rdma-core 0/5] libhns: Add support for Dynamic Context Attachment Weihang Li
2021-02-07 3:12 ` [PATCH RFC rdma-core 1/5] Update kernel headers Weihang Li
2021-02-07 3:12 ` [PATCH RFC rdma-core 2/5] libhns: Introduce DCA for RC QP Weihang Li
2021-02-09 19:44 ` Jason Gunthorpe [this message]
2021-02-20 6:12 ` liweihang
2021-02-07 3:12 ` [PATCH RFC rdma-core 3/5] libhns: Add support for shrinking DCA memory pool Weihang Li
2021-02-07 3:12 ` [PATCH RFC rdma-core 4/5] libhns: Add support for attaching QP's WQE buffer Weihang Li
2021-02-07 3:12 ` [PATCH RFC rdma-core 5/5] libhns: Add support for configuring DCA Weihang Li
2021-02-09 19:38 ` [PATCH RFC rdma-core 0/5] libhns: Add support for Dynamic Context Attachment Jason Gunthorpe
2021-02-20 9:47 ` liweihang
2021-02-09 19:53 ` Jason Gunthorpe
2021-02-20 8:40 ` liweihang
2021-02-22 16:01 ` Jason Gunthorpe
2021-02-23 8:07 ` liweihang
2021-02-24 9:48 ` liweihang
2021-02-24 18:55 ` Jason Gunthorpe
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=20210209194400.GS4247@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@openeuler.org \
--cc=liweihang@huawei.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.