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] RX_COPY_THRESHOLD in netfront

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RX_COPY_THRESHOLD in netfront
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 11 Aug 2006 17:23:20 +0100
Cc: Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 11 Aug 2006 09:24:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060804144409.GA13529@xxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aca9YnVbtB/XIClVEdu4bwAKle7CWA==
Thread-topic: RX_COPY_THRESHOLD in netfront
User-agent: Microsoft-Entourage/11.2.5.060620
Herbert,

Does the RX_COPY_THRESHOLD you added to netfront need to be as large as 256?
It seems rather large: for example, the copy length in netback for packets
being transmitted is just 64.

Also, your patch to netfront allocates a full page for each receive slot.
The skbuff 'header' area is really not much used, except for the first
RX_COPY_THRESHOLD bytes of each packet. Rather than allocating lots of
skbuffs up front and then freeing most of them when you receive jumbo
packets, why not just allocate the skbuff part in netif_poll, for each
complete packet that you detect you have received, rather than doing it in
network_alloc_rx_buffers?

Alternatively we could go back to the old method of rx buffer allocation
which allocates page-sized skbuff header areas, then unmaps the page
containing skb->head. This would avoid the need for RX_COPY_THRESHOLD, but
would constrain the location of the first packet fragment (since the skb
header area needs 16 bytes headroom and tailroom for skb_shared_info) or
we'd need a slow path to relocate the header fragment. What do you think?

 Thanks,
 Keir



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