aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 638b0e004310..6f0b3e0adc73 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1079,6 +1079,7 @@ __skb_set_sw_hash(struct sk_buff *skb, __u32 hash, bool is_l4)
1079} 1079}
1080 1080
1081void __skb_get_hash(struct sk_buff *skb); 1081void __skb_get_hash(struct sk_buff *skb);
1082u32 __skb_get_hash_symmetric(struct sk_buff *skb);
1082u32 skb_get_poff(const struct sk_buff *skb); 1083u32 skb_get_poff(const struct sk_buff *skb);
1083u32 __skb_get_poff(const struct sk_buff *skb, void *data, 1084u32 __skb_get_poff(const struct sk_buff *skb, void *data,
1084 const struct flow_keys *keys, int hlen); 1085 const struct flow_keys *keys, int hlen);
@@ -2887,6 +2888,25 @@ static inline void skb_postpush_rcsum(struct sk_buff *skb,
2887} 2888}
2888 2889
2889/** 2890/**
2891 * skb_push_rcsum - push skb and update receive checksum
2892 * @skb: buffer to update
2893 * @len: length of data pulled
2894 *
2895 * This function performs an skb_push on the packet and updates
2896 * the CHECKSUM_COMPLETE checksum. It should be used on
2897 * receive path processing instead of skb_push unless you know
2898 * that the checksum difference is zero (e.g., a valid IP header)
2899 * or you are setting ip_summed to CHECKSUM_NONE.
2900 */
2901static inline unsigned char *skb_push_rcsum(struct sk_buff *skb,
2902 unsigned int len)
2903{
2904 skb_push(skb, len);
2905 skb_postpush_rcsum(skb, skb->data, len);
2906 return skb->data;
2907}
2908
2909/**
2890 * pskb_trim_rcsum - trim received skb and update checksum 2910 * pskb_trim_rcsum - trim received skb and update checksum
2891 * @skb: buffer to trim 2911 * @skb: buffer to trim
2892 * @len: new length 2912 * @len: new length