Netdev List
 help / color / mirror / Atom feed
* [PATCH net] octeontx2-af: fix CN20K default MCAM rule removal on port cleanup
@ 2026-08-25  5:17 Ratheesh Kannoth
  2026-08-31  9:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Ratheesh Kannoth @ 2026-08-25  5:17 UTC (permalink / raw)
  To: kuba, linux-kernel, netdev, rkannoth
  Cc: andrew+netdev, davem, edumazet, pabeni, sgoutham, Kiran Kumar K

From: Kiran Kumar K <kirankumark@marvell.com>

npc_mcam_free_all_entries() disables every MCAM entry mapped to a
port before freeing it.  On CN20K, that also disables the default
broadcast, multicast, promiscuous, and unicast rules, which causes
packet drops when all rules are removed per port.

Only disable and free non-default entries.  Leave CN20K default rules
enabled when freeing the remaining port entries.

Fixes: 013717353c03 ("octeontx2-af: npc: cn20k: Tear down default MCAM rules explicitly on free")
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
index 60922944675b..c34f8d86cc8a 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
@@ -2957,10 +2957,9 @@ static void npc_mcam_free_all_entries(struct rvu *rvu, struct npc_mcam *mcam,
 			}
 		}
 
-		/* Disable the entry */
-		npc_enable_mcam_entry(rvu, mcam, blkaddr, index, false);
-
 		if (!cn20k_dft_rl) {
+			/* Disable the entry */
+			npc_enable_mcam_entry(rvu, mcam, blkaddr, index, false);
 			mcam->entry2pfvf_map[index] = NPC_MCAM_INVALID_MAP;
 			/* Free the entry in bitmap */
 			npc_mcam_clear_bit(mcam, index);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] octeontx2-af: fix CN20K default MCAM rule removal on port cleanup
  2026-08-25  5:17 [PATCH net] octeontx2-af: fix CN20K default MCAM rule removal on port cleanup Ratheesh Kannoth
@ 2026-08-31  9:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-31  9:10 UTC (permalink / raw)
  To: Ratheesh Kannoth
  Cc: kuba, linux-kernel, netdev, andrew+netdev, davem, edumazet,
	pabeni, sgoutham, kirankumark

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Tue, 25 Aug 2026 10:47:25 +0530 you wrote:
> From: Kiran Kumar K <kirankumark@marvell.com>
> 
> npc_mcam_free_all_entries() disables every MCAM entry mapped to a
> port before freeing it.  On CN20K, that also disables the default
> broadcast, multicast, promiscuous, and unicast rules, which causes
> packet drops when all rules are removed per port.
> 
> [...]

Here is the summary with links:
  - [net] octeontx2-af: fix CN20K default MCAM rule removal on port cleanup
    https://git.kernel.org/netdev/net/c/1376afc7660b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-31  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25  5:17 [PATCH net] octeontx2-af: fix CN20K default MCAM rule removal on port cleanup Ratheesh Kannoth
2026-08-31  9:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox