* [PATCH] TCP BIC not binary searching correctly
@ 2005-03-18 21:57 Stephen Hemminger
2005-03-18 22:05 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2005-03-18 21:57 UTC (permalink / raw)
To: David S. Miller; +Cc: Injong Rhee, netdev
[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]
While redoing BIC for the split up version, I discovered that the existing
2.6.11 code doesn't really do binary search. It ends up being just a slightly
modified version of Reno. See attached graphs to see the effect over simulated
1mbit environment.
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 <shemminger@osdl.org>
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c 2005-03-18 13:53:52 -08:00
+++ b/net/ipv4/tcp_input.c 2005-03-18 13:53:53 -08:00
@@ -1654,7 +1654,10 @@
static void tcp_undo_cwr(struct tcp_sock *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;
[-- Attachment #2: bic-bug.png --]
[-- Type: image/png, Size: 15174 bytes --]
[-- Attachment #3: bic-fix.png --]
[-- Type: image/png, Size: 15277 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] TCP BIC not binary searching correctly
2005-03-18 21:57 [PATCH] TCP BIC not binary searching correctly Stephen Hemminger
@ 2005-03-18 22:05 ` Stephen Hemminger
2005-03-23 3:09 ` David S. Miller
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2005-03-18 22:05 UTC (permalink / raw)
To: David S. Miller; +Cc: Marcelo W. Tosatti, netdev
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 <shemminger@osdl.org>
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c 2005-03-18 14:03:44 -08:00
+++ b/net/ipv4/tcp_input.c 2005-03-18 14:03:44 -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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] TCP BIC not binary searching correctly
2005-03-18 22:05 ` Stephen Hemminger
@ 2005-03-23 3:09 ` David S. Miller
0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2005-03-23 3:09 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: marcelo.tosatti, netdev
On Fri, 18 Mar 2005 14:05:47 -0800
Stephen Hemminger <shemminger@osdl.org> wrote:
> 2.4 version of same fix as 2.6.11.
Both patches applied, thanks Stephen.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-23 3:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-18 21:57 [PATCH] TCP BIC not binary searching correctly Stephen Hemminger
2005-03-18 22:05 ` Stephen Hemminger
2005-03-23 3:09 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).