[TCP]: BIC not binary searching correctly
Linux Kernel Mailing List <[email protected]> Wed, 23 Mar 2005 03:06:48 +0000
| Newsgroups | gmane.linux.kernel.commits.2-4 |
|---|---|
| Message-ID | <[email protected]> |
ChangeSet 1.1448.127.7, 2005/03/22 19:06:48-08:00, [email protected] [TCP]: BIC not binary searching correctly 2.4 version of same fix as 2.6.11. The problem is that BIC is supposed to reset the cwnd to the last loss value rather than ssthresh when loss is detected. The correct code (from the BIC TCP code for Web100) is in this patch. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]> tcp_input.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c 2005-03-25 17:03:27 -08:00 +++ b/net/ipv4/tcp_input.c 2005-03-25 17:03:27 -08:00 @@ -1642,7 +1642,10 @@ static void tcp_undo_cwr(struct tcp_opt *tp, int undo) { if (tp->prior_ssthresh) { - tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh<<1); + if (tcp_is_bic(tp)) + tp->snd_cwnd = max(tp->snd_cwnd, tp->bictcp.last_max_cwnd); + else + tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh<<1); if (undo && tp->prior_ssthresh > tp->snd_ssthresh) { tp->snd_ssthresh = tp->prior_ssthresh;