All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Abhijit Gangurde <abhijit.gangurde@amd.com>
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: Tue, 1 Dec 2026 15:36:18 -0400	[thread overview]
Message-ID: <20261201193618.GA351887@ziepe.ca> (raw)
In-Reply-To: <20261127040832.16908-3-abhijit.gangurde@amd.com>

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

  reply	other threads:[~2026-12-01 19:36 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 umem attributes 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 [this message]
2026-11-27  4:08 ` [for-next v3 3/3] RDMA/ionic: Accept QP SQ and RQ rings " Abhijit Gangurde
2026-11-27  4:24 ` [for-next v3 0/3] RDMA/ionic: Accept CQ, SQ, and RQ rings as " sashiko-bot

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=20261201193618.GA351887@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=abhijit.gangurde@amd.com \
    --cc=allen.hubbe@amd.com \
    --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 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.