diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-08-01 15:00:36 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-02 16:49:09 -0700 |
commit | f613ed665bb3ec49edc4907bd8799e3a2de47df5 (patch) | |
tree | e73ee81053bc0ffcb2880ff901d1bf38febca9e1 /net/dsa/dsa_priv.h | |
parent | b2f9d432deebab5096aad5942c2f2b1ec2865f5a (diff) | |
download | op-kernel-dev-f613ed665bb3ec49edc4907bd8799e3a2de47df5.zip op-kernel-dev-f613ed665bb3ec49edc4907bd8799e3a2de47df5.tar.gz |
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index 55982cc..7aa0656 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; |