veth: Fix veth_get_stats()
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 18 Nov 2009 07:09:39 +0000 (07:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Nov 2009 21:16:22 +0000 (13:16 -0800)
veth_get_stats() can be called in parallel on several cpus.

It's better to not reset dev->stats as it could give wrong result on
one cpu. Use temporary variables, then store the final results.

Also, we should loop on every possible cpus, not only online cpus,
or cpu hotplug can suddenly give wrong veth stats.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found