From 4197aa7bb81877ebb06e4f2cc1b5fea2da23a7bd Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Wed, 22 Jun 2011 05:01:35 +0000 Subject: 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 CC: Stephen Hemminger Acked-by: Greg Rose Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/net/ethernet/intel/ixgbevf/ixgbevf.h') diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h index 8857df4dd3b9..e6c9d1a927a9 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h @@ -34,6 +34,7 @@ #include #include #include +#include #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 */ -- cgit v1.2.3