summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-06-22 05:01:35 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-08-26 23:50:09 -0700
commit4197aa7bb81877ebb06e4f2cc1b5fea2da23a7bd (patch)
tree90e69cb83d51aae53fb0293ae888ec7c4ef5b31a /drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
parent98b9e48fca11c8aa54b25c02d3329392b52db8ab (diff)
downloadop-kernel-dev-4197aa7bb81877ebb06e4f2cc1b5fea2da23a7bd.zip
op-kernel-dev-4197aa7bb81877ebb06e4f2cc1b5fea2da23a7bd.tar.gz
ixgbevf: provide 64 bit statistics
Compute statistics per ring using 64 bits, and provide network device stats in 64 bits. It should make this driver multiqueue operations faster (no more cache line ping pongs on netdev->stats structure) Use u64_stats_sync infrastructure so that its safe on 32bit arches as well. Based on a prior patch from Stephen Hemminger Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf/ixgbevf.h')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
index 8857df4..e6c9d1a 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
@@ -34,6 +34,7 @@
#include <linux/io.h>
#include <linux/netdevice.h>
#include <linux/if_vlan.h>
+#include <linux/u64_stats_sync.h>
#include "vf.h"
@@ -71,12 +72,13 @@ struct ixgbevf_ring {
struct ixgbevf_rx_buffer *rx_buffer_info;
};
+ u64 total_bytes;
+ u64 total_packets;
+ struct u64_stats_sync syncp;
+
u16 head;
u16 tail;
- unsigned int total_bytes;
- unsigned int total_packets;
-
u16 reg_idx; /* holds the special value that gets the hardware register
* offset associated with this ring, which is different
* for DCB and RSS modes */
OpenPOWER on IntegriCloud