tcp: dont drop MTU reduction indications
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / tcp.h
index 1888169e07c72bb13a24ed1b3a018bf570ec2cb3..eb125a4c30b334b63ca9d06983a125360839d90e 100644 (file)
@@ -243,6 +243,16 @@ static inline unsigned int tcp_optlen(const struct sk_buff *skb)
        return (tcp_hdr(skb)->doff - 5) * 4;
 }
 
+/* TCP Fast Open */
+#define TCP_FASTOPEN_COOKIE_MIN        4       /* Min Fast Open Cookie size in bytes */
+#define TCP_FASTOPEN_COOKIE_MAX        16      /* Max Fast Open Cookie size in bytes */
+
+/* TCP Fast Open Cookie as stored in memory */
+struct tcp_fastopen_cookie {
+       s8      len;
+       u8      val[TCP_FASTOPEN_COOKIE_MAX];
+};
+
 /* This defines a selective acknowledgement block. */
 struct tcp_sack_block_wire {
        __be32  start_seq;
@@ -376,7 +386,9 @@ struct tcp_sock {
                unused      : 1;
        u8      repair_queue;
        u8      do_early_retrans:1,/* Enable RFC5827 early-retransmit  */
-               early_retrans_delayed:1; /* Delayed ER timer installed */
+               early_retrans_delayed:1, /* Delayed ER timer installed */
+               syn_data:1,     /* SYN includes data */
+               syn_fastopen:1; /* SYN includes Fast Open option */
 
 /* RTT measurement */
        u32     srtt;           /* smoothed round trip time << 3        */
@@ -481,6 +493,9 @@ struct tcp_sock {
                u32               probe_seq_start;
                u32               probe_seq_end;
        } mtu_probe;
+       u32     mtu_info; /* We received an ICMP_FRAG_NEEDED / ICMPV6_PKT_TOOBIG
+                          * while socket was owned by user.
+                          */
 
 #ifdef CONFIG_TCP_MD5SIG
 /* TCP AF-Specific parts; only used by MD5 Signature support so far */
@@ -490,6 +505,9 @@ struct tcp_sock {
        struct tcp_md5sig_info  __rcu *md5sig_info;
 #endif
 
+/* TCP fastopen related information */
+       struct tcp_fastopen_request *fastopen_req;
+
        /* When the cookie options are generated and exchanged, then this
         * object holds a reference to them (cookie_values->kref).  Also
         * contains related tcp_cookie_transactions fields.
@@ -500,7 +518,12 @@ struct tcp_sock {
 enum tsq_flags {
        TSQ_THROTTLED,
        TSQ_QUEUED,
-       TSQ_OWNED, /* tcp_tasklet_func() found socket was locked */
+       TCP_TSQ_DEFERRED,          /* tcp_tasklet_func() found socket was owned */
+       TCP_WRITE_TIMER_DEFERRED,  /* tcp_write_timer() found socket was owned */
+       TCP_DELACK_TIMER_DEFERRED, /* tcp_delack_timer() found socket was owned */
+       TCP_MTU_REDUCED_DEFERRED,  /* tcp_v{4|6}_err() could not call
+                                   * tcp_v{4|6}_mtu_reduced()
+                                   */
 };
 
 static inline struct tcp_sock *tcp_sk(const struct sock *sk)