diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-07-13 06:51:40 -0400 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-07-13 06:51:40 -0400 |
commit | b552c6231f19d50165bbf59e8b34d3f713ab5c01 (patch) | |
tree | 7ef572ce7356789e3152120a5b9b8621954e02af /net/dccp/ccids/ccid3.c | |
parent | 5b5d0e704880addfd979c262e6441f126708539c (diff) |
dccp ccid-3: Fix a loss detection bug
This fixes a bug in the logic of the TFRC loss detection:
* new_loss_indicated() should not be called while a loss is pending;
* but the code allows this;
* thus, for two subsequent gaps in the sequence space, when loss_count
has not yet reached NDUPACK=3, the loss_count is falsely reduced to 1.
To avoid further and similar problems, all loss handling and loss detection is
now done inside tfrc_rx_hist_handle_loss(), using an appropriate routine to
track new losses.
Further changes:
----------------
* added a reminder that no RX history operations should be performed when
rx_handle_loss() has identified a (new) loss, since the function takes
care of packet reordering during loss detection;
* made tfrc_rx_hist_loss_pending() bool (thanks to an earlier suggestion
by Arnaldo);
* removed unused functions.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp/ccids/ccid3.c')
-rw-r--r-- | net/dccp/ccids/ccid3.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 523db262c18f..f6756e0c9e69 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -825,18 +825,16 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
825 | } | 825 | } |
826 | 826 | ||
827 | /* | 827 | /* |
828 | * Handle pending losses and otherwise check for new loss | 828 | * Perform loss detection and handle pending losses |
829 | */ | 829 | */ |
830 | if (tfrc_rx_hist_loss_pending(&hcrx->ccid3hcrx_hist) && | 830 | if (tfrc_rx_handle_loss(&hcrx->ccid3hcrx_hist, &hcrx->ccid3hcrx_li_hist, |
831 | tfrc_rx_handle_loss(&hcrx->ccid3hcrx_hist, | 831 | skb, ndp, ccid3_first_li, sk)) { |
832 | &hcrx->ccid3hcrx_li_hist, | ||
833 | skb, ndp, ccid3_first_li, sk) ) { | ||
834 | do_feedback = CCID3_FBACK_PARAM_CHANGE; | 832 | do_feedback = CCID3_FBACK_PARAM_CHANGE; |
835 | goto done_receiving; | 833 | goto done_receiving; |
836 | } | 834 | } |
837 | 835 | ||
838 | if (tfrc_rx_hist_new_loss_indicated(&hcrx->ccid3hcrx_hist, skb, ndp)) | 836 | if (tfrc_rx_hist_loss_pending(&hcrx->ccid3hcrx_hist)) |
839 | goto update_records; | 837 | return; /* done receiving */ |
840 | 838 | ||
841 | /* | 839 | /* |
842 | * Handle data packets: RTT sampling and monitoring p | 840 | * Handle data packets: RTT sampling and monitoring p |