Subject: Re: [PATCH net-next v2 5/7] netdevsim: report stats by default, like a real device

From: Jakub Kicinski <[email-masked]>
Date: Thu, 4 Apr 2024 06:53:45 -0700

On Thu, 04 Apr 2024 15:40:33 +0200 Paolo Abeni wrote:
> > +	nsim_get_stats64(dev, &rtstats);
> > +
> > +	stats->packets = rtstats.tx_packets - !!rtstats.tx_packets;
> > +	stats->bytes = rtstats.tx_bytes;  
> 
> It looks the stats will not be self-consistent with multiple queues
> enabled. 
> 
> What about zeroing 'stats' when idx > 0 ?

Ah, good catch. We do allow allocating multiple queues, even tho 
we don't do anything with them on the driver side, yet..