Merge tag 'v3.10.108' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / net / tcp.h
index 4219d857c83fd7f95282a3da7a604b2294ca1eff..9022139f8d32f9e0e30b689f71d77db800b110fd 100644 (file)
@@ -1609,4 +1609,14 @@ struct tcp_request_sock_ops {
 extern void tcp_v4_init(void);
 extern void tcp_init(void);
 
+/* At how many jiffies into the future should the RTO fire? */
+static inline s32 tcp_rto_delta(const struct sock *sk)
+{
+       const struct sk_buff *skb = tcp_write_queue_head(sk);
+       const u32 rto = inet_csk(sk)->icsk_rto;
+       const u32 rto_time_stamp = TCP_SKB_CB(skb)->when + rto;
+
+       return (s32)(rto_time_stamp - tcp_time_stamp);
+}
+
 #endif /* _TCP_H */