aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/interface.c
diff options
context:
space:
mode:
authorMart van Santen <mart@greenhost.nl>2017-02-10 07:02:18 -0500
committerDavid S. Miller <davem@davemloft.net>2017-02-13 21:49:53 -0500
commitebf692f85ff78092cd238166d8d7ec51419f9c02 (patch)
tree5126b0c1415b5657a44723900109f25a7b69eb72 /drivers/net/xen-netback/interface.c
parent0c59d28121b96d826c188280f367e754b5d83350 (diff)
xen-netback: vif counters from int/long to u64
This patch fixes an issue where the type of counters in the queue(s) and interface are not in sync (queue counters are int, interface counters are long), causing incorrect reporting of tx/rx values of the vif interface and unclear counter overflows. This patch sets both counters to the u64 type. Signed-off-by: Mart van Santen <mart@greenhost.nl> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
-rw-r--r--drivers/net/xen-netback/interface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 579521327b03..50fa1692d985 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -221,10 +221,10 @@ static struct net_device_stats *xenvif_get_stats(struct net_device *dev)
221{ 221{
222 struct xenvif *vif = netdev_priv(dev); 222 struct xenvif *vif = netdev_priv(dev);
223 struct xenvif_queue *queue = NULL; 223 struct xenvif_queue *queue = NULL;
224 unsigned long rx_bytes = 0; 224 u64 rx_bytes = 0;
225 unsigned long rx_packets = 0; 225 u64 rx_packets = 0;
226 unsigned long tx_bytes = 0; 226 u64 tx_bytes = 0;
227 unsigned long tx_packets = 0; 227 u64 tx_packets = 0;
228 unsigned int index; 228 unsigned int index;
229 229
230 spin_lock(&vif->lock); 230 spin_lock(&vif->lock);