lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Nov 2011 17:14:54 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Stephen Hemminger <shemminger@...tta.com>
CC:	David Decotigny <david.decotigny@...gle.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Ian Campbell <ian.campbell@...rix.com>,
	Eric Dumazet <eric.dumazet@...il.com>,
	Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
	Jiri Pirko <jpirko@...hat.com>, Joe Perches <joe@...ches.com>,
	Szymon Janc <szymon@...c.net.pl>,
	Richard Jones <rick.jones2@...com>,
	Ayaz Abdulla <AAbdulla@...dia.com>
Subject: Re: [PATCH net-next v5 07/10] forcedeth: implement
 ndo_get_stats64() API

On Wed, 2011-11-16 at 08:55 -0800, Stephen Hemminger wrote:
> On Tue, 15 Nov 2011 21:15:55 -0800
> David Decotigny <david.decotigny@...gle.com> wrote:
> 
> > This commit implements the ndo_get_stats64() API for forcedeth. Since
> > these stats are being updated from different contexts (process and
> > timer), this commit adds protection (locking + atomic variables).
> > 
> > Tested:
> >   - 16-way SMP x86_64 ->
> >     RX bytes:7244556582 (7.2 GB)  TX bytes:181904254 (181.9 MB)
> >   - pktgen + loopback: identical rx_bytes/tx_bytes and rx_packets/tx_packets
> 
> Rather than adding additional locking why not use a percpu structure
> to hold statistics. See loopback, macvlan, veth, xen-netfront.

percpu is stupid for a single-queue driver.

> Or realize that the Tx side is single threaded by dev->xmit_lock already
> and the Rx side is single threaded by NAPI.

Right.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