23 messages in com.xensource.lists.xen-devel[Xen-devel] Re: [7/11] [NET] back: Ad...
FromSent OnAttachments
Herbert Xu07 Jul 2006 07:16 
Herbert Xu07 Jul 2006 07:16 
Herbert Xu07 Jul 2006 07:17 
Herbert Xu07 Jul 2006 07:17 
Herbert Xu07 Jul 2006 07:18 
Herbert Xu07 Jul 2006 07:18 
Herbert Xu07 Jul 2006 07:19 
Herbert Xu07 Jul 2006 07:19 
Herbert Xu07 Jul 2006 07:20 
Herbert Xu07 Jul 2006 07:20 
Herbert Xu07 Jul 2006 07:21 
Herbert Xu07 Jul 2006 07:21 
Keir Fraser27 Jul 2006 05:49 
Keir Fraser27 Jul 2006 06:10 
Herbert Xu27 Jul 2006 06:12 
Keir Fraser27 Jul 2006 06:15 
Herbert Xu27 Jul 2006 06:23 
Keir Fraser27 Jul 2006 06:28 
Herbert Xu27 Jul 2006 06:30 
Keir Fraser27 Jul 2006 06:32 
Keir Fraser27 Jul 2006 06:34 
Herbert Xu28 Jul 2006 01:05 
Herbert Xu28 Jul 2006 01:06 
Subject:[Xen-devel] Re: [7/11] [NET] back: Added tx queue
From:Keir Fraser (Keir@cl.cam.ac.uk)
Date:07/27/2006 06:15:06 AM
List:com.xensource.lists.xen-devel

On 7 Jul 2006, at 15:19, Herbert Xu wrote:

ET] back: Added tx queue

This patch adds a tx queue to the backend if the frontend supports rx refill notification. A queue is needed because SG/TSO greatly reduces the number of packets that can be stored in the rx ring. Given an rx ring with 256 entries, a maximum TSO packet can occupy as many as 18 entries, meaning that the entire ring can only hold 14 packets. This is too small at high bandwidths with large TCP RX windows.

Having a tx queue does not present a new security risk as the queue is a fixed size buffer just like rx ring. So each guest can only hold a fixed amount of memory (proportional to the tx queue length) on the host.

Signed-off-by: Herbert Xu <herb@gondor.apana.org.au>

What's the default queue size? It shouldn't be too large if each packet can be 64kB!

Also, what does NETIF_F_LLTX have to do with whether we have a queue or not -- couldn't we set that all the time? And you set queue length to 1 in the other case -- what's wrong with zero? Seems a saner value when there is no queue: or do we need to commit to having *some* queue at register_netdevice() time, and there's no way to go back from that by the time we find out if netfront supports rx refill notifications (so at that point we cannot change queue len to zero)?

-- Keir