Re: [PATCH net] octeontx2-af: npc: cn20k: fix NPC defrag
From: Simon Horman
Date: Thu Jun 18 2026 - 10:00:37 EST
On Wed, Jun 17, 2026 at 03:51:49PM +0530, Ratheesh Kannoth wrote:
> npc_defrag_alloc_free_slots() always passed NPC_MCAM_KEY_X2 into
> __npc_subbank_alloc(), which must match sb->key_type, so defrag never
> allocated replacement slots on X4 banks. Pass the subbank key type for
> bank 0, and only extend the search into bank 1 for X2 (X4 MCAM indices
> are confined to b0b..b0t).
>
> Fixes: 645c6e3c1999 ("octeontx2-af: npc: cn20k: virtual index support")
> Signed-off-by: Ratheesh Kannoth <rkannoth@xxxxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>