ia64/xen-unstable

changeset 10411:4f0bc5744557

[LINUX] Network buffers do not need to be multi-page contiguous
for unprivileged domains (in any case, can fall back to swiotlb).
On non-privileged domain of Xen/IA64, this caused some trouble.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 15 13:19:04 2006 +0100 (2006-06-15)
parents 7fba181c8531
children a1c0c1e797a6
files linux-2.6-xen-sparse/drivers/xen/core/skbuff.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/skbuff.c	Thu Jun 15 13:11:31 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/skbuff.c	Thu Jun 15 13:19:04 2006 +0100
     1.3 @@ -121,8 +121,15 @@ static int __init skbuff_init(void)
     1.4  	for (order = 0; order <= MAX_SKBUFF_ORDER; order++) {
     1.5  		size = PAGE_SIZE << order;
     1.6  		sprintf(name[order], "xen-skb-%lu", size);
     1.7 -		skbuff_order_cachep[order] = kmem_cache_create(
     1.8 -			name[order], size, size, 0, skbuff_ctor, skbuff_dtor);
     1.9 +		if (is_running_on_xen() &&
    1.10 +		    (xen_start_info->flags & SIF_PRIVILEGED))
    1.11 +			skbuff_order_cachep[order] = kmem_cache_create(
    1.12 +				name[order], size, size, 0,
    1.13 +				skbuff_ctor, skbuff_dtor);
    1.14 +		else
    1.15 +			skbuff_order_cachep[order] = kmem_cache_create(
    1.16 +				name[order], size, size, 0, NULL, NULL);
    1.17 +			
    1.18  	}
    1.19  
    1.20  	skbuff_cachep = skbuff_order_cachep[0];