|
@@ -2870,6 +2870,25 @@ static inline void skb_postpush_rcsum(struct sk_buff *skb,
|
|
|
skb->csum = csum_partial(start, len, skb->csum);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * skb_push_rcsum - push skb and update receive checksum
|
|
|
+ * @skb: buffer to update
|
|
|
+ * @len: length of data pulled
|
|
|
+ *
|
|
|
+ * This function performs an skb_push on the packet and updates
|
|
|
+ * the CHECKSUM_COMPLETE checksum. It should be used on
|
|
|
+ * receive path processing instead of skb_push unless you know
|
|
|
+ * that the checksum difference is zero (e.g., a valid IP header)
|
|
|
+ * or you are setting ip_summed to CHECKSUM_NONE.
|
|
|
+ */
|
|
|
+static inline unsigned char *skb_push_rcsum(struct sk_buff *skb,
|
|
|
+ unsigned int len)
|
|
|
+{
|
|
|
+ skb_push(skb, len);
|
|
|
+ skb_postpush_rcsum(skb, skb->data, len);
|
|
|
+ return skb->data;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* pskb_trim_rcsum - trim received skb and update checksum
|
|
|
* @skb: buffer to trim
|