Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: davem@davemloft.net, Stephen Hemminger <shemminger@vyatta.com>,
	netdev@vger.kernel.org, gospo@redhat.com
Subject: Re: [net-next 04/17] ixgbevf: provide 64 bit statistics
Date: Mon, 20 Jun 2011 06:59:52 +0200	[thread overview]
Message-ID: <1308545992.3539.114.camel@edumazet-laptop> (raw)
In-Reply-To: <1308531518-17298-5-git-send-email-jeffrey.t.kirsher@intel.com>

Le dimanche 19 juin 2011 à 17:58 -0700, Jeff Kirsher a écrit :
> From: Stephen Hemminger <shemminger@vyatta.com>
> 
> Compute statistics per ring using 64 bits, and provide
> network device stats in 64 bits.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> Acked-by: Greg Rose <Gregory.v.rose@intel.com>
> Tested-by: Evan Swanson <evan.swanson@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---

>  
> +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 ?

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.



  reply	other threads:[~2011-06-20  5:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20  0:58 [net-next 00/17][pull request] Intel Wired LAN Driver Update Jeff Kirsher
2011-06-20  0:58 ` [net-next 01/17] e1000: convert to ndo_fix_features Jeff Kirsher
2011-06-20  0:58 ` [net-next 02/17] igb: " Jeff Kirsher
2011-06-20  0:58 ` [net-next 03/17] ixgbevf: Fix bungled declaration of ixgbevf_mbx_ops Jeff Kirsher
2011-06-20  0:58 ` [net-next 04/17] ixgbevf: provide 64 bit statistics Jeff Kirsher
2011-06-20  4:59   ` Eric Dumazet [this message]
2011-06-20 12:29     ` Jeff Kirsher
2011-06-20 15:46       ` Eric Dumazet
2011-06-21 20:50         ` Jeff Kirsher
2011-06-20  0:58 ` [net-next 05/17] ixgbevf: remove unnecessary ampersands Jeff Kirsher
2011-06-20  0:58 ` [net-next 06/17] ixgbe: dcbnl reduce duplicated code and indentation Jeff Kirsher
2011-06-20  0:58 ` [net-next 07/17] ixgbe: consolidate packet buffer allocation Jeff Kirsher
2011-06-20  0:58 ` [net-next 08/17] ixgbe: consolidate MRQC and MTQC handling Jeff Kirsher
2011-06-20  0:58 ` [net-next 09/17] ixgbe: configure minimal packet buffers to support TC Jeff Kirsher
2011-06-20  0:58 ` [net-next 10/17] ixgbe: DCB use existing TX and RX queues Jeff Kirsher
2011-06-20  0:58 ` [net-next 11/17] ixgbe: DCB 82598 devices, tx_idx and rx_idx swapped Jeff Kirsher
2011-06-20  0:58 ` [net-next 12/17] ixgbe: setup redirection table for multiple packet buffers Jeff Kirsher
2011-06-20  0:58 ` [net-next 13/17] ixgbe: fix bit mask for DCB version Jeff Kirsher
2011-06-20  0:58 ` [net-next 14/17] ixgbe: DCB and perfect filters can coexist Jeff Kirsher
2011-06-20  0:58 ` [net-next 15/17] ixgbe: DCB, remove unneeded ixgbe_dcb_txq_to_tc() routine Jeff Kirsher
2011-06-20  0:58 ` [net-next 16/17] ixgbe: add support for Dell CEM Jeff Kirsher
2011-06-20  0:58 ` [net-next 17/17] ixgbe: setup per CPU PCI pool for FCoE DDP Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1308545992.3539.114.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox