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>
}
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] +