Skip to content

: CCID3 fixes / standalone TFRC loss-detection and loss intervals database / DCCP closi

Gerrit Renker dccp 1 version In review

Get series with b4
b4 am 200704051632.52678@strip-the-willow

Versions newest first

  1. v1 Latest43 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/43: Modulo-16 arithmetic for window countersnet/dccp/ccids/ccid3.c net/dccp/ccids/lib/packet_history.c net/dccp/ccids/lib/packet_history.h+4 -70 replies
2/43: Receiver does not set CCValnet/dccp/ccids/ccid3.c+0 -20 replies
3/43: Use a function to update p_inv, and p is never usednet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h+38 -381 reply
4/43: History access is redundant when sending feedbacknet/dccp/ccids/ccid3.c+14 -210 replies
5/43: Provide central source file and debug facilitynet/dccp/ccids/Kconfig net/dccp/ccids/lib/Makefile net/dccp/ccids/lib/packet_history.c +3 more+50 -140 replies
6/43: New infrastructure for loss detectionnet/dccp/ccids/lib/packet_history.h+101 -02 replies
7/43: New RX History Step 1 - Integrate new history structurenet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h+14 -120 replies
8/43: New RX History Step 2 - Initialisation and cleanupnet/dccp/ccids/ccid3.c net/dccp/ccids/lib/packet_history.c net/dccp/ccids/lib/packet_history.h +1 more+60 -294 replies
9/43: New RX History Step 3 - Track highest seqnonet/dccp/ccids/ccid3.c net/dccp/ccids/lib/packet_history.h+22 -00 replies
10/43: Provide fallback RTT value when none is availablenet/dccp/dccp.h+5 -21 reply
11/43: New RX History Step 4 - Receiver RTT samplingnet/dccp/ccids/ccid3.c net/dccp/ccids/lib/packet_history.c net/dccp/ccids/lib/packet_history.h+55 -611 reply
12/43: New RX History Step 5 - CCID3 packet receptionnet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h+53 -820 replies
13/43: CCID3 Packet Reception Step 6a - Basic loss detectionnet/dccp/ccids/ccid3.c net/dccp/ccids/lib/packet_history.c net/dccp/ccids/lib/packet_history.h+156 -590 replies
14/43: CCID3 Packet Reception Step 6b - Detection of burst-lossesnet/dccp/ccids/lib/packet_history.c+27 -30 replies
15/43: New RX History Step 7 - Remove old infrastructurenet/dccp/ccids/lib/packet_history.c net/dccp/ccids/lib/packet_history.h+0 -1880 replies
16/43: Ringbuffer to track loss interval historynet/dccp/ccids/ccid3.c net/dccp/ccids/lib/loss_interval.c net/dccp/ccids/lib/loss_interval.h+62 -121 reply
17/43: Loss-intervals access-macros and -functionsnet/dccp/ccids/lib/loss_interval.c+21 -01 reply
18/43: Cache allocation of entriesnet/dccp/ccids/ccid3.c net/dccp/ccids/lib/loss_interval.c net/dccp/ccids/lib/loss_interval.h +1 more+38 -1201 reply
19/43: Recompute average loss intervalnet/dccp/ccids/ccid3.c net/dccp/ccids/lib/loss_interval.c net/dccp/ccids/lib/loss_interval.h+55 -380 replies
20/43: Insert and update routines for the Loss Interval Databasenet/dccp/ccids/ccid3.c net/dccp/ccids/lib/loss_interval.c net/dccp/ccids/lib/loss_interval.h+51 -490 replies
21/43: Let calling module compute First Loss Intervalnet/dccp/ccids/ccid3.c+10 -130 replies
22/43: Integrate RX history loss detection with loss interval updatenet/dccp/ccids/lib/packet_history.c net/dccp/ccids/lib/packet_history.h+17 -90 replies
23/43: Fix and simplify header includesnet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h net/dccp/ccids/lib/loss_interval.c +4 more+11 -160 replies
24/43: Hook up CCID3 with new Loss Intervals Databasenet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h+23 -320 replies
25/43: Update copyrights of CCID3/TFRC filesnet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h net/dccp/ccids/lib/loss_interval.c +5 more+22 -151 reply
26/43: Move NULL-protection into functionnet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h+12 -261 reply
27/43: Accurately determine idle & application-limited periodsnet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h net/dccp/ccids/lib/packet_history.c +1 more+55 -240 replies
28/43: Make computation of X_recv conform to TFRCnet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h+40 -154 replies
29/43: Shorten struct-member namenet/dccp/ccids/ccid3.c net/dccp/ccids/ccid3.h+8 -91 reply
30/43: Separate protocol states into general/specificinclude/linux/dccp.h+3 -10 replies
31/43: Make PARTOPEN an autonomous stateinclude/linux/dccp.h+2 -100 replies
32/43: Dedicated auxiliary states to support passive-closeinclude/linux/dccp.h net/dccp/proto.c+24 -10 replies
33/43: Basic support for passive-closeinclude/linux/dccp.h net/dccp/input.c net/dccp/proto.c+102 -410 replies
34/43: Perform SHUT_RD and SHUT_WR on receiving closenet/dccp/input.c+15 -70 replies
35/43: Reduce the number of writable statesnet/dccp/proto.c+1 -10 replies
36/43: Shift the retransmit timer for active-close into output.cnet/dccp/output.c net/dccp/proto.c+10 -190 replies
37/43: Use maxiumum-RTO backoff from DCCP specnet/dccp/dccp.h+9 -20 replies
38/43: Support for server holding timewait stateDocumentation/networking/dccp.txt include/linux/dccp.h net/dccp/output.c +1 more+25 -30 replies
39/43: Protect against Reset/Sync floods due to buggy applicationsnet/dccp/input.c+17 -012 replies
40/43: Collapse repeated `len' statements into onenet/dccp/proto.c+1 -40 replies
41/43: Check for unread data on closenet/dccp/proto.c+8 -20 replies
42/43: Add support for abortive releasenet/dccp/proto.c+13 -20 replies
43/43: Update API documentationDocumentation/networking/dccp.txt+4 -20 replies

Reviews trailers per patch

7 of 43 patches have a Reviewed-by or Acked-by.

PatchIan McDonald
1/43
2/43
3/43A-b
4/43
5/43
6/43
7/43
8/43
9/43
10/43A-b
11/43A-b
12/43
13/43
14/43
15/43
16/43A-b
17/43A-b
18/43A-b
19/43
20/43
21/43
22/43
23/43
24/43
25/43
26/43A-b
27/43
28/43
29/43
30/43
31/43
32/43
33/43
34/43
35/43
36/43
37/43
38/43
39/43
40/43
41/43
42/43
43/43

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/43]: CCID3 fixes / standalone TFRC loss-detection and loss intervals database / DCCP closi

This is the completion of the CCID3 fixes begun with the last patch set, plus work on DCCP passive-close. I apologize for the mass of output. On the other hand, it is probably not that much, since I have been anxious to split each logical change into a separate patch. I have not always managed to eliminate overriding by a later one, but tried to avoid this as good as possible.

The patches divide into the following groups, the bulk of work is in II/III. All patches have been uploaded to http://www.erg.abdn.ac.uk/users/gerrit/dccp/patch-backlog/ , on top of the basic CCID3 patches.

Due to the mass of outstanding patches, I offer to split them into separate directories and create separate blocks of descriptions -- please do let me know if you would like to make use of this.

====================================================I. Basic CCID3 Patches
===========

Patch #1: Implements circular modulo-16 arithmetic for working with window counters.

Patch #2: Bug-fix: CCID3 receiver (hc_rx) does not set CCVal window counter.

Patch #3: Remove the redundancy of keeping both p and p_inv = 1/p on the CCID3 socket.
The socket size shrinks a bit further and the code becomes simpler.

Patch #4: Avoids redundant history access when copying received-packet information over
to send CCID3 feedback. Simplification and less prone to problems with concurrent access to data structures.

Patch #5: Provide dedicated "tfrc_module.c" source file to mark structure of tfrc_lib;
and provide the missing "tfrc_pr_debug()" macro for debugging.

====================================================II. New CCID3 RX History Structure |
==================
The RX history structure has been much revised, in particular it has been reduced to a fixed-size rinbuffer of size 4. This is the minimally required size to perform loss detection. In addition, a more robust form of receiver-based RTT sampling is also performed on top of this structure.
As a result, more functionality becomes available with simpler code.

Patch #6: New RX history infrastructure - data structures.

Patch #7: "Glue patch" to allow the transition, using mainly #if 0 ... to allow a transition.
This patch is entirely overwritten by later patches, but is necessary if people want to test just the first 6 patches on their own.

Patch #8: RX history constructor / destructor.
NB: I left the old dccp_rx_hist_new() / dccp_rx_hist_delete() in case someone wants to
build some other RX history in the future; but in fact none of the code uses them now.

Patch #9: Takes care of always-tracking the highest-received sequence number in the new RX structure.

Patch #10: Fallback RTT value from RFC 4340, 4.3. Seems to be an oversight, we need a fallback RTT in
quite a few cases; this patch adds it for DCCP-wide use; plus update on RTT sanity-check.

Patch #11: Receiver RTT sampling algorithm - I fine-tuned the algorithm from RFC 4342 for robustness.

Patch #12: Integrate new RX history structure with CCID3 packet reception (hc_rx). Now has all the
features and checks required by RFC 3448/4342 on receiving a new CCID3 packet.

Patch #13: Add loss detection, complete with handling reordering/late arrival and filling of seqno holes.

Patch #14: Loss detection continued - recycling of loss records under bursts of losses.

Patch #15: Removes the old RX history functions which have been replaced.

====================================================II. New CCID3 Loss Intervals Database Structure | ========================This implements an entirely new loss intervals database which interfaces with the RX history structure. It is also part of the tfrc_lib module and so has the added benefit that (i) loss detection, (ii) detection whether a loss is indeed new and (iii) adding a new loss interval record to the LI database
can all be done in one step - as a service provided by the tfrc_lib module.
A nice feature is on-demand allocation, i.e. loss-free connections have very little memory consumption.

Patch #16: Basic ringbuffer structure (just declarations and some inline test/initialisation functions).

Patch #17: Access macros to encapsulate access to the internals of the structure.

Patch #18: Slab cache on-demand allocation and de-allocation. There is one central slab cache which works
as `array factory' for all clients. No memory is allocated when the connection is loss-free.

