Re: [net-next 04/17] ixgbevf: provide 64 bit statistics
From: Jeff Kirsher <hidden>
Date: 2011-06-20 12:29:52
On Sun, 2011-06-19 at 21:59 -0700, Eric Dumazet wrote:
Le dimanche 19 juin 2011 à 17:58 -0700, Jeff Kirsher a écrit :quoted
From: Stephen Hemminger <redacted> Compute statistics per ring using 64 bits, and provide network device stats in 64 bits. Signed-off-by: Stephen Hemminger <redacted> Acked-by: Greg Rose <redacted> Tested-by: Evan Swanson <redacted> Signed-off-by: Jeff Kirsher <redacted> ---quoted
+static struct rtnl_link_stats64 *ixgbevf_get_stats(struct net_device *netdev, + struct rtnl_link_stats64 *stats) +{ + struct ixgbevf_adapter *adapter = netdev_priv(netdev); + int i; + + ixgbevf_update_stats(adapter); + + stats->multicast = adapter->stats.vfmprc - adapter->stats.base_vfmprc; + + for (i = 0; i < adapter->num_rx_queues; i++) { + stats->rx_bytes += adapter->rx_ring[i].total_bytes; + stats->rx_packets += adapter->rx_ring[i].total_packets; + } + + for (i = 0; i < adapter->num_tx_queues; i++) { + stats->tx_bytes += adapter->tx_ring[i].total_bytes; + stats->tx_packets += adapter->tx_ring[i].total_packets; + } + + return stats; +} +Unfortunately this patch is racy on 32bit arches. Jeff, maybe you missed all the discussion we had lately on these conversions, needing appropriate synchronization ?
I apologize I did not see the discussion regarding Stephen's patches.
It seems a lot of bugs were added lately with Stephen patches, this is rather unfortunate... I guess I'll have to review them and send fixes.
I will drop Stephen's patch from this series and look forward to your fixes. Thanks Eric.
Attachments
- signature.asc [application/pgp-signature] 490 bytes