From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Yishai Hadas <yishaih@nvidia.com>,
Edward Srouji <edwards@nvidia.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next v1 5/8] RDMA/core: Introduce a DMAH object and its alloc/free APIs
Date: Mon, 14 Jul 2025 13:39:25 -0300 [thread overview]
Message-ID: <20250714163925.GF2067380@nvidia.com> (raw)
In-Reply-To: <b1ff9b142f785a52009b288567bf4e15dd34ecb8.1752388126.git.leon@kernel.org>
On Sun, Jul 13, 2025 at 09:37:26AM +0300, Leon Romanovsky wrote:
> +static int UVERBS_HANDLER(UVERBS_METHOD_DMAH_ALLOC)(
> + struct uverbs_attr_bundle *attrs)
> +{
> + struct ib_uobject *uobj =
> + uverbs_attr_get(attrs, UVERBS_ATTR_ALLOC_DMAH_HANDLE)
> + ->obj_attr.uobject;
> + struct ib_device *ib_dev = attrs->context->device;
> + struct ib_dmah *dmah;
> + int ret;
> +
> + if (!ib_dev->ops.alloc_dmah || !ib_dev->ops.dealloc_dmah)
> + return -EOPNOTSUPP;
This shouldn't be needed, use UAPI_DEF_OBJ_NEEDS_FN() instead.
> +DECLARE_UVERBS_NAMED_OBJECT(UVERBS_OBJECT_DMAH,
> + UVERBS_TYPE_ALLOC_IDR(uverbs_free_dmah),
> + &UVERBS_METHOD(UVERBS_METHOD_DMAH_ALLOC),
> + &UVERBS_METHOD(UVERBS_METHOD_DMAH_FREE));
> +
> +const struct uapi_definition uverbs_def_obj_dmah[] = {
> + UAPI_DEF_CHAIN_OBJ_TREE_NAMED(UVERBS_OBJECT_DMAH,
> + UAPI_DEF_OBJ_NEEDS_FN(dealloc_dmah)),
> + {}
I think it should be on the NAMED_OBJECT in this case, like AH:
DECLARE_UVERBS_OBJECT(
UVERBS_OBJECT_AH,
[..]
UAPI_DEF_OBJ_NEEDS_FN(create_user_ah),
UAPI_DEF_OBJ_NEEDS_FN(destroy_ah)),
Jason
next prev parent reply other threads:[~2025-07-14 16:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-13 6:37 [PATCH rdma-next v1 0/8] RDMA support for DMA handle Leon Romanovsky
2025-07-13 6:37 ` [PATCH rdma-next v1 1/8] PCI/TPH: Expose pcie_tph_get_st_table_size() Leon Romanovsky
2025-07-13 6:37 ` [PATCH mlx5-next v1 2/8] net/mlx5: Expose IFC bits for TPH Leon Romanovsky
2025-07-13 6:37 ` [PATCH mlx5-next v1 3/8] net/mlx5: Add support for device steering tag Leon Romanovsky
2025-07-13 6:37 ` [PATCH rdma-next v1 4/8] IB/core: Add UVERBS_METHOD_REG_MR on the MR object Leon Romanovsky
2025-07-14 16:33 ` Jason Gunthorpe
2025-07-15 7:14 ` Leon Romanovsky
2025-07-13 6:37 ` [PATCH rdma-next v1 5/8] RDMA/core: Introduce a DMAH object and its alloc/free APIs Leon Romanovsky
2025-07-14 16:39 ` Jason Gunthorpe [this message]
2025-07-15 8:21 ` Yishai Hadas
2025-07-15 12:53 ` Jason Gunthorpe
2025-07-15 15:45 ` Yishai Hadas
2025-07-14 16:39 ` Jason Gunthorpe
2025-07-15 8:29 ` Yishai Hadas
2025-07-16 3:58 ` Wathsala Wathawana Vithanage
2025-07-17 11:08 ` Leon Romanovsky
2025-07-13 6:37 ` [PATCH rdma-next v1 6/8] RDMA/mlx5: Add DMAH object support Leon Romanovsky
2025-07-13 6:37 ` [PATCH rdma-next v1 7/8] IB: Extend UVERBS_METHOD_REG_MR to get DMAH Leon Romanovsky
2025-07-13 22:04 ` Zhu Yanjun
2025-07-14 7:17 ` Leon Romanovsky
2025-07-14 1:03 ` Junxian Huang
2025-07-13 6:37 ` [PATCH rdma-next v1 8/8] RDMA/mlx5: Add DMAH support for reg_user_mr/reg_user_dmabuf_mr Leon Romanovsky
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=20250714163925.GF2067380@nvidia.com \
--to=jgg@nvidia.com \
--cc=edwards@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=yishaih@nvidia.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.