Patch #19: Routines for computing and updating I_mean as required by RFC 3448, 6. Since this is a TFRC
mechanism, it is also provided and exported as a service of the tfrc_lib module.

Patch #20: Insert and Update routines for the LI database, as well as support for CCVal-based decision
whether a loss is new (using the test from RFC 4342, 10.2).

Patch #21: Makes calculation of first loss interval local to the client of the tfrc_lib module. This is
better since the caller knows better its own variables.

Patch #22: Integrate the Loss Interval database with RX history so that they can talk to each other.

Patch #23: Fix header #includes so that services exported by tfrc_lib become accessible.

Patch #24: Hook up the new LI database with CCID3.

====================================================III. Miscellaneous CCID3 patches |
=================

Patch #25: Update copyrights - this is Ian's patch. I have added University of Aberdeen; they paid for this work.

Patch #26: Simplifies an often-repeated test for NULL by doing it centrally in the conversion/cast function.

Patch #27: Bug fix - handle CCID3 "Idle and Application-Limited Periods" correctly. This wasn't done correctly
in the current code. The actual interface is open to debate/modularisation. For now, I have used the definition of idleness from rfc3448bis -- found this a useful one.

Patch #28: Bug fix - X_recv was not computed over the last R_m seconds as required by RFC 3448, 6. The solution
used by this patch also makes the feedback handling more transparent, by using explicit states.

