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

RE: [Xen-devel] [PATCH 2/2] netfront skb padding

To: "Jon Mason" <jdmason@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 2/2] netfront skb padding
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 9 Feb 2005 17:26:53 -0000
Cc: <ian.pratt@xxxxxxxxxxxx>, <ian.pratt@xxxxxxxxxxxx>
Delivery-date: Wed, 09 Feb 2005 17:29:05 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Thread-index: AcUOy/nnJ3+HbvUdQC2QC7uqK2jvewAADqRQ
Thread-topic: [Xen-devel] [PATCH 2/2] netfront skb padding
 
> > > It appears that when alloc'ing a skb, it is bring padded by 
> > > an arbitrarily 
> > > (and excessive) long value.  The value for this padding 
> > > really only needs to 
> > > be 24.  24 = 14 for the ethernet header + 2 for the cache 
> > > alignment + 4 for 
> > > the CRC + 4 for the VLAN flags.
> > 
> > Given that we're allocating page sized buffers the current situation
> > doesn't cost us anything.
> 
> Unless it starts using larger packets, e.g. Jumbo Frames 
> (hint hint).  Then
> the unnecessary room can be a problem, as the unnecessary pad 
> could cause the
> unnecessary allocation of an extra page.

How? Ethernet packets are circa 1500 bytes, and we allocate a 4K page
for each so that we can page flip them.

> > Infact, what happens if the packet gets encapsulated e.g. by etherip
> > etc? Is Linux smart enough to be able to put the extra headers on
> > in-place if there is enough head room?
> 
> I would assume that they would have to be there.

They wouldn't have to be, because Linux could just copy the packet, into
a new skb, but I believe it could use skb pull etc to see if it could
allocate space for headers on the front of the packet. In which case,
having more headroom would be a good thing.

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel