]> bbs.cooldavid.org Git - net-next-2.6.git/commit
dccp tfrc/ccid-3: computing the loss rate from the Loss Event Rate
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sun, 19 Sep 2010 18:10:52 +0000 (20:10 +0200)
committerGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 21 Sep 2010 10:14:26 +0000 (12:14 +0200)
commit792e6d3389061ad449429b9ba228eb758c247ea0
tree31a238fb2fc28e465e95b7d98b5e0698461cdadf
parent80763dfbac4ed1e6dfe6ec08ef748e0e9aec3260
dccp tfrc/ccid-3: computing the loss rate from the Loss Event Rate

This adds a function to take care of the following, separate cases occurring in
the computation of the Loss Rate p:

 * 1/(2^32-1) is mapped into 0% as per RFC 4342, 8.5;
 * 1/0        is mapped into 100%, the maximum;
 * to avoid that p = 1/x is rounded down to 0 when x is very large, since this
   means accidentally re-entering slow-start indicated by p == 0, the minimum
   resolution value of p is now returned instead;
 * a bug in ccid3_hc_rx_getsockopt is fixed: 1/0 was mapped into ~0U.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
net/dccp/ccids/ccid3.c
net/dccp/ccids/lib/tfrc.h
net/dccp/ccids/lib/tfrc_equation.c