diff options
author | David S. Miller <davem@davemloft.net> | 2009-05-08 05:48:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-08 05:48:30 -0400 |
commit | 22f6dacdfcfdc792d068e9c41234808860498d04 (patch) | |
tree | 281a7d476f256ea3e2f800177ba685b169cc0540 /include/net/tcp.h | |
parent | 928f308f556f4943e50c5064b546f47bce301f02 (diff) | |
parent | 9b05126baa146fc3f41360164141d4e1b3ea93c4 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
include/net/tcp.h
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 87d210bb12a4..19f4150f4d4d 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 | ||
@@ -543,6 +544,17 @@ static inline void tcp_fast_path_check(struct sock *sk) | |||
543 | tcp_fast_path_on(tp); | 544 | tcp_fast_path_on(tp); |
544 | } | 545 | } |
545 | 546 | ||
547 | /* Compute the actual rto_min value */ | ||
548 | static inline u32 tcp_rto_min(struct sock *sk) | ||
549 | { | ||
550 | struct dst_entry *dst = __sk_dst_get(sk); | ||
551 | u32 rto_min = TCP_RTO_MIN; | ||
552 | |||
553 | if (dst && dst_metric_locked(dst, RTAX_RTO_MIN)) | ||
554 | rto_min = dst_metric_rtt(dst, RTAX_RTO_MIN); | ||
555 | return rto_min; | ||
556 | } | ||
557 | |||
546 | /* Compute the actual receive window we are currently advertising. | 558 | /* Compute the actual receive window we are currently advertising. |
547 | * Rcv_nxt can be after the window if our peer push more data | 559 | * Rcv_nxt can be after the window if our peer push more data |
548 | * than the offered window. | 560 | * than the offered window. |
@@ -912,7 +924,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb) | |||
912 | POLLIN | POLLRDNORM | POLLRDBAND); | 924 | POLLIN | POLLRDNORM | POLLRDBAND); |
913 | if (!inet_csk_ack_scheduled(sk)) | 925 | if (!inet_csk_ack_scheduled(sk)) |
914 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, | 926 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, |
915 | (3 * TCP_RTO_MIN) / 4, | 927 | (3 * tcp_rto_min(sk)) / 4, |
916 | TCP_RTO_MAX); | 928 | TCP_RTO_MAX); |
917 | } | 929 | } |
918 | return 1; | 930 | return 1; |