From: Subrat Pandey <subratp@marvell.com>
To: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: <pabeni@redhat.com>, <kuba@kernel.org>, <edumazet@google.com>,
<davem@davemloft.net>, <andrew+netdev@lunn.ch>,
<sbhatta@marvell.com>, <rkannoth@marvell.com>,
<gakula@marvell.com>, <sgoutham@marvell.com>,
<subratp@marvell.com>
Subject: [PATCH net v4 2/2] octeontx2-af: mcs: Fix SC resource cleanup loop
Date: Tue, 18 Aug 2026 14:41:23 +0530 [thread overview]
Message-ID: <20260818091124.1832237-3-subratp@marvell.com> (raw)
In-Reply-To: <20260818091124.1832237-1-subratp@marvell.com>
From: Baha Mesleh <baha.mesleh@nokia.com>
The SC resource cleanup loop was incorrectly iterating over secy.max
instead of sc.max. Use sc.max as the loop bound.
Fixes: cfc14181d497 ("octeontx2-af: cn10k: mcs: Manage the MCS block hardware resources")
Signed-off-by: Baha Mesleh <baha.mesleh@nokia.com>
Signed-off-by: Subrat Pandey <subratp@marvell.com>
---
v4:
- Correct the Fixes: tag commit subject to match the actual upstream
commit title.
v3:
- Extend the sc.max fix to the SC stats loop in mcs_clear_all_stats()
(v2 fixed only mcs_free_all_rsrc()).
- Add Fixes: tag and reword commit message.
drivers/net/ethernet/marvell/octeontx2/af/mcs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
index a07e0b3d8d00..aa0ed24bb3de 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c
@@ -314,7 +314,7 @@ int mcs_clear_all_stats(struct mcs *mcs, u16 pcifunc, int dir)
}
/* Clear SC stats */
- for (id = 0; id < map->secy.max; id++) {
+ for (id = 0; id < map->sc.max; id++) {
if (map->sc2pf_map[id] != pcifunc)
continue;
mcs_clear_stats(mcs, MCS_SC_STATS, id, dir);
@@ -738,7 +738,7 @@ int mcs_free_all_rsrc(struct mcs *mcs, int dir, u16 pcifunc)
}
/* free sc entries */
- for (id = 0; id < map->secy.max; id++) {
+ for (id = 0; id < map->sc.max; id++) {
if (map->sc2pf_map[id] != pcifunc)
continue;
mcs_free_rsrc(&map->sc, map->sc2pf_map, id, pcifunc);
--
2.43.0
prev parent reply other threads:[~2026-08-18 9:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 9:11 [PATCH net v4 0/2] octeontx2: Misc fixes for RVU drivers Subrat Pandey
2026-08-18 9:11 ` [PATCH net v4 1/2] octeontx2-pf: Fix aura BPID assignment when CONFIG_DCB is enabled Subrat Pandey
2026-08-20 18:23 ` Simon Horman
2026-08-18 9:11 ` Subrat Pandey [this message]
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=20260818091124.1832237-3-subratp@marvell.com \
--to=subratp@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.