linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Cc: <dledford@redhat.com>, <leon@kernel.org>, <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH rdma-core 5/5] rdma-core/irdma: Implement device supported verb APIs
Date: Thu, 28 Jan 2021 09:36:24 -0400	[thread overview]
Message-ID: <20210128133624.GD4247@nvidia.com> (raw)
In-Reply-To: <20210128035704.1781-6-tatyana.e.nikolova@intel.com>

On Wed, Jan 27, 2021 at 09:57:04PM -0600, Tatyana Nikolova wrote:
> +
> +	attr_ex->cqe = info.cq_size;
> +	if (ext_cq) {
> +		struct irdma_ucreate_cq_ex cmd = {};
> +		struct irdma_ucreate_cq_ex_resp resp = {};
> +
> +		cmd.user_cq_buf = (__u64)((uintptr_t)info.cq_base);
> +		cmd.user_shadow_area = (__u64)((uintptr_t)info.shadow_area);
> +
> +		ret = ibv_cmd_create_cq_ex(context, attr_ex, &iwucq->verbs_cq,
> +					   &cmd.ibv_cmd, sizeof(cmd), &resp.ibv_resp,
> +					   sizeof(resp));
> +		if (!ret) {
> +			irdma_ibvcq_ex_fill_priv_funcs(iwucq, attr_ex);
> +			info.cq_id = resp.cq_id;
> +			/* Do not report the cqe's burned by HW */
> +			iwucq->verbs_cq.cq.cqe = ncqe;
> +		}
> +	} else {
> +		struct irdma_ucreate_cq cmd = {};
> +		struct irdma_ucreate_cq_resp resp = {};
> +
> +		cmd.user_cq_buf = (__u64)((uintptr_t)info.cq_base);
> +		cmd.user_shadow_area = (__u64)((uintptr_t)info.shadow_area);
> +
> +		ret = ibv_cmd_create_cq(context, attr_ex->cqe, attr_ex->channel,
> +					attr_ex->comp_vector, &iwucq->verbs_cq.cq,
> +					&cmd.ibv_cmd, sizeof(cmd), &resp.ibv_resp,
> +					sizeof(resp));
> +		if (!ret) {
> +			info.cq_id = resp.cq_id;
> +			/* Do not report the cqe's burned by HW */
> +			iwucq->verbs_cq.cq.cqe = ncqe;
> +		}
> +	}

Just always call ibv_cmd_create_cq_ex(), it internally does the right
thing for all cases.

Jason

  reply	other threads:[~2021-01-28 13:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28  3:56 [PATCH rdma-core 0/5] Add irdma user space provider for Intel Ethernet RDMA Tatyana Nikolova
2021-01-28  3:57 ` [PATCH rdma-core 1/5] rdma-core/i40iw: Remove provider i40iw Tatyana Nikolova
2021-01-28 13:31   ` Jason Gunthorpe
2021-01-28  3:57 ` [PATCH rdma-core 2/5] rdma-core/irdma: Add Makefile and ABI definitions Tatyana Nikolova
2021-01-28  3:57 ` [PATCH rdma-core 3/5] rdma-core/irdma: Add user/kernel shared libraries Tatyana Nikolova
2021-01-28 13:32   ` Jason Gunthorpe
2021-01-28  3:57 ` [PATCH rdma-core 4/5] rdma-core/irdma: Add library setup and utility definitions Tatyana Nikolova
2021-01-28 13:34   ` Jason Gunthorpe
2021-01-28  3:57 ` [PATCH rdma-core 5/5] rdma-core/irdma: Implement device supported verb APIs Tatyana Nikolova
2021-01-28 13:36   ` Jason Gunthorpe [this message]
2021-01-28 13:26 ` [PATCH rdma-core 0/5] Add irdma user space provider for Intel Ethernet RDMA Leon Romanovsky
2021-01-28 13:37 ` 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=20210128133624.GD4247@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=tatyana.e.nikolova@intel.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 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).