Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp168011rdb; Thu, 24 Aug 2023 02:26:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwxIicWkJrgQbiebPbOyKpERPqYgc/u6sWkbYGDW+sc3etMdnns0krCBR+be99w712tv20 X-Received: by 2002:a17:902:d50c:b0:1bb:d586:d29a with SMTP id b12-20020a170902d50c00b001bbd586d29amr23804860plg.34.1692869190367; Thu, 24 Aug 2023 02:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692869190; cv=none; d=google.com; s=arc-20160816; b=t7sRBA3Tk0IaCLJ6920m2AjXs2cS+R3GeaHclIkTItofvBn3WWMeCq2Q0ZBymJNRLG v5HaDcsEREE3MQkHeal5KKT9AuP6VQRSpfn7dZfkhfmqHJ9GBPC8+uXU18MUqqYH4916 of7dZfgaWZQTWMoD41qZ58eqQlEe5h+EkAQVELiCGGaq3Lt5YvxC7F6bjvNQ7Gpfuh4Y cwW83Yq/mvUiRHshORzxWiwX5PsO/ds9ipyrMsqsRsxFianmoUCJ479KgGGq1mQ0UNaW hKWoQ+OrYXuUvrUbShdKyjPbQgtZh0DEzV+HJrnhNP1rTqbGP59ydiMfaQ+gbgHV6Rkw W3Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=Ze+ZgRvQTVdHKJoPNCDdWAfsJXN1XNexyTIMJPJEWdM=; fh=lwuYK8a7egGMx+R2FtRpG71kRpIpHiJ0VDZBopZor6o=; b=olQtgyNiMh/CEb0z7KuoBdlA5EUwcIBXKmyuTwyTl89AScr3ty7cfmbf3eenwaDcVf tvE8kM0MbD5shrnrjN9lXGUL1MWLg0BH0nhvLQc9pECAG0V2FbSODH6aJkWY2QgW3yj8 58HuyCvziu6DPv62MZuRgqXltZNJ8h43ohOYtHI6CPdNZ4pezQWkPhwCH5TEiXTQsNds I3rxXo3HKWmzmGYxDemLEUDBlxGuYslIvlSzg0AAsQZKXIU7EDsmfMvz6j/ndkz49hZL wK5kvIY2inzzB/c0mPD4heeIejgvwXDgTex+6ebAQXMvJ5VXP2jmhWuDXSGbg3YVEgVi amCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k16-20020a170902d59000b001b84c7d4716si13707249plh.32.2023.08.24.02.26.17; Thu, 24 Aug 2023 02:26:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235687AbjHXH6i (ORCPT + 99 others); Thu, 24 Aug 2023 03:58:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238424AbjHXH6V (ORCPT ); Thu, 24 Aug 2023 03:58:21 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21D8D170B; Thu, 24 Aug 2023 00:58:19 -0700 (PDT) Received: from kwepemi500006.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RWb591sXvzrSMp; Thu, 24 Aug 2023 15:56:45 +0800 (CST) Received: from [10.67.120.168] (10.67.120.168) by kwepemi500006.china.huawei.com (7.221.188.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 24 Aug 2023 15:58:16 +0800 Message-ID: <7c94dd6a-4fab-10dc-b0bb-2d9caa16a148@hisilicon.com> Date: Thu, 24 Aug 2023 15:58:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.0 Subject: Re: [PATCH for-next 0/3] RDMA/hns: Add more debugging information for rdma-tool To: Leon Romanovsky CC: , , , References: <20230816091812.2899366-1-huangjunxian6@hisilicon.com> <20230819113212.GN22185@unreal> Content-Language: en-US From: Junxian Huang In-Reply-To: <20230819113212.GN22185@unreal> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.120.168] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500006.china.huawei.com (7.221.188.68) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. And could you please explain why rdmatool is not suitable for this? 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 >>