dpdk/0017-net-hns3-fix-dump-register-out-of-range.patch
speech_white 3a8995b1ad Update DPDK baseline version
Update DPDK version from 19.11 to 20.11 and also support
hns3 PMD for Kunpeng 920 and Kunpeng 930.

Signed-off-by: speech_white <humin29@huawei.com>
2021-06-28 00:52:34 +00:00

39 lines
1.4 KiB
Diff

From a69abf12f46295044e4e59b60e49e73bc66afe10 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 14 Jan 2021 21:33:36 +0800
Subject: [PATCH 017/189] net/hns3: fix dump register out of range
Currently, when dump the queue interrupt registers, the number of
registers that should be dumped is calculated from num_msi. But the
value of num_msi includes the number of misc interrupts. So, for some
hardware version, like kupeng930, it will lead to an illegal access.
This patch replace num_msi with intr_tqps_num which indicate the
number of interrupts used by the tqps.
Fixes: 936eda25e8da ("net/hns3: support dump register")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
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 775e096..f2cb465 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -300,7 +300,7 @@ hns3_direct_access_regs(struct hns3_hw *hw, uint32_t *data)
}
reg_num = sizeof(tqp_intr_reg_addrs) / sizeof(uint32_t);
- for (j = 0; j < hw->num_msi; j++) {
+ for (j = 0; j < hw->intr_tqps_num; j++) {
reg_offset = HNS3_TQP_INTR_REG_SIZE * j;
for (i = 0; i < reg_num; i++)
*data++ = hns3_read_dev(hw, tqp_intr_reg_addrs[i] +
--
2.7.4