ia64/xen-unstable

changeset 11088:41399e5fdc9e

[NET] front: Restore 16 bytes of reservation

By replacing dev_alloc_skb with alloc_skb we need to do the 16-byte
reservation ourselves. Also, it's unnecessary to align the size
when calling alloc_skb since the alignment is an implementation
detail of alloc_skb and it already takes care of it for us.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
author kaf24@localhost.localdomain
date Sat Aug 12 15:56:00 2006 +0100 (2006-08-12)
parents 857854460d36
children 9900884577de
files linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Sat Aug 12 15:50:25 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Sat Aug 12 15:56:00 2006 +0100
     1.3 @@ -615,7 +615,7 @@ static void network_alloc_rx_buffers(str
     1.4  		 * necessary here.
     1.5  		 * 16 bytes added as necessary headroom for netif_receive_skb.
     1.6  		 */
     1.7 -		skb = alloc_skb(SKB_DATA_ALIGN(RX_COPY_THRESHOLD + 16),
     1.8 +		skb = alloc_skb(RX_COPY_THRESHOLD + 16,
     1.9  				GFP_ATOMIC | __GFP_NOWARN);
    1.10  		if (unlikely(!skb))
    1.11  			goto no_skb;
    1.12 @@ -633,6 +633,7 @@ no_skb:
    1.13  			break;
    1.14  		}
    1.15  
    1.16 +		skb_reserve(skb, 16); /* mimic dev_alloc_skb() */
    1.17  		skb_shinfo(skb)->frags[0].page = page;
    1.18  		skb_shinfo(skb)->nr_frags = 1;
    1.19  		__skb_queue_tail(&np->rx_batch, skb);