diff options
author | Dimitri Staessens <[email protected]> | 2020-10-11 14:42:16 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2020-10-11 14:47:52 +0200 |
commit | 3294170daecaf14a43e97d4e435d4ed0308444f8 (patch) | |
tree | 349075344cdc08681fa2491ab7bf0b4c32b730b7 /src/lib/dev.c | |
parent | da871be70c8039015edfe93d4581e3b9347ff882 (diff) | |
download | ouroboros-3294170daecaf14a43e97d4e435d4ed0308444f8.tar.gz ouroboros-3294170daecaf14a43e97d4e435d4ed0308444f8.zip |
lib: Add Rendez-Vous mechanism for flow control
This adds the rendez-vous mechanism to handle the case where the
sending window is closed and window updates get lost. If the sending
window is closed, the sender side will send an RDVS every DELT_RDV
time (100ms), and give up after MAX_RDV time (1 second). Upon
reception of a RDVS packet, a window update is sent immediately. We
can make this much more configurable later on (build options for
defaults, fccntl for runtime tuning).
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r-- | src/lib/dev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c index ca004aa4..4b78c1db 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -1058,8 +1058,7 @@ ssize_t flow_write(int fd, return -EAGAIN; idx = shm_rdrbuff_alloc(ai.rdrb, count, &ptr, &sdb); } else { - while((ret = frcti_window_wait(flow->frcti, &tictime)) < 0) { - + while ((ret = frcti_window_wait(flow->frcti, &tictime)) < 0) { if (ret != -ETIMEDOUT) return ret; |