]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: hns3: fix index limit to support all queue stats
authorJie Wang <wangjie125@huawei.com>
Mon, 25 Mar 2024 12:43:09 +0000 (20:43 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 26 Mar 2024 14:32:39 +0000 (15:32 +0100)
Currently, hns hardware supports more than 512 queues and the index limit
in hclge_comm_tqps_update_stats is wrong. So this patch removes it.

Fixes: 287db5c40d15 ("net: hns3: create new set of common tqp stats APIs for PF and VF reuse")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c

index f3c9395d8351cb31108973e1867332e00026c6ac..618f66d9586b390a4d4ec45aafa4178ec06e5a91 100644 (file)
@@ -85,7 +85,7 @@ int hclge_comm_tqps_update_stats(struct hnae3_handle *handle,
                hclge_comm_cmd_setup_basic_desc(&desc, HCLGE_OPC_QUERY_TX_STATS,
                                                true);
 
-               desc.data[0] = cpu_to_le32(tqp->index & 0x1ff);
+               desc.data[0] = cpu_to_le32(tqp->index);
                ret = hclge_comm_cmd_send(hw, &desc, 1);
                if (ret) {
                        dev_err(&hw->cmq.csq.pdev->dev,