diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-05-23 18:18:40 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-23 18:18:40 -0400 |
commit | fc05505b77f7900a1bb74fb3f3a4343dee4265a4 (patch) | |
tree | 6517919cb60bd9465078512cacbefd8c77f94b76 /include/net/tcp.h | |
parent | a2ab67fae1ab9226679495a8d260f4e6555efc5f (diff) | |
parent | 11c79740d3c03cb81f84e98cf2e2dbd8d9bb53cd (diff) |
Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 into devel
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 1b94b9bfe2dc..646dbe3962ea 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <net/ip.h> | 41 | #include <net/ip.h> |
42 | #include <net/tcp_states.h> | 42 | #include <net/tcp_states.h> |
43 | #include <net/inet_ecn.h> | 43 | #include <net/inet_ecn.h> |
44 | #include <net/dst.h> | ||
44 | 45 | ||
45 | #include <linux/seq_file.h> | 46 | #include <linux/seq_file.h> |
46 | 47 | ||
@@ -530,6 +531,17 @@ static inline void tcp_fast_path_check(struct sock *sk) | |||
530 | tcp_fast_path_on(tp); | 531 | tcp_fast_path_on(tp); |
531 | } | 532 | } |
532 | 533 | ||
534 | /* Compute the actual rto_min value */ | ||
535 | static inline u32 tcp_rto_min(struct sock *sk) | ||
536 | { | ||
537 | struct dst_entry *dst = __sk_dst_get(sk); | ||
538 | u32 rto_min = TCP_RTO_MIN; | ||
539 | |||
540 | if (dst && dst_metric_locked(dst, RTAX_RTO_MIN)) | ||
541 | rto_min = dst_metric_rtt(dst, RTAX_RTO_MIN); | ||
542 | return rto_min; | ||
543 | } | ||
544 | |||
533 | /* Compute the actual receive window we are currently advertising. | 545 | /* Compute the actual receive window we are currently advertising. |
534 | * Rcv_nxt can be after the window if our peer push more data | 546 | * Rcv_nxt can be after the window if our peer push more data |
535 | * than the offered window. | 547 | * than the offered window. |
@@ -895,7 +907,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb) | |||
895 | wake_up_interruptible(sk->sk_sleep); | 907 | wake_up_interruptible(sk->sk_sleep); |
896 | if (!inet_csk_ack_scheduled(sk)) | 908 | if (!inet_csk_ack_scheduled(sk)) |
897 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, | 909 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, |
898 | (3 * TCP_RTO_MIN) / 4, | 910 | (3 * tcp_rto_min(sk)) / 4, |
899 | TCP_RTO_MAX); | 911 | TCP_RTO_MAX); |
900 | } | 912 | } |
901 | return 1; | 913 | return 1; |