Subject: Re: [PATCH net-next v3 01/13] octeontx2-af: npc: cn20k: Index management

From: Jakub Kicinski <[email-masked]>
Date: Wed, 14 Jan 2026 19:14:57 -0800

On Wed, 14 Jan 2026 11:22:19 +0530 Ratheesh Kannoth wrote:
> > > Customer can change subbank search order by modifying the search order
> > > thru this devlink.  
> >
> > Unclear what you're trying to say.  
> TCAM memory is dividied into 32 horizontal chunks. Each chunk is called
> a subbank. When a request to alloc a free TCAM slot is requested by PF,
> these 32 subbank are searched in a specific order. Since bottom subbank rules
> have higher priority than top subbanks, customer may need to alter the
> search order to control the distribution of allocation to different subbanks.
> 
> Example search order format to debugfs entry is as below
> 
> "[0]=[8],[1]=7,[2]=30,[3]=0,[4]=1,[5]=2,[6]=3,[4]=4,[5]=5,[6]=6,[7]=9,[9]=10,[10]=11,[11]=12,[12]=13,[13]=14......[31]=0"
> 
> This input "string" is too long for devlink ?
> 
> union devlink_param_value {
>         u8 vu8;
>         u16 vu16;
>         u32 vu32;
>         char vstr[__DEVLINK_PARAM_MAX_STRING_VALUE];
>         bool vbool;
> };

Sounds like:

https://lore.kernel.org/netdev/[email-masked]/

This was never fully merged but I think it's the best fit for your
needs. Saeed are you planning to come back to it?