diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-11-01 12:01:20 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-11-01 12:01:20 +0800 |
| commit | 79df8fa79b6a2aced892ad2b2c9832e7d9bdea6b (patch) | |
| tree | 725b3b29e466e846837cf56cec1bafd99fe5ca71 /include/net | |
| parent | c11a255c622e7a2d312f4080c6ef529dd67b3c38 (diff) | |
| parent | 1714a3e139090705a0bd862a8b7bba930181cfbd (diff) | |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/ip_tunnels.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index af40bc586a1b..86a7bdd61d1a 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h @@ -283,6 +283,22 @@ struct metadata_dst *iptunnel_metadata_reply(struct metadata_dst *md, struct sk_buff *iptunnel_handle_offloads(struct sk_buff *skb, bool gre_csum, int gso_type_mask); +static inline int iptunnel_pull_offloads(struct sk_buff *skb) +{ + if (skb_is_gso(skb)) { + int err; + + err = skb_unclone(skb, GFP_ATOMIC); + if (unlikely(err)) + return err; + skb_shinfo(skb)->gso_type &= ~(NETIF_F_GSO_ENCAP_ALL >> + NETIF_F_GSO_SHIFT); + } + + skb->encapsulation = 0; + return 0; +} + static inline void iptunnel_xmit_stats(int err, struct net_device_stats *err_stats, struct pcpu_sw_netstats __percpu *stats) |
