On Mon, 2017-07-31 at 01:01 +0100, Jianming.qiao wrote: ... > + for (q = 0; q < dev->num_tx_queues; q++) { > + ring = &priv->tx_rings[q]; > + do { > + start = u64_stats_fetch_begin_irq(&stats64->syncp); > + tx_bytes += ring->bytes; > + tx_packets += ring->packets; > + } while (u64_stats_fetch_retry_irq(&stats64->syncp, start)); > + }
This is broken. If the retry loop is ever done, tx_bytes and tx_packets get wrong value.