diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2020-09-20 13:04:52 +0200 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2020-09-25 11:52:51 +0200 |
commit | 1e3a9e464cbb2f02c057e9f63c1f270ff27530f4 (patch) | |
tree | 5193774eea2bb204d062cc47e178a3702d4790a4 /include | |
parent | 5f468ee5e02a0d63ed8ad7420ee1beda87e524d6 (diff) | |
download | ouroboros-1e3a9e464cbb2f02c057e9f63c1f270ff27530f4.tar.gz ouroboros-1e3a9e464cbb2f02c057e9f63c1f270ff27530f4.zip |
lib: Complete retransmission logic
This completes the retransmission (automated repeat-request, ARQ)
logic, sending (delayed) ACK messages when needed.
On deallocation, flows will ACK try to retransmit any remaining
unacknowledged messages (unless the FRCTFLINGER flag is turned off;
this is on by default). Applications can safely shut down as soon as
everything is ACK'd (i.e. the current Delta-t run is done). The
activity timeout is now passed to the IPCP for it to sleep before
completing deallocation (and releasing the flow_id). That should be
moved to the IRMd in due time.
The timerwheel is revised to be multi-level to reduce memory
consumption. The resolution bumps by a factor of 1 << RXMQ_BUMP (16)
and each level has RXMQ_SLOTS (1 << 8) slots. The lowest level has a
resolution of (1 << RXMQ_RES) (20) ns, which is roughly a
millisecond. Currently, 3 levels are defined, so the largest delay we
can schedule at each level is:
Level 0: 256ms
Level 1: 4s
Level 2: about a minute.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'include')
-rw-r--r-- | include/ouroboros/fccntl.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ouroboros/fccntl.h b/include/ouroboros/fccntl.h index 965e281d..ccd74b6c 100644 --- a/include/ouroboros/fccntl.h +++ b/include/ouroboros/fccntl.h @@ -48,6 +48,7 @@ /* FRCT flags */ #define FRCTFRESCNTRL 00000001 /* Feedback from receiver */ #define FRCTFRTX 00000002 /* Reliable flow */ +#define FRCTFLINGER 00000004 /* Sent unsent data */ /* Flow operations */ #define FLOWSRCVTIMEO 00000001 /* Set read timeout */ @@ -61,7 +62,8 @@ #define FLOWGTXQLEN 00000011 /* Get queue length on tx */ /* FRCT operations */ -#define FRCTGFLAGS 00001000 /* Get flags for FRCT */ +#define FRCTSFLAGS 00001000 /* Set flags for FRCT */ +#define FRCTGFLAGS 00002000 /* Get flags for FRCT */ __BEGIN_DECLS |