[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1501493876.1876.6.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Mon, 31 Jul 2017 02:37:56 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: "Jianming.qiao" <jqiaoulk@...il.com>
Cc: f.fainelli@...il.com, davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH v5 net-next] net: systemport: Support 64bit statistics
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.
Powered by blists - more mailing lists