summaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/lib/tfrc.h
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2010-09-19 20:10:52 +0200
committerGerrit Renker <gerrit@erg.abdn.ac.uk>2010-09-21 12:14:26 +0200
commit792e6d3389061ad449429b9ba228eb758c247ea0 (patch)
tree31a238fb2fc28e465e95b7d98b5e0698461cdadf /net/dccp/ccids/lib/tfrc.h
parent80763dfbac4ed1e6dfe6ec08ef748e0e9aec3260 (diff)
downloadlinux-792e6d3389061ad449429b9ba228eb758c247ea0.tar.gz
linux-792e6d3389061ad449429b9ba228eb758c247ea0.tar.bz2
linux-792e6d3389061ad449429b9ba228eb758c247ea0.zip
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>
Diffstat (limited to 'net/dccp/ccids/lib/tfrc.h')
-rw-r--r--net/dccp/ccids/lib/tfrc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h
index 01bb48e96c2e..f8ee3f549770 100644
--- a/net/dccp/ccids/lib/tfrc.h
+++ b/net/dccp/ccids/lib/tfrc.h
@@ -57,6 +57,7 @@ static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight)
extern u32 tfrc_calc_x(u16 s, u32 R, u32 p);
extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue);
+extern u32 tfrc_invert_loss_event_rate(u32 loss_event_rate);
extern int tfrc_tx_packet_history_init(void);
extern void tfrc_tx_packet_history_exit(void);