aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 1f820537741a..93eab0b9da60 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -31,6 +31,7 @@
31#include <linux/crypto.h> 31#include <linux/crypto.h>
32#include <linux/cryptohash.h> 32#include <linux/cryptohash.h>
33#include <linux/kref.h> 33#include <linux/kref.h>
34#include <linux/ktime.h>
34 35
35#include <net/inet_connection_sock.h> 36#include <net/inet_connection_sock.h>
36#include <net/inet_timewait_sock.h> 37#include <net/inet_timewait_sock.h>
@@ -478,7 +479,6 @@ int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th,
478struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, 479struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
479 struct ip_options *opt); 480 struct ip_options *opt);
480#ifdef CONFIG_SYN_COOKIES 481#ifdef CONFIG_SYN_COOKIES
481#include <linux/ktime.h>
482 482
483/* Syncookies use a monotonic timer which increments every 64 seconds. 483/* Syncookies use a monotonic timer which increments every 64 seconds.
484 * This counter is used both as a hash input and partially encoded into 484 * This counter is used both as a hash input and partially encoded into
@@ -619,7 +619,7 @@ static inline void tcp_bound_rto(const struct sock *sk)
619 619
620static inline u32 __tcp_set_rto(const struct tcp_sock *tp) 620static inline u32 __tcp_set_rto(const struct tcp_sock *tp)
621{ 621{
622 return (tp->srtt >> 3) + tp->rttvar; 622 return usecs_to_jiffies((tp->srtt_us >> 3) + tp->rttvar_us);
623} 623}
624 624
625static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd) 625static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd)
@@ -656,6 +656,11 @@ static inline u32 tcp_rto_min(struct sock *sk)
656 return rto_min; 656 return rto_min;
657} 657}
658 658
659static inline u32 tcp_rto_min_us(struct sock *sk)
660{
661 return jiffies_to_usecs(tcp_rto_min(sk));
662}
663
659/* Compute the actual receive window we are currently advertising. 664/* Compute the actual receive window we are currently advertising.
660 * Rcv_nxt can be after the window if our peer push more data 665 * Rcv_nxt can be after the window if our peer push more data
661 * than the offered window. 666 * than the offered window.
@@ -778,7 +783,6 @@ enum tcp_ca_event {
778#define TCP_CA_BUF_MAX (TCP_CA_NAME_MAX*TCP_CA_MAX) 783#define TCP_CA_BUF_MAX (TCP_CA_NAME_MAX*TCP_CA_MAX)
779 784
780#define TCP_CONG_NON_RESTRICTED 0x1 785#define TCP_CONG_NON_RESTRICTED 0x1
781#define TCP_CONG_RTT_STAMP 0x2
782 786
783struct tcp_congestion_ops { 787struct tcp_congestion_ops {
784 struct list_head list; 788 struct list_head list;