From 8a9c7e92e0ca97632126feee32ba2698b4eb6c8f Mon Sep 17 00:00:00 2001 From: Gerrit Renker Date: Wed, 12 Dec 2007 13:50:51 -0200 Subject: [TFRC]: Ringbuffer to track loss interval history A ringbuffer-based implementation of loss interval history is easier to maintain, allocate, and update. The `swap' routine to keep the RX history sorted is due to and was written by Arnaldo Carvalho de Melo, simplifying an earlier macro-based variant. Details: * access to the Loss Interval Records via macro wrappers (with safety checks); * simplified, on-demand allocation of entries (no extra memory consumption on lossless links); cache allocation is local to the module / exported as service; * provision of RFC-compliant algorithm to re-compute average loss interval; * provision of comprehensive, new loss detection algorithm - support for all cases of loss, including re-ordered/duplicate packets; - waiting for NDUPACK=3 packets to fill the hole; - updating loss records when a late-arriving packet fills a hole. Signed-off-by: Gerrit Renker Signed-off-by: Ian McDonald Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- net/dccp/ccids/lib/packet_history.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'net/dccp/ccids/lib/packet_history.h') diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h index e58b0fcdc6a..24edd8df54b 100644 --- a/net/dccp/ccids/lib/packet_history.h +++ b/net/dccp/ccids/lib/packet_history.h @@ -36,10 +36,9 @@ #ifndef _DCCP_PKT_HIST_ #define _DCCP_PKT_HIST_ -#include -#include - -struct sk_buff; +#include +#include +#include "tfrc.h" struct tfrc_tx_hist_entry; @@ -125,6 +124,10 @@ extern void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, extern int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb); extern int tfrc_rx_hist_new_loss_indicated(struct tfrc_rx_hist *h, const struct sk_buff *skb, u32 ndp); +struct tfrc_loss_hist; +extern int tfrc_rx_handle_loss(struct tfrc_rx_hist *, struct tfrc_loss_hist *, + struct sk_buff *skb, u32 ndp, + u32 (*first_li)(struct sock *), struct sock *); extern u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, const struct sk_buff *skb); extern int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h); -- cgit v1.2.3