Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[cascardo/linux.git] / net / ipv4 / gre_offload.c
index ecd1e09..96e0efe 100644 (file)
@@ -24,7 +24,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
        __be16 protocol = skb->protocol;
        u16 mac_len = skb->mac_len;
        int gre_offset, outer_hlen;
-       bool need_csum, ufo;
+       bool need_csum, ufo, gso_partial;
 
        if (!skb->encapsulation)
                goto out;
@@ -69,6 +69,8 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
                goto out;
        }
 
+       gso_partial = !!(skb_shinfo(segs)->gso_type & SKB_GSO_PARTIAL);
+
        outer_hlen = skb_tnl_header_len(skb);
        gre_offset = outer_hlen - tnl_hlen;
        skb = segs;
@@ -96,7 +98,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
                greh = (struct gre_base_hdr *)skb_transport_header(skb);
                pcsum = (__sum16 *)(greh + 1);
 
-               if (skb_is_gso(skb)) {
+               if (gso_partial) {
                        unsigned int partial_adj;
 
                        /* Adjust checksum to account for the fact that