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.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 5b5cd3189c98..ec89301ada41 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -338,17 +338,18 @@ enum {
338 338
339 SKB_GSO_GRE = 1 << 6, 339 SKB_GSO_GRE = 1 << 6,
340 340
341 SKB_GSO_IPIP = 1 << 7, 341 SKB_GSO_GRE_CSUM = 1 << 7,
342 342
343 SKB_GSO_SIT = 1 << 8, 343 SKB_GSO_IPIP = 1 << 8,
344 344
345 SKB_GSO_UDP_TUNNEL = 1 << 9, 345 SKB_GSO_SIT = 1 << 9,
346 346
347 SKB_GSO_MPLS = 1 << 10, 347 SKB_GSO_UDP_TUNNEL = 1 << 10,
348 348
349 SKB_GSO_UDP_TUNNEL_CSUM = 1 << 11, 349 SKB_GSO_UDP_TUNNEL_CSUM = 1 << 11,
350 350
351 SKB_GSO_GRE_CSUM = 1 << 12, 351 SKB_GSO_MPLS = 1 << 12,
352
352}; 353};
353 354
354#if BITS_PER_LONG > 32 355#if BITS_PER_LONG > 32
@@ -1853,6 +1854,18 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
1853 return pskb_may_pull(skb, skb_network_offset(skb) + len); 1854 return pskb_may_pull(skb, skb_network_offset(skb) + len);
1854} 1855}
1855 1856
1857static inline void skb_pop_rcv_encapsulation(struct sk_buff *skb)
1858{
1859 /* Only continue with checksum unnecessary if device indicated
1860 * it is valid across encapsulation (skb->encapsulation was set).
1861 */
1862 if (skb->ip_summed == CHECKSUM_UNNECESSARY && !skb->encapsulation)
1863 skb->ip_summed = CHECKSUM_NONE;
1864
1865 skb->encapsulation = 0;
1866 skb->csum_valid = 0;
1867}
1868
1856/* 1869/*
1857 * CPUs often take a performance hit when accessing unaligned memory 1870 * CPUs often take a performance hit when accessing unaligned memory
1858 * locations. The actual performance hit varies, it can be small if the 1871 * locations. The actual performance hit varies, it can be small if the