From: Subbaraya Sundeep <sbhatta@marvell.com>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: <sgoutham@marvell.com>, <gakula@marvell.com>,
<hkelam@marvell.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] octeontx2-pf: Add error log forcn10k_map_unmap_rq_policer()
Date: Mon, 7 Apr 2025 10:53:03 +0000 [thread overview]
Message-ID: <Z_Ouj7YHfJf0Wd2K@a9548d409c0b> (raw)
In-Reply-To: <20250407081118.1852-1-vulab@iscas.ac.cn>
On 2025-04-07 at 08:11:17, Wentao Liang (vulab@iscas.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@iscas.ac.cn>
Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>
Thanks,
Sundeep
> ---
> v3: Add failed queue number and error code to log.
> v2: Fix error code
>
> 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..9113a9b90002 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 %d's policer (error %d).",
> + qidx, rc);
>
> rc = cn10k_free_leaf_profile(pfvf, hw->matchall_ipolicer);
>
> --
> 2.42.0.windows.2
>
next prev parent reply other threads:[~2025-04-07 10:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 8:11 [PATCH v3] octeontx2-pf: Add error log forcn10k_map_unmap_rq_policer() Wentao Liang
2025-04-07 10:53 ` Subbaraya Sundeep [this message]
2025-04-07 16:42 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_Ouj7YHfJf0Wd2K@a9548d409c0b \
--to=sbhatta@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sgoutham@marvell.com \
--cc=vulab@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox