ia64/xen-unstable
changeset 11083:1d817bfc5ed9
[NET] front: Do not allocate unnecessary page-sized main data area
for receive skbuffs. The bulk data is stored in fragments.
Signed-off-by: Keir Fraser <keir@xensource.com>
for receive skbuffs. The bulk data is stored in fragments.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Fri Aug 11 14:22:54 2006 +0100 (2006-08-11) |
parents | 80f364a5662f |
children | 9727328c008e |
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 Thu Aug 10 15:51:38 2006 +0100 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Fri Aug 11 14:22:54 2006 +0100 1.3 @@ -609,9 +609,14 @@ 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 - /* Allocate an skb and a page. */ 1.8 - skb = __dev_alloc_skb(RX_COPY_THRESHOLD, 1.9 - GFP_ATOMIC | __GFP_NOWARN); 1.10 + /* 1.11 + * Allocate an skb and a page. Do not use __dev_alloc_skb as 1.12 + * that will allocate page-sized buffers which is not 1.13 + * necessary here. 1.14 + * 16 bytes added as necessary headroom for netif_receive_skb. 1.15 + */ 1.16 + skb = alloc_skb(SKB_DATA_ALIGN(RX_COPY_THRESHOLD + 16), 1.17 + GFP_ATOMIC | __GFP_NOWARN); 1.18 if (unlikely(!skb)) 1.19 goto no_skb; 1.20