]> git.baikalelectronics.ru Git - kernel.git/commit
[CCID2]: Deadlock and spurious timeouts when Ack Ratio > cwnd
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sat, 24 Nov 2007 23:40:24 +0000 (21:40 -0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:54:53 +0000 (14:54 -0800)
commitea7d8cc7dd65be8e986bccd6ad1fc9794b491bb3
tree56998d89dcf4b748c09b4f5fe82bd2b7742ea3cb
parentde9682502fb1331f3f08a0b99ac165811899374c
[CCID2]: Deadlock and spurious timeouts when Ack Ratio > cwnd

This patch removes a bug in the current code. I agree with Andrea's comment
that there is a problem here but the way it is treated does not fix it.

The problem is that whenever Ack Ratio > cwnd, starvation/deadlock occurs:
 * the receiver will not send an Ack until (Ack Ratio - cwnd) data packets
   have arrived;
 * the sender will not send any data packet before the receipt of an Ack
   advances the send window.
The only way that the connection then progresses was via RTO timeout. In one
extreme case (bulk transfer), it was observed that this happened for every single
packet; i.e. hundreds of packets, each a RTO timeout of 1..3 seconds apart:
a transfer which normally would take a fraction of a second thus grew to
several minutes.

The solution taken by this approach is to observe the relation

                   "Ack Ratio <= cwnd"

by using the constraint (1) from RFC 4341, 6.1.2; i.e. set

                 Ack Ratio = ceil(cwnd / 2)

and update it whenever either Ack Ratio or cwnd change. This ensures that
the deadlock problem can not arise.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ccids/ccid2.c