aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 8b2256e880e0..0259b719bebf 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -307,6 +307,13 @@ enum {
307 SKB_GSO_TCPV6 = 1 << 4, 307 SKB_GSO_TCPV6 = 1 << 4,
308 308
309 SKB_GSO_FCOE = 1 << 5, 309 SKB_GSO_FCOE = 1 << 5,
310
311 /* This indicates at least one fragment might be overwritten
312 * (as in vmsplice(), sendfile() ...)
313 * If we need to compute a TX checksum, we'll need to copy
314 * all frags to avoid possible bad checksum
315 */
316 SKB_GSO_SHARED_FRAG = 1 << 6,
310}; 317};
311 318
312#if BITS_PER_LONG > 32 319#if BITS_PER_LONG > 32
@@ -2201,6 +2208,18 @@ static inline int skb_linearize(struct sk_buff *skb)
2201} 2208}
2202 2209
2203/** 2210/**
2211 * skb_has_shared_frag - can any frag be overwritten
2212 * @skb: buffer to test
2213 *
2214 * Return true if the skb has at least one frag that might be modified
2215 * by an external entity (as in vmsplice()/sendfile())
2216 */
2217static inline bool skb_has_shared_frag(const struct sk_buff *skb)
2218{
2219 return skb_shinfo(skb)->gso_type & SKB_GSO_SHARED_FRAG;
2220}
2221
2222/**
2204 * skb_linearize_cow - make sure skb is linear and writable 2223 * skb_linearize_cow - make sure skb is linear and writable
2205 * @skb: buffer to process 2224 * @skb: buffer to process
2206 * 2225 *