direct-io.hg

changeset 2505:27a319ede628

bitkeeper revision 1.1159.79.8 (414ff88ctzr9PXDn3DxSGatY15KN7Q)

Align size of xen skbuffs.
author kaf24@freefall.cl.cam.ac.uk
date Tue Sep 21 09:46:52 2004 +0000 (2004-09-21)
parents 94600c6f4011
children 37953cf6f0dd
files linux-2.6.8.1-xen-sparse/arch/xen/kernel/skbuff.c
line diff
     1.1 --- a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/skbuff.c	Tue Sep 21 09:19:17 2004 +0000
     1.2 +++ b/linux-2.6.8.1-xen-sparse/arch/xen/kernel/skbuff.c	Tue Sep 21 09:46:52 2004 +0000
     1.3 @@ -20,6 +20,10 @@ EXPORT_SYMBOL(__dev_alloc_skb);
     1.4  /* Referenced in netback.c. */
     1.5  /*static*/ kmem_cache_t *skbuff_cachep;
     1.6  
     1.7 +/* Size must be cacheline-aligned (alloc_skb uses SKB_DATA_ALIGN). */
     1.8 +#define XEN_SKB_SIZE \
     1.9 +    ((PAGE_SIZE - sizeof(struct skb_shared_info)) & ~(SMP_CACHE_BYTES - 1))
    1.10 +
    1.11  struct sk_buff *__dev_alloc_skb(unsigned int length, int gfp_mask)
    1.12  {
    1.13      struct sk_buff *skb;
    1.14 @@ -41,8 +45,7 @@ struct sk_buff *__dev_alloc_skb(unsigned
    1.15          return NULL;
    1.16      }
    1.17  
    1.18 -    new_shinfo = 
    1.19 -        new_data + PAGE_SIZE - sizeof(struct skb_shared_info);
    1.20 +    new_shinfo = new_data + XEN_SKB_SIZE;
    1.21      memcpy(new_shinfo, skb_shinfo(skb), sizeof(struct skb_shared_info));
    1.22  
    1.23      kfree(skb->head);