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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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..




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux