Re: [PATCH for-next 1/4] RDMA/bnxt_re: Support driver specific data collection using rdma tool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> wrote:
> >
> > On Tue, Oct 22, 2024 at 03:11:53AM -0700, Selvin Xavier wrote:
> > > From: Kashyap Desai <kashyap.desai@xxxxxxxxxxxx>
> > >
> > > 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@xxxxxxxxxxxx>
> > > Signed-off-by: Kashyap Desai <kashyap.desai@xxxxxxxxxxxx>
> > > Signed-off-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
> > > ---
> > >  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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux