[PATCH net-next v2 2/3] net: airoha: Add FLOW_CLS_STATS callback support

Simon Horman horms at kernel.org
Mon May 19 05:10:32 PDT 2025


On Mon, May 19, 2025 at 11:55:46AM +0200, Lorenzo Bianconi wrote:
> On May 19, Simon Horman wrote:
> > On Fri, May 16, 2025 at 10:00:00AM +0200, Lorenzo Bianconi wrote:
> > 
> > ...
> > 
> > > @@ -1027,6 +1255,15 @@ int airoha_ppe_init(struct airoha_eth *eth)
> > >  	if (!ppe->foe_flow)
> > >  		return -ENOMEM;
> > >  
> > > +	foe_size = PPE_STATS_NUM_ENTRIES * sizeof(*ppe->foe_stats);
> > > +	if (foe_size) {
> > 
> > Hi Lorenzo,
> > 
> > It's unclear to me how foe_size can be zero.
> 
> Hi Simon,
> 
> foe_size will be 0 if you disable CONFIG_NET_AIROHA_FLOW_STATS since in this
> case PPE_STATS_NUM_ENTRIES will be 0.

Thanks,

I see that now but for some reason it escaped me earlier.

With that cleared up this patch looks good to me.

Reviewed-by: Simon Horman <horms at kernel.org>





More information about the Linux-mediatek mailing list