All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Ajay Sharma <sharmaajay@microsoft.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Long Li <longli@microsoft.com>,
	Mahmoud Elhaddad <Mahmoud.Elhaddad@microsoft.com>
Subject: Re: CQ creation for RDMA use case
Date: Thu, 21 Jul 2022 15:58:40 -0300	[thread overview]
Message-ID: <20220721185840.GD6833@ziepe.ca> (raw)
In-Reply-To: <BL1PR21MB32831892955F3493715EEE33D6869@BL1PR21MB3283.namprd21.prod.outlook.com>

On Tue, Jul 12, 2022 at 07:55:21PM +0000, Ajay Sharma wrote:
>    Hello,
> 
>    We have a situation where the hardware treats cq creation differently
>    when attaching it to RAW_QP use case vs the RC_QP use case. The
>    situation is as follows :
> 
> 
>    When creating the cq for RAW_QP_TYPE use case , the hw requires that
>    memory be registered with the hw but it does not yet attaches it to the
>    qp meaning it does not yet allocate any hw side resources for the cq.
> 
>    The hardware will allocate resources for this qp type only when it
>    see’s the work queue creation request and that’s when it allocates
>    resources for both cq and wq.
> 
> 
>    When creating cq for the RC_QP_TYPE use case the hardware creates
>    resources immediately on cq creation request.
> 
> 
>    The problem is from the user mode side there is no way to tell whether
>    this cq is intended for RAW QP use case or RC QP use case. Can we add a
>    flag in the  ibv_cq_init_attr_ex to differentiate the use case we are
>    trying to address.
> 
>    We have explored the option of customizing in the firmware side and at
>    this point it seems a very expensive operation and would like to avoid
>    that.

I don't have a good advice for you, this is very non-compliant if CQs
can only be used in certain configurations. The entire verbs is
designed around the idea that the CQ is a sharable object - having a
device that creates a CQ for every queue is very far away.

Why can you not correct this?

A flag is not so sufficient, it is an entire set of bad behavior that you
have to opt into.

You may consider a dv for creating a QP/CQ pair if that models your
HW.

Jason

           reply	other threads:[~2022-07-21 18:58 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <BL1PR21MB32831892955F3493715EEE33D6869@BL1PR21MB3283.namprd21.prod.outlook.com>]

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=20220721185840.GD6833@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=Mahmoud.Elhaddad@microsoft.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=sharmaajay@microsoft.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.