ia64/xen-unstable

changeset 8249:c976c1ff806a

Fix the request size for a full page-sized skbuff in netfront
driver (must allow 16 bytes for dev_alloc_skb headroom).

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Dec 06 15:52:15 2005 +0100 (2005-12-06)
parents 4e9c643968ff
children 002a8b5c98bb
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	Tue Dec 06 15:02:54 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Tue Dec 06 15:52:15 2005 +0100
     1.3 @@ -535,8 +535,12 @@ static void network_alloc_rx_buffers(str
     1.4  	 */
     1.5  	batch_target = np->rx_target - (req_prod - np->rx.rsp_cons);
     1.6  	for (i = skb_queue_len(&np->rx_batch); i < batch_target; i++) {
     1.7 +		/*
     1.8 +		 * Subtract dev_alloc_skb headroom (16 bytes) and shared info
     1.9 +		 * tailroom then round down to SKB_DATA_ALIGN boundary.
    1.10 +		 */
    1.11  		skb = alloc_xen_skb(
    1.12 -			(PAGE_SIZE - sizeof(struct skb_shared_info)) &
    1.13 +			(PAGE_SIZE - 16 - sizeof(struct skb_shared_info)) &
    1.14  			(-SKB_DATA_ALIGN(1)));
    1.15  		if (skb == NULL)
    1.16  			break;