public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Junxian Huang <huangjunxian6@hisilicon.com>
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org, linuxarm@huawei.com,
	linux-kernel@vger.kernel.org,
	Michael Margolin <mrgolin@amazon.com>,
	Selvin Xavier <selvin.xavier@broadcom.com>
Subject: Re: [PATCH for-next 0/3] RDMA/hns: Add more debugging information for rdma-tool
Date: Mon, 28 Aug 2023 21:03:10 +0300	[thread overview]
Message-ID: <20230828180310.GR6029@unreal> (raw)
In-Reply-To: <7c94dd6a-4fab-10dc-b0bb-2d9caa16a148@hisilicon.com>

On Thu, Aug 24, 2023 at 03:58:15PM +0800, Junxian Huang wrote:
> 
> 
> On 2023/8/19 19:32, Leon Romanovsky wrote:
> > On Wed, Aug 16, 2023 at 05:18:09PM +0800, Junxian Huang wrote:
> >> 1. #1: The first patch supports dumping QP/CQ/MR context entirely in raw
> >>        data with rdma-tool.
> >>
> >> 2. #2: The second patch supports query of HW stats with rdma-tool.
> >>
> >> 3. #3: The last patch supports query of SW stats with rdma-tool.
> >>
> >> Chengchang Tang (3):
> >>   RDMA/hns: Dump whole QP/CQ/MR resource in raw
> >>   RDMA/hns: Support hns HW stats
> > 
> > These two patches generate static analyzer warnings.
> > ➜  kernel git:(wip/leon-for-next) mkt ci --rev 0a68261bbbe5
> > 0a68261bbbe5 (HEAD -> build) RDMA/hns: Dump whole QP/CQ/MR resource in raw
> > WARNING: 'informations' may be misspelled - perhaps 'information'?
> > #7:
> > rdma-tool, but these informations are not enough. It is very
> >                      ^^^^^^^^^^^^
> > ➜  kernel git:(wip/leon-for-next) mkt ci
> > 5a87279591a1 (HEAD -> build) RDMA/hns: Support hns HW stats
> > drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1651:35: warning: restricted __le16 degrades to integer
> > 
> 
> OK,I'll fix them in V2.
> 
> >>   RDMA/hns: Support hns SW stats
> > 
> > This is not support SW stats, but actually implementation of SW
> > statistics which you exposed through rdmatool. That tool is
> 
> Yes,
> 
> > not right place for such information and debugfs will be better
> > fit.
> > 
> > Thanks
> > 
> 
> but from what I have seen, efa and bnxt_re drivers also use rdmatool
> to expose SW statisics.

I afraid that it was missed in review.

> 
> And could you please explain why rdmatool is not suitable for this?

IMHO, SW statistics are too broad and too coupled with the code to be
really useful in rdmatool.

Let's take an example, your newly added counter in modify QP.
It counts number of failure in hns_roce_modify_qp(), but that
function returns error in such case and users will see it anyway.

So what will give this newly added counter in addition to already known
by users? The answer is nothing and that answer is almost always applicable
to SW statistics.

It is unlikely that we can remove from EFA and bnxt_re already added
counters, but if we can, it will be great.

Thanks

> 
> Junxian
> 
> >>
> >>  drivers/infiniband/hw/hns/hns_roce_ah.c       |   6 +-
> >>  drivers/infiniband/hw/hns/hns_roce_cmd.c      |  19 ++-
> >>  drivers/infiniband/hw/hns/hns_roce_cq.c       |  15 +-
> >>  drivers/infiniband/hw/hns/hns_roce_device.h   |  50 ++++++
> >>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c    |  59 +++++++
> >>  drivers/infiniband/hw/hns/hns_roce_hw_v2.h    |   1 +
> >>  drivers/infiniband/hw/hns/hns_roce_main.c     | 152 +++++++++++++++++-
> >>  drivers/infiniband/hw/hns/hns_roce_mr.c       |  26 ++-
> >>  drivers/infiniband/hw/hns/hns_roce_pd.c       |  10 +-
> >>  drivers/infiniband/hw/hns/hns_roce_qp.c       |   8 +-
> >>  drivers/infiniband/hw/hns/hns_roce_restrack.c |  75 +--------
> >>  drivers/infiniband/hw/hns/hns_roce_srq.c      |   6 +-
> >>  12 files changed, 325 insertions(+), 102 deletions(-)
> >>
> >> --
> >> 2.30.0
> >>

      reply	other threads:[~2023-08-28 18:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16  9:18 [PATCH for-next 0/3] RDMA/hns: Add more debugging information for rdma-tool Junxian Huang
2023-08-16  9:18 ` [PATCH for-next 1/3] RDMA/hns: Dump whole QP/CQ/MR resource in raw Junxian Huang
2023-08-16  9:18 ` [PATCH for-next 2/3] RDMA/hns: Support hns HW stats Junxian Huang
2023-08-16  9:18 ` [PATCH for-next 3/3] RDMA/hns: Support hns SW stats Junxian Huang
2023-08-19 11:32 ` [PATCH for-next 0/3] RDMA/hns: Add more debugging information for rdma-tool Leon Romanovsky
2023-08-24  7:58   ` Junxian Huang
2023-08-28 18:03     ` Leon Romanovsky [this message]

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=20230828180310.GR6029@unreal \
    --to=leon@kernel.org \
    --cc=huangjunxian6@hisilicon.com \
    --cc=jgg@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mrgolin@amazon.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox