WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [GIT/PATCH v4] xen network backend driver

To: Stephen Hemminger <shemminger@xxxxxxxxxx>
Subject: [Xen-devel] Re: [GIT/PATCH v4] xen network backend driver
From: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>
Date: Thu, 10 Mar 2011 17:30:13 +0000
Cc: Fitzhardinge <jeremy@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy, Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, Francois Romieu <romieu@xxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 10 Mar 2011 09:30:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110310091555.0fa8764d@nehalam>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Solarflare Communications
References: <1299776554.17339.824.camel@xxxxxxxxxxxxxxxxxxxxxx> <20110310091555.0fa8764d@nehalam>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxx> 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.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel