2001-03-03 08:38:42

by Mark Reginald James

[permalink] [raw]
Subject: TCP Congestion Window Bug?

Hi:

TCP only sends a packet if:

tcp_packets_in_flight(tp) < tp->snd_cwnd

(function tcp_snd_test in include/net/tcp.h)

but regards transmission as application-limited if

tp->packets_out < tp->snd_cwnd

(function tcp_cwnd_validate in include/net/tcp.h)

So the kernel _always_ thinks the connection is
application-limited, forcing many un-necessary
reductions in the size of the congestion window.

I think the condition in tcp_snd_test should be:

tcp_packets_in_flight(tp) <= tp->snd_cwnd

Mark


2001-03-03 09:12:32

by David Miller

[permalink] [raw]
Subject: Re: TCP Congestion Window Bug?


Mark Reginald James writes:
> TCP only sends a packet if:
>
> tcp_packets_in_flight(tp) < tp->snd_cwnd
>
> (function tcp_snd_test in include/net/tcp.h)
>
> but regards transmission as application-limited if
>
> tp->packets_out < tp->snd_cwnd
>
> (function tcp_cwnd_validate in include/net/tcp.h)
>
> So the kernel _always_ thinks the connection is
> application-limited

Why? After the final "send a packet if" test, tp->packets_out will be
incremented and thus be equal to tp->snd_cwnd, marking the connection
as _not_ application limited.

Later,
David S. Miller
[email protected]

2001-03-03 09:27:13

by Mark Reginald James

[permalink] [raw]
Subject: Re: TCP Congestion Window Bug?

Please ignore original post. Sorry. -- Mark