net: hns3: fix wrong rpu tln reg issue
authorJijie Shao <shaojijie@huawei.com>
Tue, 15 Aug 2023 06:06:41 +0000 (14:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Aug 2023 07:56:38 +0000 (08:56 +0100)
commit36122201eeaefd78547def9681aa5d83b5a00b6a
tree309c7470a38477a15964ec3750eb130cd2520521
parent3ef5d70b82ad5be1235e16318d9ab4f848a5bd68
net: hns3: fix wrong rpu tln reg issue

In the original RPU query command, the status register values of
multiple RPU tunnels are accumulated by default, which is unreasonable.
This patch Fix it by querying the specified tunnel ID.
The tunnel number of the device can be obtained from firmware
during initialization.

Fixes: ddb54554fa51 ("net: hns3: add DFX registers information for ethtool -d")
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_regs.c