summaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa_priv.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-08-01 15:00:36 -0700
committerDavid S. Miller <davem@davemloft.net>2017-08-02 16:49:09 -0700
commitf613ed665bb3ec49edc4907bd8799e3a2de47df5 (patch)
treee73ee81053bc0ffcb2880ff901d1bf38febca9e1 /net/dsa/dsa_priv.h
parentb2f9d432deebab5096aad5942c2f2b1ec2865f5a (diff)
downloadlinux-f613ed665bb3ec49edc4907bd8799e3a2de47df5.tar.gz
linux-f613ed665bb3ec49edc4907bd8799e3a2de47df5.tar.bz2
linux-f613ed665bb3ec49edc4907bd8799e3a2de47df5.zip
net: dsa: Add support for 64-bit statistics
DSA slave network devices maintain a pair of bytes and packets counters for each directions, but these are not 64-bit capable. Re-use pcpu_sw_netstats which contains exactly what we need for that purpose and update the code path to report 64-bit capable statistics. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa_priv.h')
-rw-r--r--net/dsa/dsa_priv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 55982cc39b24..7aa0656296c2 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -77,6 +77,8 @@ struct dsa_slave_priv {
struct sk_buff * (*xmit)(struct sk_buff *skb,
struct net_device *dev);
+ struct pcpu_sw_netstats stats64;
+
/* DSA port data, such as switch, port index, etc. */
struct dsa_port *dp;