[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141218231130.74dcad81@urahara>
Date: Thu, 18 Dec 2014 23:11:30 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Raghu Vatsavayi <rvatsavayi@...iumnetworks.com>
Cc: <davem@...emloft.net>, <netdev@...r.kernel.org>,
Derek Chickles <derek.chickles@...iumnetworks.com>,
Satanand Burla <satananda.burla@...iumnetworks.com>,
Felix Manlunas <felix.manlunas@...iumnetworks.com>,
Raghu Vatsavayi <raghu.vatsavayi@...iumnetworks.com>
Subject: Re: [PATCH net-next v3] Add support of Cavium Liquidio ethernet
adapters
On Thu, 18 Dec 2014 19:25:19 -0800
Raghu Vatsavayi <rvatsavayi@...iumnetworks.com> wrote:
> + if (packet_was_received) {
> + lio->stats.rx_bytes += len;
> + atomic64_inc((atomic64_t *)&lio->stats.rx_packets);
> + netdev->last_rx = jiffies;
> + } else {
> + atomic64_inc((atomic64_t *)&lio->stats.rx_dropped);
> + lio_info(lio, rx_err,
> + "netif_rxXX error rx_dropped:%ld\n",
> + lio->stats.rx_dropped);
> + }
What is point of keeping own statistics in atomic (which are slower)?
Just use dev->stats directly.
--
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