ia64/xen-unstable

changeset 13886:273ec6b70b51

Move skb_pull_rcsum() to its usual place in skbuff.c
author Keir Fraser <keir@xensource.com>
date Thu Feb 08 17:19:49 2007 +0000 (2007-02-08)
parents 859d73ef932f
children 5a1abfefe892
files linux-2.6-xen-sparse/net/core/skbuff.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/net/core/skbuff.c	Thu Feb 08 17:15:38 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/net/core/skbuff.c	Thu Feb 08 17:19:49 2007 +0000
     1.3 @@ -1897,6 +1897,29 @@ int skb_append_datato_frags(struct sock 
     1.4  }
     1.5  
     1.6  /**
     1.7 + *	skb_pull_rcsum - pull skb and update receive checksum
     1.8 + *	@skb: buffer to update
     1.9 + *	@start: start of data before pull
    1.10 + *	@len: length of data pulled
    1.11 + *
    1.12 + *	This function performs an skb_pull on the packet and updates
    1.13 + *	update the CHECKSUM_HW checksum.  It should be used on receive
    1.14 + *	path processing instead of skb_pull unless you know that the
    1.15 + *	checksum difference is zero (e.g., a valid IP header) or you
    1.16 + *	are setting ip_summed to CHECKSUM_NONE.
    1.17 + */
    1.18 +unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len)
    1.19 +{
    1.20 +	BUG_ON(len > skb->len);
    1.21 +	skb->len -= len;
    1.22 +	BUG_ON(skb->len < skb->data_len);
    1.23 +	skb_postpull_rcsum(skb, skb->data, len);
    1.24 +	return skb->data += len;
    1.25 +}
    1.26 +
    1.27 +EXPORT_SYMBOL_GPL(skb_pull_rcsum);
    1.28 +
    1.29 +/**
    1.30   *	skb_segment - Perform protocol segmentation on skb.
    1.31   *	@skb: buffer to segment
    1.32   *	@features: features for the output path (see dev->features)
    1.33 @@ -2022,29 +2045,6 @@ err:
    1.34  
    1.35  EXPORT_SYMBOL_GPL(skb_segment);
    1.36  
    1.37 -/**
    1.38 - *	skb_pull_rcsum - pull skb and update receive checksum
    1.39 - *	@skb: buffer to update
    1.40 - *	@start: start of data before pull
    1.41 - *	@len: length of data pulled
    1.42 - *
    1.43 - *	This function performs an skb_pull on the packet and updates
    1.44 - *	update the CHECKSUM_HW checksum.  It should be used on receive
    1.45 - *	path processing instead of skb_pull unless you know that the
    1.46 - *	checksum difference is zero (e.g., a valid IP header) or you
    1.47 - *	are setting ip_summed to CHECKSUM_NONE.
    1.48 - */
    1.49 -unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len)
    1.50 -{
    1.51 -	BUG_ON(len > skb->len);
    1.52 -	skb->len -= len;
    1.53 -	BUG_ON(skb->len < skb->data_len);
    1.54 -	skb_postpull_rcsum(skb, skb->data, len);
    1.55 -	return skb->data += len;
    1.56 -}
    1.57 -
    1.58 -EXPORT_SYMBOL_GPL(skb_pull_rcsum);
    1.59 -
    1.60  void __init skb_init(void)
    1.61  {
    1.62  	skbuff_head_cache = kmem_cache_create("skbuff_head_cache",