diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f900ffcd847e..9e8085a89589 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -2206,6 +2206,21 @@ static inline void skb_forward_csum(struct sk_buff *skb) | |||
2206 | skb->ip_summed = CHECKSUM_NONE; | 2206 | skb->ip_summed = CHECKSUM_NONE; |
2207 | } | 2207 | } |
2208 | 2208 | ||
2209 | /** | ||
2210 | * skb_checksum_none_assert - make sure skb ip_summed is CHECKSUM_NONE | ||
2211 | * @skb: skb to check | ||
2212 | * | ||
2213 | * fresh skbs have their ip_summed set to CHECKSUM_NONE. | ||
2214 | * Instead of forcing ip_summed to CHECKSUM_NONE, we can | ||
2215 | * use this helper, to document places where we make this assertion. | ||
2216 | */ | ||
2217 | static inline void skb_checksum_none_assert(struct sk_buff *skb) | ||
2218 | { | ||
2219 | #ifdef DEBUG | ||
2220 | BUG_ON(skb->ip_summed != CHECKSUM_NONE); | ||
2221 | #endif | ||
2222 | } | ||
2223 | |||
2209 | bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off); | 2224 | bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off); |
2210 | #endif /* __KERNEL__ */ | 2225 | #endif /* __KERNEL__ */ |
2211 | #endif /* _LINUX_SKBUFF_H */ | 2226 | #endif /* _LINUX_SKBUFF_H */ |