net/hns3: fix dump register out of range
authorChengchang Tang <tangchengchang@huawei.com>
Thu, 14 Jan 2021 13:33:36 +0000 (21:33 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 Jan 2021 02:30:32 +0000 (03:30 +0100)
commitacb3260fac5c93d953876172ce322e9f2801a33c
tree14877be12824f0f11518066ea62669d306871649
parent6da903befad6a7da52ee6b80554f63bf74bb9ad1
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