]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-6.1/net-hns3-fix-index-limit-to-support-all-queue-stats.patch
6.1-stable patches
[thirdparty/kernel/stable-queue.git] / queue-6.1 / net-hns3-fix-index-limit-to-support-all-queue-stats.patch
1 From 17407eccd87c24ccf593e440a4b395104817dc94 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Mon, 25 Mar 2024 20:43:09 +0800
4 Subject: net: hns3: fix index limit to support all queue stats
5
6 From: Jie Wang <wangjie125@huawei.com>
7
8 [ Upstream commit 47e39d213e09c6cae0d6b4d95e454ea404013312 ]
9
10 Currently, hns hardware supports more than 512 queues and the index limit
11 in hclge_comm_tqps_update_stats is wrong. So this patch removes it.
12
13 Fixes: 287db5c40d15 ("net: hns3: create new set of common tqp stats APIs for PF and VF reuse")
14 Signed-off-by: Jie Wang <wangjie125@huawei.com>
15 Signed-off-by: Jijie Shao <shaojijie@huawei.com>
16 Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
17 Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
18 Reviewed-by: Simon Horman <horms@kernel.org>
19 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
20 Signed-off-by: Sasha Levin <sashal@kernel.org>
21 ---
22 .../ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c
26 index f3c9395d8351c..618f66d9586b3 100644
27 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c
28 +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c
29 @@ -85,7 +85,7 @@ int hclge_comm_tqps_update_stats(struct hnae3_handle *handle,
30 hclge_comm_cmd_setup_basic_desc(&desc, HCLGE_OPC_QUERY_TX_STATS,
31 true);
32
33 - desc.data[0] = cpu_to_le32(tqp->index & 0x1ff);
34 + desc.data[0] = cpu_to_le32(tqp->index);
35 ret = hclge_comm_cmd_send(hw, &desc, 1);
36 if (ret) {
37 dev_err(&hw->cmq.csq.pdev->dev,
38 --
39 2.43.0
40