Commit 86bcebaf authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

tcp: fix >2 iw selection

A long-standing feature in tcp_init_metrics() is such that
any of its goto reset prevents call to tcp_init_cwnd().
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1a31f204
...@@ -928,6 +928,8 @@ static void tcp_init_metrics(struct sock *sk) ...@@ -928,6 +928,8 @@ static void tcp_init_metrics(struct sock *sk)
tcp_set_rto(sk); tcp_set_rto(sk);
if (inet_csk(sk)->icsk_rto < TCP_TIMEOUT_INIT && !tp->rx_opt.saw_tstamp) if (inet_csk(sk)->icsk_rto < TCP_TIMEOUT_INIT && !tp->rx_opt.saw_tstamp)
goto reset; goto reset;
cwnd:
tp->snd_cwnd = tcp_init_cwnd(tp, dst); tp->snd_cwnd = tcp_init_cwnd(tp, dst);
tp->snd_cwnd_stamp = tcp_time_stamp; tp->snd_cwnd_stamp = tcp_time_stamp;
return; return;
...@@ -942,6 +944,7 @@ reset: ...@@ -942,6 +944,7 @@ reset:
tp->mdev = tp->mdev_max = tp->rttvar = TCP_TIMEOUT_INIT; tp->mdev = tp->mdev_max = tp->rttvar = TCP_TIMEOUT_INIT;
inet_csk(sk)->icsk_rto = TCP_TIMEOUT_INIT; inet_csk(sk)->icsk_rto = TCP_TIMEOUT_INIT;
} }
goto cwnd;
} }
static void tcp_update_reordering(struct sock *sk, const int metric, static void tcp_update_reordering(struct sock *sk, const int metric,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment