[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Z_NqVUSiG6Ia1qSK@452e0070d9ab>
Date: Mon, 7 Apr 2025 06:01:57 +0000
From: Subbaraya Sundeep <sbhatta@...vell.com>
To: Wentao Liang <vulab@...as.ac.cn>
CC: <sgoutham@...vell.com>, <gakula@...vell.com>, <hkelam@...vell.com>,
<andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] octeontx2-pf: Add error log
forcn10k_map_unmap_rq_policer()
On 2025-04-05 at 15:23:34, Wentao Liang (vulab@...as.ac.cn) wrote:
> The cn10k_free_matchall_ipolicer() calls the cn10k_map_unmap_rq_policer()
> for each queue in a for loop without checking for any errors.
>
> Check the return value of the cn10k_map_unmap_rq_policer() function during
> each loop, and report a warning if the function fails.
>
> Signed-off-by: Wentao Liang <vulab@...as.ac.cn>
> ---
> drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c
> index a15cc86635d6..895f0f8c85b2 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c
> @@ -353,8 +353,10 @@ int cn10k_free_matchall_ipolicer(struct otx2_nic *pfvf)
>
> /* Remove RQ's policer mapping */
> for (qidx = 0; qidx < hw->rx_queues; qidx++)
> - cn10k_map_unmap_rq_policer(pfvf, qidx,
> - hw->matchall_ipolicer, false);
> + rc = cn10k_map_unmap_rq_policer(pfvf, qidx, hw->matchall_ipolicer, false);
> + if (rc)
> + dev_warn(pfvf->dev,
> + "Failed to unmap RQ's policer.");
Print failed queue number also please.
Thanks,
Sundeep
>
> rc = cn10k_free_leaf_profile(pfvf, hw->matchall_ipolicer);
>
> --
> 2.42.0.windows.2
>
Powered by blists - more mailing lists