[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140716.231900.1257974809394608735.davem@davemloft.net>
Date: Wed, 16 Jul 2014 23:19:00 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: sshah@...arflare.com
Cc: netdev@...r.kernel.org, linux-net-drivers@...arflare.com
Subject: Re: [PATCH net-next] sfc: Add per-queue statistics in ethtool
From: Shradha Shah <sshah@...arflare.com>
Date: Wed, 16 Jul 2014 09:16:18 +0100
> @@ -445,6 +480,25 @@ static void efx_ethtool_get_stats(struct net_device *net_dev,
>
> spin_unlock_bh(&efx->stats_lock);
>
> + efx_for_each_channel(channel, efx) {
> + if (efx_channel_has_tx_queues(channel)) {
> + *data = 0;
> + efx_for_each_channel_tx_queue(tx_queue, channel) {
> + data[0] += tx_queue->tx_packets;
> + }
> + data++;
> + }
> + }
> + efx_for_each_channel(channel, efx) {
> + if (efx_channel_has_rx_queue(channel)) {
> + data[0] = 0;
> + efx_for_each_channel_rx_queue(rx_queue, channel) {
> + data[0] += rx_queue->rx_packets;
> + }
> + data++;
> + }
> + }
Please consistently use either data[0] or *data, probably the latter is better.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists