tcp: do not export tcp_gso_segment() and tcp_gro_receive()
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / tcp_offload.c
index 2658a27f540dc19f3ce6d7a77a3118eae8c91200..b92b81718ca42bc9e47b415c321eb143d7266852 100644 (file)
@@ -138,7 +138,6 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
 out:
        return segs;
 }
-EXPORT_SYMBOL(tcp_gso_segment);
 
 struct sk_buff **tcp_gro_receive(struct sk_buff **head, struct sk_buff *skb)
 {
@@ -197,7 +196,8 @@ struct sk_buff **tcp_gro_receive(struct sk_buff **head, struct sk_buff *skb)
        goto out_check_final;
 
 found:
-       flush = NAPI_GRO_CB(p)->flush;
+       /* Include the IP ID check below from the inner most IP hdr */
+       flush = NAPI_GRO_CB(p)->flush | NAPI_GRO_CB(p)->flush_id;
        flush |= (__force int)(flags & TCP_FLAG_CWR);
        flush |= (__force int)((flags ^ tcp_flag_word(th2)) &
                  ~(TCP_FLAG_CWR | TCP_FLAG_FIN | TCP_FLAG_PSH));
@@ -230,11 +230,10 @@ out_check_final:
                pp = head;
 
 out:
-       NAPI_GRO_CB(skb)->flush |= flush;
+       NAPI_GRO_CB(skb)->flush |= (flush != 0);
 
        return pp;
 }
-EXPORT_SYMBOL(tcp_gro_receive);
 
 int tcp_gro_complete(struct sk_buff *skb)
 {
@@ -280,7 +279,7 @@ static struct sk_buff **tcp4_gro_receive(struct sk_buff **head, struct sk_buff *
        if (NAPI_GRO_CB(skb)->flush)
                goto skip_csum;
 
-       wsum = skb->csum;
+       wsum = NAPI_GRO_CB(skb)->csum;
 
        switch (skb->ip_summed) {
        case CHECKSUM_NONE: