[ns] patch: tcp.cc slow-start bug ?
Fri, 19 Oct 2001 13:56:08 +0300
I think you've got things a bit mixed up...
On Thu, Oct 18, 2001 at 09:50:54PM +0200, Neundorf Alexander wrote:
> So, the sender starts with 1 packet, receives the ack, increases cwnd, sends two packets.
> Now it receives the ack for packet #1. Again it increases cwnd, now 3, and sends 2 packets.
> Then it receives ack #2 and increases cwnd to 4, nice :-)
> But, it doesn't send 4 packets, it still sends only 2 packets. This is not exactly exponential behaviour ;-)
> It sends only (h_ack+win) - t_seqno_ == 2 packets.
At any time, h_ack + win is the highest seqno (NOT the number of segments) the sender
can transmit. In the example you provided, when ack #2 arrives h_ack+win= 2+4 = 6, so
the sender can send up to seqno 6 (and not win=4 segments). By the time ack #2 arrives
the sender has already transmitted seqno's 0,1,2,3 and 4 so it correctly transmits 2
segments, 5 and 6 (the maximum allowed).
Actually (assuming no loss or DelAcks) whenever cwnd_ is increased by 1, that is a new ack is
received during SS, the sender transmits exactly 2 new segments, one for the cwnd increase
and one for the highest_ack_ increase.
> So it goes on until it reaches the max window size of 20 packets. Then it gets even worse.
> It still sends only the difference of h_ack+win - t_seqno_ (e.g. 20+21-40 == 1) packets.
When cwnd_ reaches the max window size a new ack does not increase cwnd, only highest_ack_
and the sender correctly only transmits 1 segment.
In other words I think TcpAgent::send_much() is OK as it is.
Dimitris Velenis <firstname.lastname@example.org>
Network Management & Optimal Design Lab
National Technical University of Athens