xen-devel
[Xen-devel] Re: [patch 37/44] xen: add virtual network device driver
To: |
Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx> |
Subject: |
[Xen-devel] Re: [patch 37/44] xen: add virtual network device driver |
From: |
Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx> |
Date: |
Tue, 17 Jul 2007 09:45:11 +0100 |
Cc: |
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Christian, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Jeff Garzik <jeff@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxxxxxx, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Keir, Limpach <Christian.Limpach@xxxxxxxxxxxx> |
Delivery-date: |
Tue, 17 Jul 2007 05:13:58 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxx |
In-reply-to: |
<20070716232916.472694000@xxxxxxxxxxxxx> |
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> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
> +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.
> +
> + 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?
> + unsigned int evtchn;
> +
> + /* Receive-ring batched refills. */
> +#define RX_MIN_TARGET 8
> +#define RX_DFL_MIN_TARGET 64
> +#define RX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
> + unsigned rx_min_target, rx_max_target, rx_target;
> + struct sk_buff_head rx_batch;
> +
> + struct timer_list rx_refill_timer;
> +
> + /*
> + * {tx,rx}_skbs store outstanding skbuffs. Free tx_skb entries
> + * are linked from tx_skb_freelist through skb_entry.link.
> + *
> + * NB. Freelist index entries are always going to be less than
> + * PAGE_OFFSET, whereas pointers to skbs will always be equal or
> + * greater than PAGE_OFFSET: we use this property to distinguish
> + * them.
> + */
> + union skb_entry {
> + struct sk_buff *skb;
> + unsigned link;
> + } tx_skbs[NET_TX_RING_SIZE];
> + grant_ref_t gref_tx_head;
> + grant_ref_t grant_tx_ref[NET_TX_RING_SIZE];
> + unsigned tx_skb_freelist;
> +
> + struct sk_buff *rx_skbs[NET_RX_RING_SIZE];
> + grant_ref_t gref_rx_head;
> + grant_ref_t grant_rx_ref[NET_RX_RING_SIZE];
> +
> + struct xenbus_device *xbdev;
> + int tx_ring_ref;
> + int rx_ring_ref;
> +
> + unsigned long rx_pfn_array[NET_RX_RING_SIZE];
> + struct multicall_entry rx_mcl[NET_RX_RING_SIZE+1];
> + struct mmu_update rx_mmu[NET_RX_RING_SIZE];
> +};
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|