From: Florin Coras Date: Thu, 8 Oct 2020 23:59:54 +0000 (-0700) Subject: tcp: use 100us timer resolution X-Git-Tag: v21.06-rc0~375 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=70edc1c48724a0007f671a4ef53e982dbb5b87a9;p=vpp.git tcp: use 100us timer resolution Experimental reduction of tcp timer resolution from 100ms that allows for finer grained timers, if needed. Please report issues if any encountered. Type: improvement Signed-off-by: Florin Coras Change-Id: I4050f7691aa7365b77298b4427408a4a447834fa --- diff --git a/src/vnet/tcp/tcp_types.h b/src/vnet/tcp/tcp_types.h index 0ffc036dc39..c4764312744 100644 --- a/src/vnet/tcp/tcp_types.h +++ b/src/vnet/tcp/tcp_types.h @@ -79,8 +79,8 @@ typedef enum _tcp_timers #define TCP_TIMER_HANDLE_INVALID ((u32) ~0) -#define TCP_TIMER_TICK 0.1 /**< Timer tick in seconds */ -#define TCP_TO_TIMER_TICK TCP_TICK*10 /**< Factor for converting +#define TCP_TIMER_TICK 0.0001 /**< Timer tick in seconds */ +#define TCP_TO_TIMER_TICK TCP_TICK*10000 /**< Factor for converting ticks to timer ticks */ #define TCP_RTO_MAX 60 * THZ /* Min max RTO (60s) as per RFC6298 */ @@ -463,8 +463,8 @@ tcp_get_connection_from_transport (transport_connection_t * tconn) #undef TW_START_STOP_TRACE_SIZE #define TW_TIMER_WHEELS 2 -#define TW_SLOTS_PER_RING 512 -#define TW_RING_SHIFT 9 +#define TW_SLOTS_PER_RING 1024 +#define TW_RING_SHIFT 10 #define TW_RING_MASK (TW_SLOTS_PER_RING -1) #define TW_TIMERS_PER_OBJECT 16 #define LOG2_TW_TIMERS_PER_OBJECT 4