net: dsa: User per-cpu 64-bit statistics

During testing with a background iperf pushing 1Gbit/sec worth of
traffic and having both ifconfig and ethtool collect statistics, we
could see quite frequent deadlocks. Convert the often accessed DSA slave
network devices statistics to per-cpu 64-bit statistics to remove these
deadlocks and provide fast efficient statistics updates.

Fixes: f613ed665b ("net: dsa: Add support for 64-bit statistics")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Florian Fainelli
2017-08-03 21:33:27 -07:00
committed by David S. Miller
parent eaf6dc0338
commit 5f6b4e14ca
3 changed files with 58 additions and 24 deletions

View File

@@ -77,7 +77,7 @@ struct dsa_slave_priv {
struct sk_buff * (*xmit)(struct sk_buff *skb,
struct net_device *dev);
struct pcpu_sw_netstats stats64;
struct pcpu_sw_netstats *stats64;
/* DSA port data, such as switch, port index, etc. */
struct dsa_port *dp;