[DCCP] ccid3: Shift window counter computation
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sun, 10 Dec 2006 02:07:37 +0000 (00:07 -0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 11 Dec 2006 22:34:52 +0000 (14:34 -0800)
commit9f8681db961de6d75e43844e9664f1f81e05e1b7
tree07679d0ea408127119bc8b2ce74b38031da204e5
parentde553c189e3faa0d0c38f366f73379b46587b80e
[DCCP] ccid3: Shift window counter computation

 This puts the window counter computation [RFC 4342, 8.1] into a separate
 function which is called whenever a new packet is ready for immediate
 transmission in ccid3_hc_tx_send_packet.

Justification:

 The window counter update was previously computed after the packet was sent. This has
 two drawbacks, both fixed by this patch:
   1) re-compute another timestamp almost directly after the packet was sent (expensive),
   2) the CCVal for the window counter is needed at the instant the packet is sent.

Further details:

 The initialisation of the window counter is left in the state NO_SENT, as before.
 The algorithm will do nothing if either RTT is initialised to 0 (which is ok) or if
 the RTT value remains below 4 microseconds (which is almost pathological).

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@mandriva.com>
net/dccp/ccids/ccid3.c