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:	Thu, 10 Mar 2011 17:30:13 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	Ian Campbell <Ian.Campbell@...rix.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	xen-devel <xen-devel@...ts.xensource.com>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Francois Romieu <romieu@...zoreil.com>
Subject: Re: [GIT/PATCH v4] xen network backend driver

On Thu, 2011-03-10 at 09:15 -0800, Stephen Hemminger wrote:
> On Thu, 10 Mar 2011 17:02:33 +0000
> Ian Campbell <Ian.Campbell@...rix.com> wrote:
> > +struct xenvif {
> > +	/* Unique identifier for this interface. */
> ...
> > +	struct net_device_stats stats;
> > +
> 
> There is already a stats struct in net_device in current kernel
> versions, unless there is a compelling reason otherwise
> please use that.
> 
> Also, you probably want to implement per-cpu and 64 bit
> stats.

The driver is using a single queue, so I don't see what benefit it would
get from per-cpu stats.  At some point it should become multiqueue and
then it should store per-queue stats.

64-bit stats are definitely preferable, but since they're being
maintained on the data path this may require some significant work.
(Ian: see <linux/u64_stats_sync.h> for the canonical way to do this.)
Given that only a relatively few existing drivers do this (I count 13),
I'm not sure we can reasonably demand that a new driver does - yet.

Ben.

-- 
Ben Hutchings, Senior Software 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