aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/lib
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2008-09-04 07:30:19 +0200
committerGerrit Renker <gerrit@erg.abdn.ac.uk>2008-09-04 07:45:40 +0200
commitd20ed95f8bf3d98d31dbbab8b00bb4c1a4a140f3 (patch)
treea740d35fd710618863a63e4b86ecaedc2ea5497b /net/dccp/ccids/lib
parentdccp tfrc: Receiver history initialisation routine (diff)
downloadlinux-dev-d20ed95f8bf3d98d31dbbab8b00bb4c1a4a140f3.tar.xz
linux-dev-d20ed95f8bf3d98d31dbbab8b00bb4c1a4a140f3.zip
dccp tfrc: Perform early loss detection
This enables the TFRC code to begin loss detection (as soon as the module is loaded), using the latest updates from rfc3448bis-06, 6.3.1: * when the first data packet(s) are lost or marked, set * X_target = s/(2*R) => f(p) = s/(R * X_target) = 2, * corresponding to a loss rate of ~ 20.64%. The handle_loss() function is now called right at the begin of rx_packet_recv() and thus no longer protected against duplicates: hence a call to rx_duplicate() has been added. Such a call makes sense now, as the previous patch initialises the first entry with a sequence number of GSR. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp/ccids/lib')
-rw-r--r--net/dccp/ccids/lib/packet_history.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c
index 5b4e1cf8439d..8db34225c002 100644
--- a/net/dccp/ccids/lib/packet_history.c
+++ b/net/dccp/ccids/lib/packet_history.c
@@ -335,6 +335,9 @@ int tfrc_rx_handle_loss(struct tfrc_rx_hist *h,
{
int is_new_loss = 0;
+ if (tfrc_rx_hist_duplicate(h, skb))
+ return 0;
+
if (h->loss_count == 0) {
__do_track_loss(h, skb, ndp);
} else if (h->loss_count == 1) {