All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Stephen Hemminger" <shemminger@vyatta.com>,
	"Hans Ulli Kroll" <ulli.kroll@googlemail.com>,
	"Stephen Hemminger" <stephen.hemminger@vyatta.com>,
	"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
	gemini-board-dev@lists.berlios.de, netdev@vger.kernel.org,
	"Christoph Biedl" <linux-kernel.bfrz@manchmal.in-ulm.de>
Subject: Re: [RFC PATCH v2] Gemini: Gigabit ethernet driver
Date: Wed, 29 Dec 2010 21:42:37 +0000	[thread overview]
Message-ID: <1293658957.3028.14.camel@localhost> (raw)
In-Reply-To: <1293652346.7150.10.camel@edumazet-laptop>

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.


  parent reply	other threads:[~2010-12-29 21:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-27 10:32 [RFC PATCH v2] Gemini: Gigabit ethernet driver Michał Mirosław
2010-12-27 19:21 ` Hans Ulli Kroll
2010-12-28  4:37   ` Ben Hutchings
2010-12-28  5:12     ` Stephen Hemminger
2010-12-29 16:56       ` Hans Ulli Kroll
2010-12-29 18:30         ` Eric Dumazet
2010-12-29 19:28           ` Stephen Hemminger
2010-12-29 19:52             ` Eric Dumazet
2010-12-29 19:57               ` Stephen Hemminger
2010-12-29 21:42               ` Ben Hutchings [this message]
2010-12-28 11:45   ` Michał Mirosław

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1293658957.3028.14.camel@localhost \
    --to=bhutchings@solarflare.com \
    --cc=eric.dumazet@gmail.com \
    --cc=gemini-board-dev@lists.berlios.de \
    --cc=linux-kernel.bfrz@manchmal.in-ulm.de \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=stephen.hemminger@vyatta.com \
    --cc=ulli.kroll@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.