Commit 26e9ff17 authored by Arthur Kepner's avatar Arthur Kepner Committed by David S. Miller

[NET]: In loopback, make get_stats() get correct per-cpu stats.

Signed-off-by: default avatarArthur Kepner <akepner@sgi.com>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 61266d5f
......@@ -173,12 +173,11 @@ static struct net_device_stats *get_stats(struct net_device *dev)
if (!cpu_possible(i))
continue;
lb_stats = &per_cpu(loopback_stats, get_cpu());
lb_stats = &per_cpu(loopback_stats, i);
stats->rx_bytes += lb_stats->rx_bytes;
stats->tx_bytes += lb_stats->tx_bytes;
stats->rx_packets += lb_stats->rx_packets;
stats->tx_packets += lb_stats->tx_packets;
put_cpu();
}
return stats;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment