All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Selvin Xavier <selvin.xavier@broadcom.com>
Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org,
	andrew.gospodarek@broadcom.com,
	kalesh-anakkur.purayil@broadcom.com, kashyap.desai@broadcom.com
Subject: Re: [PATCH for-next 1/4] RDMA/bnxt_re: Support driver specific data collection using rdma tool
Date: Wed, 30 Oct 2024 15:43:25 +0200	[thread overview]
Message-ID: <20241030134325.GB5988@unreal> (raw)
In-Reply-To: <CA+sbYW1_DSX3g1-Q7YyOYGj2R7nNJVSCeY_GezBnHEQCRvn-Vg@mail.gmail.com>

On Wed, Oct 30, 2024 at 01:59:06PM +0530, Selvin Xavier wrote:
> On Tue, Oct 29, 2024 at 7:33 PM Leon Romanovsky <leon@kernel.org> wrote:
> >
> > On Tue, Oct 22, 2024 at 03:11:53AM -0700, Selvin Xavier wrote:
> > > From: Kashyap Desai <kashyap.desai@broadcom.com>
> > >
> > > Allow users to dump driver specific resource details when
> > > queried through rdma tool. This supports the driver data
> > > for QP, CQ, MR and SRQ.
> > >
> > > Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> > > Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> > > Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
> > > ---
> > >  drivers/infiniband/hw/bnxt_re/main.c | 148 +++++++++++++++++++++++++++++++++++
> > >  1 file changed, 148 insertions(+)
> > >
> > > diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
> > > index 6715c96..5bed9af 100644
> > > --- a/drivers/infiniband/hw/bnxt_re/main.c
> > > +++ b/drivers/infiniband/hw/bnxt_re/main.c
> > > @@ -882,6 +882,146 @@ static const struct attribute_group bnxt_re_dev_attr_group = {
> > >       .attrs = bnxt_re_attributes,
> > >  };
> > >
> > > +static int bnxt_re_fill_res_mr_entry(struct sk_buff *msg, struct ib_mr *ib_mr)
> > > +{
> > > +     struct bnxt_qplib_hwq *mr_hwq;
> > > +     struct nlattr *table_attr;
> > > +     struct bnxt_re_mr *mr;
> > > +
> > > +     table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER);
> > > +     if (!table_attr)
> > > +             return -EMSGSIZE;
> > > +
> > > +     mr = container_of(ib_mr, struct bnxt_re_mr, ib_mr);
> > > +     mr_hwq = &mr->qplib_mr.hwq;
> > > +
> > > +     if (rdma_nl_put_driver_string(msg, "owner",
> > > +                                   mr_hwq->is_user ?  "user" : "kernel"))
> >
> > Two comments:
> > 1. There is already a helper function to decide if owner is user or kernel - rdma_is_kernel_res().
> > 2. This print duplicates existing information. The difference between
> > user and kernel can be easily seen by looking on the PID output.
> Got it. I will remove this in the follow up patch.

Thanks

  reply	other threads:[~2024-10-30 13:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 10:11 [PATCH for-next 0/4] RDMA/bnxt_re: Debug enhancements for bnxt_re driver Selvin Xavier
2024-10-22 10:11 ` [PATCH for-next 1/4] RDMA/bnxt_re: Support driver specific data collection using rdma tool Selvin Xavier
2024-10-29 14:03   ` Leon Romanovsky
2024-10-30  8:29     ` Selvin Xavier
2024-10-30 13:43       ` Leon Romanovsky [this message]
2024-10-22 10:11 ` [PATCH for-next 2/4] RDMA/bnxt_re: Add support for querying HW contexts Selvin Xavier
2024-10-22 10:11 ` [PATCH for-next 3/4] RDMA/bnxt_re: Support raw data query for each resources Selvin Xavier
2024-10-22 10:11 ` [PATCH for-next 4/4] RDMA/bnxt_re: Add debugfs hook in the driver Selvin Xavier
2024-10-30 10:10   ` Junxian Huang
2024-10-30 13:43     ` 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=20241030134325.GB5988@unreal \
    --to=leon@kernel.org \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=jgg@ziepe.ca \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=selvin.xavier@broadcom.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.