[Patch v2] net/netvsc: report correct stats values

Stephen Hemminger stephen at networkplumber.org
Wed Apr 27 00:45:24 CEST 2022


On Tue, 26 Apr 2022 22:56:14 +0100
Ferruh Yigit <ferruh.yigit at xilinx.com> wrote:

> >   		if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
> > -			stats->q_opackets[i] = txq->stats.packets;
> > -			stats->q_obytes[i] = txq->stats.bytes;
> > +			stats->q_opackets[i] += txq->stats.packets;
> > +			stats->q_obytes[i] += txq->stats.bytes;  
> 
> This is per queue stats, 'stats->q_opackets[i]', in next iteration of 
> the loop, 'i' will be increased and 'txq' will be updated, so as far as 
> I can see the above change has no affect.

Agree, that is why it was just assignment originally.


More information about the stable mailing list