public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
To: Yixian Liu <liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH rdma-core 2/2] libhns: Support cq record doorbell
Date: Wed, 17 Jan 2018 21:37:17 -0700	[thread overview]
Message-ID: <20180118043717.GC8414@ziepe.ca> (raw)
In-Reply-To: <1516242961-154453-3-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

On Thu, Jan 18, 2018 at 10:36:01AM +0800, Yixian Liu wrote:

> diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c
> index cde8568..7037a1c 100644
> +++ b/providers/hns/hns_roce_u_verbs.c
> @@ -276,6 +276,16 @@ struct ibv_cq *hns_roce_u_create_cq(struct ibv_context *context, int cqe,
>  
>  	cmd.buf_addr = (uintptr_t) cq->buf.buf;
>  
> +	if (to_hr_dev(context->device)->hw_version != HNS_ROCE_HW_VER1) {
> +		cq->set_ci_db = hns_roce_alloc_db(to_hr_ctx(context),
> +						  HNS_ROCE_CQ_TYPE_DB);
> +		if (!cq->set_ci_db) {
> +			fprintf(stderr, "alloc cq db buffer failed!\n");
> +			goto err_buf;
> +		}
> +		cmd.db_addr  = (uintptr_t) cq->set_ci_db;

Uhh.. why does the userspace already have the 'db_addr' member of
hns_roce_create_cq when the kernel doesn't?

What is going on here? How does forward and backwards compatibility of
the kABI work?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2018-01-18  4:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18  2:35 [PATCH rdma-core 0/2] Support rq and cq record doorbell Yixian Liu
     [not found] ` <1516242961-154453-1-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-18  2:36   ` [PATCH rdma-core 1/2] libhns: Support rq " Yixian Liu
2018-01-18  2:36   ` [PATCH rdma-core 2/2] libhns: Support cq " Yixian Liu
     [not found]     ` <1516242961-154453-3-git-send-email-liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-18  4:37       ` Jason Gunthorpe [this message]
     [not found]         ` <20180118043717.GC8414-uk2M96/98Pc@public.gmane.org>
2018-01-18  7:25           ` Liuyixian (Eason)
     [not found]             ` <9e577314-4fcb-45de-6909-d5b3be570196-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-18 16:19               ` Jason Gunthorpe
     [not found]                 ` <20180118161949.GA18973-uk2M96/98Pc@public.gmane.org>
2018-01-19 11:04                   ` Liuyixian (Eason)
     [not found]                     ` <a33a1337-665f-4cd4-5b39-b12d9f03af72-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-19 20:00                       ` Jason Gunthorpe
     [not found]                         ` <20180119200029.GD3437-uk2M96/98Pc@public.gmane.org>
2018-01-20 11:41                           ` Liuyixian (Eason)
     [not found]                             ` <68e02f2a-0474-bc73-a784-fd52dbbde552-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-20 16:46                               ` Jason Gunthorpe
     [not found]                                 ` <20180120164625.GA14372-uk2M96/98Pc@public.gmane.org>
2018-01-23 12:51                                   ` Liuyixian (Eason)
     [not found]                                     ` <124fa0b2-ac35-a103-205b-252fddea2665-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-23 15:04                                       ` Jason Gunthorpe
     [not found]                                         ` <20180123150421.GA30670-uk2M96/98Pc@public.gmane.org>
2018-01-24 10:35                                           ` Liuyixian (Eason)
     [not found]                                             ` <91b5f324-cfaf-e778-2d6c-46000267f2cb-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-24 11:51                                               ` Leon Romanovsky
     [not found]                                                 ` <20180124115141.GG1393-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-24 16:30                                                   ` Jason Gunthorpe
     [not found]                                                     ` <20180124163056.GC16845-uk2M96/98Pc@public.gmane.org>
2018-01-25 13:16                                                       ` Liuyixian (Eason)
2018-01-21  6:57                               ` Leon Romanovsky
     [not found]                                 ` <20180121065727.GF1393-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-22 14:01                                   ` Liuyixian (Eason)
     [not found]                                     ` <1d95b4da-1cb8-e1ef-9c0e-4ac70a848d38-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-22 15:13                                       ` Leon Romanovsky
     [not found]                                         ` <20180122151307.GK1393-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-23 12:38                                           ` Liuyixian (Eason)

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=20180118043717.GC8414@ziepe.ca \
    --to=jgg-uk2m96/98pc@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=liuyixian-hv44wF8Li93QT0dZR+AlfA@public.gmane.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