Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Michael Margolin <mrgolin@amazon.com>
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org, sleybo@amazon.com,
	matua@amazon.com, gal.pressman@linux.dev,
	Yonatan Nachum <ynachum@amazon.com>
Subject: Re: [PATCH for-next v10 4/6] RDMA/core: Add Completion Counters to resource tracking
Date: Tue, 21 Jul 2026 17:16:59 +0300	[thread overview]
Message-ID: <20260721141659.GM110966@unreal> (raw)
In-Reply-To: <20260720132221.2551-5-mrgolin@amazon.com>

On Mon, Jul 20, 2026 at 01:22:19PM +0000, Michael Margolin wrote:
> Track completion counter objects in the resource tracking database so
> they are visible through the rdma netlink interface. The rdma tool
> displays the comp_cntr count in the resource summary.
> 
> Add RDMA_RESTRACK_COMP_CNTR type, embed rdma_restrack_entry in
> ib_comp_cntr, and add the res_to_dev mapping. Register the resource
> on create and remove it on destroy.
> 
> Reviewed-by: Yonatan Nachum <ynachum@amazon.com>
> Signed-off-by: Michael Margolin <mrgolin@amazon.com>
> ---
>  drivers/infiniband/core/nldev.c                      | 8 ++++++++
>  drivers/infiniband/core/restrack.c                   | 2 ++
>  drivers/infiniband/core/uverbs_std_types_comp_cntr.c | 6 ++++++
>  include/rdma/ib_verbs.h                              | 1 +
>  include/rdma/restrack.h                              | 4 ++++
>  5 files changed, 21 insertions(+)

<...>

> @@ -48,7 +50,11 @@ static int UVERBS_HANDLER(UVERBS_METHOD_COMP_CNTR_CREATE)(struct uverbs_attr_bun
>  	if (ret)
>  		goto err_free;
>  
> +	rdma_restrack_new(&cc->res, RDMA_RESTRACK_COMP_CNTR);

This is an unexpected location. I would expect restrack
initialization to occur before ops.create_comp_cntr.

Thanks

> +	rdma_restrack_set_name(&cc->res, NULL);
> +
>  	uobj->object = cc;
> +	rdma_restrack_add(&cc->res);
>  	uverbs_finalize_uobj_create(attrs, UVERBS_ATTR_CREATE_COMP_CNTR_HANDLE);
>  	return 0;

  reply	other threads:[~2026-07-21 14:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 13:22 [PATCH for-next v10 0/6] Introduce Completion Counters Michael Margolin
2026-07-20 13:22 ` [PATCH for-next v10 1/6] RDMA/core: Add Completion Counters support Michael Margolin
2026-07-20 13:22 ` [PATCH for-next v10 2/6] RDMA/core: Prevent destroying in-use completion counters Michael Margolin
2026-07-20 13:22 ` [PATCH for-next v10 3/6] RDMA/core: Expose Completion Counter capabilities to userspace Michael Margolin
2026-07-20 13:22 ` [PATCH for-next v10 4/6] RDMA/core: Add Completion Counters to resource tracking Michael Margolin
2026-07-21 14:16   ` Leon Romanovsky [this message]
2026-07-21 17:14     ` Michael Margolin
2026-07-20 13:22 ` [PATCH for-next v10 5/6] RDMA/efa: Update device interface Michael Margolin
2026-07-20 13:22 ` [PATCH for-next v10 6/6] RDMA/efa: Add Completion Counters support Michael Margolin
2026-07-21  7:59 ` [PATCH for-next v10 0/6] Introduce Completion Counters Michael Margolin

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=20260721141659.GM110966@unreal \
    --to=leon@kernel.org \
    --cc=gal.pressman@linux.dev \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=matua@amazon.com \
    --cc=mrgolin@amazon.com \
    --cc=sleybo@amazon.com \
    --cc=ynachum@amazon.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