Patch #29: Axe a few chars from the long variable name hcrx->ccid3hcrx_tstamp_last_feedback.

====================================================IV. Work on DCCP States |
============This contains updates to the internal naming and handling of states. It clarifies the interrelation with TCP statenames, and adds the two new states PASSIVE_1/PASSIVE_2 which are necessary to handle passive-close correctly (blurb is on http://www.erg.abdn.ac.uk/users/gerrit/dccp/docs/closing_states/ )
During the past days I have been leaning over backwards to try and make this break. I could not find any way to create a crashing or sick termination, it terminates cleanly in many settings now. But it could still be that I missed something, I'd be grateful for any comments and suggestions.

Patch #30: Insert a divider to the DCCP-states enum, to separate specific from general states.

Patch #31: Decouples PARTOPEN from TCP-specific stream-states, as suggested by a FIXME-comment.

Patch #32: Implement dedicated PASSIVE_1/2 states to support passive-close.

Patch #33: Integrate the new states from #32 and add necessary state transitions.

Patch #34: Perform both SHUT_RD and SHUT_WR on close (to respect DCCP's absence of half-close).

Patch #35: When the node is in state CLOSING, no more data is accepted (in the same spirit as #34).

Patch #36: Shift retransmit timer for active-close from proto.c into output.c.

Patch #37: Use the maximum RTO from RFC spec (64 secs instead of TCP 120 sec); another Fixme.

Patch #38: Support for server holding TIMEWAIT state - as in the RFC

Patch #39: Protect against Reset/Sync floods. This will happen when client crashes during connection.

Patch #40: Collapse repeated `len' statements into one.

====================================================IV. Work on DCCP abnormal termination | ===================Some missing bits are added to support active reset when a client crashes or is terminated with a SO_LINGER time of 0; the API now behaves as in TCP.

Patch #41: Check for unread data on close (same handling now as in TCP).

Patch #42: Implement TCP-like ABORT function.

====================================================V. Last |
====
Patch #43: Update API Documentation.