Re: [PATCH net-next-2.6 1/3] be2net: fix netdev_stats_update
From: Stephen Hemminger <hidden>
Date: 2011-06-27 16:43:40
From: Stephen Hemminger <hidden>
Date: 2011-06-27 16:43:40
On Mon, 27 Jun 2011 12:10:48 +0530 Sathya Perla [off-list ref] wrote:
Problem initially reproted and fixed by Eric Dumazet [off-list ref] netdev_stats_update() resets netdev->stats and then accumulates stats from various rings. This is wrong as stats readers can sometimes catch zero values. Use temporary variables instead for accumulating per-ring values. Signed-off-by: Sathya Perla <redacted>
Should also use u64_stats_sync to ensure correct rollover or 32 bit SMP platform.