net/hns3: fix register length when dumping registers
authorChengchang Tang <tangchengchang@huawei.com>
Thu, 14 Jan 2021 13:33:34 +0000 (21:33 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 Jan 2021 02:30:32 +0000 (03:30 +0100)
commit2d0467532b1a2c10739a89ead3bd03042486b1de
tree02502fa394cfc132bbf8f330bad4fd91844ce628
parente5d179078b611035395317c80a9285c8a2de18a2
net/hns3: fix register length when dumping registers

Currently, the reg length return by HNS3 is the total length of all the
registers. But for upper layer user, the total register length is the
length multiplied by width. This can lead to a waste of memory and print
some invalid information.

This patch corrects the length and width of the register.

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