From 3aec660e814f470cc9453e69231cbe3102fd2a4c Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 28 Sep 2020 20:04:57 +0200 Subject: lib: Add compiler configuration for FRCP This allows configuring some parameters for FRCP at compile time, such as default values for Delta-t and configuration of the timerwheel. The timerwheel will now reschedule when it fails to create a packet, instead of setting the flow down immediately. Some new things added are options to store packets for retransmission on the heap, and using non-blocking calls for retransmission. The defaults do not change the current behaviour. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/config.h.in | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/lib/config.h.in') diff --git a/src/lib/config.h.in b/src/lib/config.h.in index 7cac76a6..38c364c6 100644 --- a/src/lib/config.h.in +++ b/src/lib/config.h.in @@ -55,7 +55,7 @@ #cmakedefine HAVE_FUSE #ifdef HAVE_FUSE -#define FUSE_PREFIX "@FUSE_PREFIX@" +#define FUSE_PREFIX "@FUSE_PREFIX@" #endif #define PTHREAD_COND_CLOCK @PTHREAD_COND_CLOCK@ @@ -67,4 +67,26 @@ #define DU_BUFF_HEADSPACE @DU_BUFF_HEADSPACE@ #define DU_BUFF_TAILSPACE @DU_BUFF_TAILSPACE@ -#define RTO_MIN @FRCT_RTO_MIN@ +/* Default Delta-t parameters */ +#define DELT_MPL (@DELTA_T_MPL@ * BILLION) /* ns */ +#define DELT_A (@DELTA_T_ACK@ * BILLION) /* ns */ +#define DELT_R (@DELTA_T_RTX@ * BILLION) /* ns */ + +#define DELT_ACK (@DELTA_T_ACK_DELAY@ * MILLION) /* ns */ + +#define RQ_SIZE (@FRCT_REORDER_QUEUE_SIZE@) +#define RTO_MIN (@FRCT_RTO_MIN@ * 1000) + +#define TICTIME (@FRCT_TICK_TIME@ * 1000) /* ns */ + +/* Retransmission tuning */ +#cmakedefine RXM_BUFFER_ON_HEAP +#cmakedefine RXM_BLOCKING + +#define RXMQ_RES (@RXM_MIN_RESOLUTION@) /* 2^N ns */ +#define RXMQ_BUMP (@RXM_WHEEL_MULTIPLIER@) +#define RXMQ_LVLS (@RXM_WHEEL_LEVELS@) +#define RXMQ_SLOTS (@RXM_WHEEL_SLOTS_PER_LEVEL@) + +#define ACKQ_SLOTS (@ACK_WHEEL_SLOTS@) +#define ACKQ_RES (@ACK_WHEEL_RESOLUTION@) /* 2^N ns */ -- cgit v1.2.3