aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 7b2d351f24db..eb58b94301ec 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -85,7 +85,7 @@ int sysctl_tcp_ecn __read_mostly = 2;
85EXPORT_SYMBOL(sysctl_tcp_ecn); 85EXPORT_SYMBOL(sysctl_tcp_ecn);
86int sysctl_tcp_dsack __read_mostly = 1; 86int sysctl_tcp_dsack __read_mostly = 1;
87int sysctl_tcp_app_win __read_mostly = 31; 87int sysctl_tcp_app_win __read_mostly = 31;
88int sysctl_tcp_adv_win_scale __read_mostly = 2; 88int sysctl_tcp_adv_win_scale __read_mostly = 1;
89EXPORT_SYMBOL(sysctl_tcp_adv_win_scale); 89EXPORT_SYMBOL(sysctl_tcp_adv_win_scale);
90 90
91int sysctl_tcp_stdurg __read_mostly; 91int sysctl_tcp_stdurg __read_mostly;
@@ -496,7 +496,7 @@ static inline void tcp_rcv_rtt_measure(struct tcp_sock *tp)
496 goto new_measure; 496 goto new_measure;
497 if (before(tp->rcv_nxt, tp->rcv_rtt_est.seq)) 497 if (before(tp->rcv_nxt, tp->rcv_rtt_est.seq))
498 return; 498 return;
499 tcp_rcv_rtt_update(tp, jiffies - tp->rcv_rtt_est.time, 1); 499 tcp_rcv_rtt_update(tp, tcp_time_stamp - tp->rcv_rtt_est.time, 1);
500 500
501new_measure: 501new_measure:
502 tp->rcv_rtt_est.seq = tp->rcv_nxt + tp->rcv_wnd; 502 tp->rcv_rtt_est.seq = tp->rcv_nxt + tp->rcv_wnd;
@@ -2904,11 +2904,14 @@ static inline void tcp_complete_cwr(struct sock *sk)
2904 2904
2905 /* Do not moderate cwnd if it's already undone in cwr or recovery. */ 2905 /* Do not moderate cwnd if it's already undone in cwr or recovery. */
2906 if (tp->undo_marker) { 2906 if (tp->undo_marker) {
2907 if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR) 2907 if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR) {
2908 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh); 2908 tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh);
2909 else /* PRR */ 2909 tp->snd_cwnd_stamp = tcp_time_stamp;
2910 } else if (tp->snd_ssthresh < TCP_INFINITE_SSTHRESH) {
2911 /* PRR algorithm. */
2910 tp->snd_cwnd = tp->snd_ssthresh; 2912 tp->snd_cwnd = tp->snd_ssthresh;
2911 tp->snd_cwnd_stamp = tcp_time_stamp; 2913 tp->snd_cwnd_stamp = tcp_time_stamp;
2914 }
2912 } 2915 }
2913 tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR); 2916 tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR);
2914} 2917}