Re: [net-next,v5,06/13] octeontx2-af: npc: cn20k: Use common APIs

From: Ratheesh Kannoth

Date: Tue Jan 27 2026 - 22:31:25 EST


On 2026-01-28 at 07:59:24, Jakub Kicinski (kuba@xxxxxxxxxx) wrote:
> > --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
>
> > + else
> > + keyx_cfg = mkex->keyx_cfg;
> >
> > /* Reserve last counter for MCAM RX miss action which is set to
> > * drop packet. This way we will know how many pkts didn't match
> > @@ -2080,7 +2169,6 @@ static void rvu_npc_setup_interfaces(struct rvu *rvu, int blkaddr)
> > mcam->counters.max--;
> > mcam->rx_miss_act_cntr = mcam->counters.max;
> ^^^^^^^^^^
>
> Was the removal of "goto skip_miss_cntr" intentional for cn20k? Previously,
> cn20k would skip the counter reservation here. Now cn20k reserves a counter
> via mcam->counters.max-- but never programs NPC_AF_INTFX_MISS_STAT_ACT (due
> to the "continue" later in the RX interface loop). This appears to waste
> one counter on cn20k.
ACK. cn20k does not use counters. Anyway i moved this under SoC cn20k check.

>
> > -skip_miss_cntr:
> > rx_kex = keyx_cfg[NIX_INTF_RX];
> > tx_kex = keyx_cfg[NIX_INTF_TX];
> >