ia64/linux-2.6.18-xen.hg

changeset 11:e1c18245a2f5

Imported patch net-gso-6-linear-segmentation.patch from xen-unstable.hg 15200:bd3d6b4c52ec
author Ian Campbell <ian.campbell@xensource.com>
date Mon Jun 04 10:05:24 2007 +0100 (2007-06-04)
parents 69a9c3af24fc
children 5ce6cd5ee596
files net/core/skbuff.c
line diff
     1.1 --- a/net/core/skbuff.c	Mon Jun 04 10:05:23 2007 +0100
     1.2 +++ b/net/core/skbuff.c	Mon Jun 04 10:05:24 2007 +0100
     1.3 @@ -1945,7 +1945,7 @@ struct sk_buff *skb_segment(struct sk_bu
     1.4  	do {
     1.5  		struct sk_buff *nskb;
     1.6  		skb_frag_t *frag;
     1.7 -		int hsize, nsize;
     1.8 +		int hsize;
     1.9  		int k;
    1.10  		int size;
    1.11  
    1.12 @@ -1956,11 +1956,10 @@ struct sk_buff *skb_segment(struct sk_bu
    1.13  		hsize = skb_headlen(skb) - offset;
    1.14  		if (hsize < 0)
    1.15  			hsize = 0;
    1.16 -		nsize = hsize + doffset;
    1.17 -		if (nsize > len + doffset || !sg)
    1.18 -			nsize = len + doffset;
    1.19 +		if (hsize > len || !sg)
    1.20 +			hsize = len;
    1.21  
    1.22 -		nskb = alloc_skb(nsize + headroom, GFP_ATOMIC);
    1.23 +		nskb = alloc_skb(hsize + doffset + headroom, GFP_ATOMIC);
    1.24  		if (unlikely(!nskb))
    1.25  			goto err;
    1.26