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] [day] [month] [year] [list]
Date:	Wed, 29 Dec 2010 21:42:37 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Stephen Hemminger <shemminger@...tta.com>,
	Hans Ulli Kroll <ulli.kroll@...glemail.com>,
	Stephen Hemminger <stephen.hemminger@...tta.com>,
	Michał Mirosław <mirq-linux@...e.qmqm.pl>,
	gemini-board-dev@...ts.berlios.de, netdev@...r.kernel.org,
	Christoph Biedl <linux-kernel.bfrz@...chmal.in-ulm.de>
Subject: Re: [RFC PATCH v2] Gemini: Gigabit ethernet driver

On Wed, 2010-12-29 at 20:52 +0100, Eric Dumazet wrote:
> Le mercredi 29 décembre 2010 à 11:28 -0800, Stephen Hemminger a écrit :
> 
> > It looks like the comment/documentation in netdevice.h is incorrect.
> > 
> >  * struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
> >  *	Called when a user wants to get the network device usage
> >  *	statistics. Drivers must do one of the following:
> >  *	1. Define @ndo_get_stats64 to fill in a zero-initialised
> >  *	   rtnl_link_stats64 structure passed by the caller.
> >  *	2. Define @ndo_get_stats to update a net_device_stats structure
> >  *	   (which should normally be dev->stats) and return a pointer to
> >  *	   it. The structure may be changed asynchronously only if each
> >  *	   field is written atomically.
> >  *	3. Update dev->stats asynchronously and atomically, and define
> >  *	   neither operation.
> > 
> 
> You mean we should insert a new line ?
> I believe this documentation is up to date.
[...]

It would also be worth explicitly stating that there is no serialisation
of calls to these operations, so drivers may need to use a spinlock in
their implementation.  I wrote this description under the mistaken
belief that there was some serialisation, and point 2 reflects that.

Ben.

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