From patchwork Thu Mar 7 03:02:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Hai X-Patchwork-Id: 138075 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2E67543B5E; Thu, 7 Mar 2024 04:07:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1EC1642E5B; Thu, 7 Mar 2024 04:07:11 +0100 (CET) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mails.dpdk.org (Postfix) with ESMTP id C9BCC42D87 for ; Thu, 7 Mar 2024 04:07:05 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4TqvMg4Vrwz27g4P for ; Thu, 7 Mar 2024 11:06:23 +0800 (CST) Received: from kwepemd100004.china.huawei.com (unknown [7.221.188.31]) by mail.maildlp.com (Postfix) with ESMTPS id 2371C1A016C for ; Thu, 7 Mar 2024 11:07:04 +0800 (CST) Received: from localhost.localdomain (10.67.165.2) by kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Thu, 7 Mar 2024 11:07:03 +0800 From: Jie Hai To: , Yisen Zhuang , Chengchang Tang , Lijun Ou , Chunsong Feng , "Wei Hu (Xavier)" , "Min Hu (Connor)" , Ferruh Yigit , Huisong Li CC: , Subject: [PATCH v5 3/7] net/hns3: fix dump counter of registers Date: Thu, 7 Mar 2024 11:02:43 +0800 Message-ID: <20240307030247.599394-4-haijie1@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240307030247.599394-1-haijie1@huawei.com> References: <20231214015650.3738578-1-haijie1@huawei.com> <20240307030247.599394-1-haijie1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemd100004.china.huawei.com (7.221.188.31) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Since the driver dumps the queue interrupt registers according to the intr_tqps_num, the counter should be the same. Fixes: acb3260fac5c ("net/hns3: fix dump register out of range") Fixes: 936eda25e8da ("net/hns3: support dump register") Signed-off-by: Jie Hai Cc: stable@dpdk.org Acked-by: Huisong Li --- drivers/net/hns3/hns3_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c index be1be6a89c94..d77170481a3d 100644 --- a/drivers/net/hns3/hns3_regs.c +++ b/drivers/net/hns3/hns3_regs.c @@ -135,7 +135,7 @@ hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length) tqp_intr_lines = sizeof(tqp_intr_reg_addrs) / REG_LEN_PER_LINE + 1; len = (cmdq_lines + common_lines + ring_lines * hw->tqps_num + - tqp_intr_lines * hw->num_msi) * REG_NUM_PER_LINE; + tqp_intr_lines * hw->intr_tqps_num) * REG_NUM_PER_LINE; if (!hns->is_vf) { ret = hns3_get_regs_num(hw, ®s_num_32_bit, ®s_num_64_bit);