mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhijit Gangurde <abhijit.gangurde@amd.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: leon@kernel.org, allen.hubbe@amd.com, nikhil.agarwal@amd.com,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [for-next v3 2/3] RDMA/ionic: Accept CQ ring buffers as ioctl umem attributes
Date: Wed, 2 Dec 2026 17:16:43 +0530	[thread overview]
Message-ID: <5d53b01e-077f-18fc-53c5-739836cfdb36@amd.com> (raw)
In-Reply-To: <20261201193618.GA351887@ziepe.ca>


On 12/2/26 01:06, Jason Gunthorpe wrote:
> On Fri, Nov 27, 2026 at 09:38:31AM +0530, Abhijit Gangurde wrote:
>> +static int ionic_cq_get_user_umem(struct ionic_ibdev *dev, struct ionic_cq *cq,
>> +				  const struct ionic_qdesc *req_cq,
>> +				  const struct uverbs_attr_bundle *attrs,
>> +				  int udma_idx)
>> +{
>> +	struct ib_umem_dmabuf *umem_dmabuf;
>> +	struct ib_uverbs_buffer_desc desc;
>> +	struct ib_umem *umem;
>> +	u16 attr_id;
>> +	int rc;
>> +
>> +	if (udma_idx < 0 || udma_idx >= ARRAY_SIZE(ionic_cq_buf_attrs))
>> +		return -EINVAL;
>> +
>> +	attr_id = ionic_cq_buf_attrs[udma_idx];
>> +	if (attrs && uverbs_attr_is_valid(attrs, attr_id)) {
>> +		rc = uverbs_get_buffer_desc(attrs, attr_id, &desc);
>> +		if (rc)
>> +			return rc;
>> +
>> +		if (desc.length < req_cq->size)
>> +			return -EINVAL;
>> +
>> +		if (desc.type == IB_UVERBS_BUFFER_TYPE_DMABUF) {
> No other driver is touching this IB_UVERBS_BUFFER_TYPE_DMABUF and yet
> they support DMABUF, why is this touching internal info?
>
> It was supposed to be generic, you get a desc and then you map
> it. Driver doesn't care what is in the desc.
>
> Jason
>
Thanks Jason, agreed. I was cross-checking the desc against the request 
address.  I'll rework it.

Abhijit


  reply	other threads:[~2026-12-02 11:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  4:08 [for-next v3 0/3] RDMA/ionic: Accept CQ, SQ, and RQ rings as " Abhijit Gangurde
2026-11-27  4:08 ` [for-next v3 1/3] RDMA/ionic: Bound user queue depth and stride before shifting Abhijit Gangurde
2026-11-27  4:08 ` [for-next v3 2/3] RDMA/ionic: Accept CQ ring buffers as ioctl umem attributes Abhijit Gangurde
2026-12-01 19:36   ` Jason Gunthorpe
2026-12-02 11:46     ` Abhijit Gangurde [this message]
2026-11-27  4:08 ` [for-next v3 3/3] RDMA/ionic: Accept QP SQ and RQ rings " Abhijit Gangurde

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=5d53b01e-077f-18fc-53c5-739836cfdb36@amd.com \
    --to=abhijit.gangurde@amd.com \
    --cc=allen.hubbe@amd.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=nikhil.agarwal@amd.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

all inboxes | Powered by JetHome®