2024-03-15 10:13:05

by Jijie Shao

[permalink] [raw]
Subject: [PATCH net 1/3] net: hns3: fix index limit to support all queue stats

From: Jie Wang <[email protected]>

Currently, hns hardware supports more than 512 queues and the index limit
in hclge_comm_tqps_update_stats is useless. So this patch remove it.

Fixes: 287db5c40d15 ("net: hns3: create new set of common tqp stats APIs for PF and VF reuse")
Signed-off-by: Jie Wang <[email protected]>
Signed-off-by: Jijie Shao <[email protected]>
---
.../ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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
index f3c9395d8351..618f66d9586b 100644
--- 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
@@ -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,
--
2.30.0



2024-03-15 17:34:25

by Michal Kubiak

[permalink] [raw]
Subject: Re: [PATCH net 1/3] net: hns3: fix index limit to support all queue stats

On Fri, Mar 15, 2024 at 06:07:46PM +0800, Jijie Shao wrote:
> From: Jie Wang <[email protected]>
>
> Currently, hns hardware supports more than 512 queues and the index limit
> in hclge_comm_tqps_update_stats is useless. So this patch remove it.

typo: remove -> removes

>
> Fixes: 287db5c40d15 ("net: hns3: create new set of common tqp stats APIs for PF and VF reuse")
> Signed-off-by: Jie Wang <[email protected]>
> Signed-off-by: Jijie Shao <[email protected]>
> ---
> .../ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
> index f3c9395d8351..618f66d9586b 100644
> --- 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
> @@ -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,
> --
> 2.30.0
>
>


Thanks,
Michal