diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/skbuff.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e13ed90be7c2..ec89301ada41 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -1854,6 +1854,18 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) | |||
| 1854 | return pskb_may_pull(skb, skb_network_offset(skb) + len); | 1854 | return pskb_may_pull(skb, skb_network_offset(skb) + len); |
| 1855 | } | 1855 | } |
| 1856 | 1856 | ||
| 1857 | static 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 | |||
| 1857 | /* | 1869 | /* |
| 1858 | * CPUs often take a performance hit when accessing unaligned memory | 1870 | * CPUs often take a performance hit when accessing unaligned memory |
| 1859 | * 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 |
