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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2e0ced1af3b1..9c676eae3968 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2852,6 +2852,21 @@ static inline int skb_tnl_header_len(const struct sk_buff *inner_skb)
2852 SKB_GSO_CB(inner_skb)->mac_offset; 2852 SKB_GSO_CB(inner_skb)->mac_offset;
2853} 2853}
2854 2854
2855static inline int gso_pskb_expand_head(struct sk_buff *skb, int extra)
2856{
2857 int new_headroom, headroom;
2858 int ret;
2859
2860 headroom = skb_headroom(skb);
2861 ret = pskb_expand_head(skb, extra, 0, GFP_ATOMIC);
2862 if (ret)
2863 return ret;
2864
2865 new_headroom = skb_headroom(skb);
2866 SKB_GSO_CB(skb)->mac_offset += (new_headroom - headroom);
2867 return 0;
2868}
2869
2855static inline bool skb_is_gso(const struct sk_buff *skb) 2870static inline bool skb_is_gso(const struct sk_buff *skb)
2856{ 2871{
2857 return skb_shinfo(skb)->gso_size; 2872 return skb_shinfo(skb)->gso_size;