From: Jason Gunthorpe <jgg@nvidia.com>
To: Weihang Li <liweihang@huawei.com>
Cc: <dledford@redhat.com>, <leon@kernel.org>,
<linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH v2 for-next 1/4] RDMA/hns: Export hardware capability flags to userspace
Date: Thu, 27 Aug 2020 09:40:31 -0300 [thread overview]
Message-ID: <20200827124031.GA4023659@nvidia.com> (raw)
In-Reply-To: <1597929469-22674-2-git-send-email-liweihang@huawei.com>
On Thu, Aug 20, 2020 at 09:17:46PM +0800, Weihang Li wrote:
> From: Xi Wang <wangxi11@huawei.com>
>
> The libhns in userspace for HIP09 will use the hardware's capability to
> enable some features. So export the hardware capablility flags to userspace
> by reusing the reserved fields in structure
> "hns_roce_ib_alloc_ucontext_resp".
>
> Signed-off-by: Xi Wang <wangxi11@huawei.com>
> Signed-off-by: Weihang Li <liweihang@huawei.com>
> drivers/infiniband/hw/hns/hns_roce_main.c | 1 +
> include/uapi/rdma/hns-abi.h | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
> index 5907cfd..98945df 100644
> +++ b/drivers/infiniband/hw/hns/hns_roce_main.c
> @@ -313,6 +313,7 @@ static int hns_roce_alloc_ucontext(struct ib_ucontext *uctx,
> return -EAGAIN;
>
> resp.qp_tab_size = hr_dev->caps.num_qps;
> + resp.cap_flags = (u32)hr_dev->caps.flags;
This makes all the HNS_ROCE_CAP_FLAG_* values uapi, they need to be
moved to the uapi header too.
Or rethink this to only expose what you want to be uapi.
Jason
next prev parent reply other threads:[~2020-08-27 13:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 13:17 [PATCH v2 for-next 0/4] RDMA/hns: Extend some capabilities for HIP09 Weihang Li
2020-08-20 13:17 ` [PATCH v2 for-next 1/4] RDMA/hns: Export hardware capability flags to userspace Weihang Li
2020-08-27 12:40 ` Jason Gunthorpe [this message]
2020-08-31 7:46 ` liweihang
2020-08-20 13:17 ` [PATCH v2 for-next 2/4] RDMA/hns: Add support for EQE in size of 64 Bytes Weihang Li
2020-08-20 13:17 ` [PATCH v2 for-next 3/4] RDMA/hns: Add support for CQE " Weihang Li
2020-08-20 13:17 ` [PATCH v2 for-next 4/4] RDMA/hns: Add support for QPC in size of 512 Bytes Weihang Li
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=20200827124031.GA4023659@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--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.