From 1e3a9e464cbb2f02c057e9f63c1f270ff27530f4 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 20 Sep 2020 13:04:52 +0200 Subject: 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 Signed-off-by: Sander Vrijders --- src/irmd/ipcp.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/irmd/ipcp.h') diff --git a/src/irmd/ipcp.h b/src/irmd/ipcp.h index ae00792b..652316ba 100644 --- a/src/irmd/ipcp.h +++ b/src/irmd/ipcp.h @@ -85,7 +85,8 @@ int ipcp_flow_alloc_resp(pid_t pid, const void * data, size_t len); -int ipcp_flow_dealloc(pid_t pid, - int flow_id); +int ipcp_flow_dealloc(pid_t pid, + int flow_id, + time_t timeo); #endif /* OUROBOROS_IRMD_IPCP_H */ -- cgit v1.2.3