linux-stable/net/dccp/ccids
Gerrit Renker bfe24a6cc2 [DCCP] ccid3: Simplify calculation for reverse lookup of p
This simplifies the calculation of a value p for a given fval when the
 first loss interval is computed (RFC 3448, 6.3.1). It makes use of the
 two new functions scaled_div/scaled_div32 to provide overflow protection.

 Additionally, protection against divide-by-zero is extended - in this
 case the function will return the maximally possible value of p=100%.

Background:

 The maximum fval, f(100%), is approximately 244, i.e. the scaled value of fval
 should never exceed 244E6, which fits easily into u32. The problem is the scaling
 by 10^6, since additionally R(TT) is in microseconds.
 This is resolved by breaking the division into two stages: the first stage
 computes fval=(s*10^6)/R, stores that into u64; the second stage computes
 fval = (fval*10^6)/X_recv and complains if overflow is reached for u32.
 This case is safe since the TFRC reverse-lookup routine then returns p=100%.

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>
2006-12-11 14:34:44 -08:00
..
lib [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
ccid2.c [DCCP]: Use `unsigned' for packet lengths 2006-12-02 21:31:02 -08:00
ccid2.h [DCCP] ccid2: Allow window to grow larger 2006-12-02 21:30:34 -08:00
ccid3.c [DCCP] ccid3: Simplify calculation for reverse lookup of p 2006-12-11 14:34:44 -08:00
ccid3.h [DCCP] ccid3: Finer-grained resolution of sending rates 2006-12-11 14:34:42 -08:00
Kconfig [DCCP]: Use higher RTO default for CCID3 2006-12-03 14:50:23 -02:00
Makefile [DCCP] CCID2: Initial CCID2 (TCP-Like) implementation 2006-03-20 17:41:47 -08:00