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: [patch 37/44] xen: add virtual network device driver

To: Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [patch 37/44] xen: add virtual network device driver
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 17 Jul 2007 07:28:50 -0700
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>, Jeff Garzik <jeff@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxxxxxx, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Delivery-date: Tue, 17 Jul 2007 07:27:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070717094511.795beb69@oldman>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070716231536.937393000@xxxxxxxxxxxxx> <20070716232916.472694000@xxxxxxxxxxxxx> <20070717094511.795beb69@oldman>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.4 (X11/20070615)
Stephen Hemminger wrote:
>> +struct netfront_info {
>> +    struct list_head list;
>> +    struct net_device *netdev;
>> +
>> +    struct net_device_stats stats;
>>     
>
> There is now a net_device_stats element inside net_device on
> 2.6.21 or later.
>   

Ah, OK.  Should I just do a s/stats/netdev->stats/?  Is there a generic
get_stats routine as well?

>> +
>> +    struct xen_netif_tx_front_ring tx;
>> +    struct xen_netif_rx_front_ring rx;
>> +
>> +    spinlock_t   tx_lock;
>> +    spinlock_t   rx_lock;
>>     
>
> It might be a performance advantage to reorder/align these
> structure elements to put transmit hot elements together, and
> put tx and rx on different cache lines?
>   

Oh, right.  I'd been meaning to look at that layout more closely.

Thanks,
    J

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

<Prev in Thread] Current Thread [Next in Thread>