aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-10-08 16:59:54 -0700
committerDave Barach <openvpp@barachs.net>2020-10-12 15:05:14 +0000
commit70edc1c48724a0007f671a4ef53e982dbb5b87a9 (patch)
tree369bd3f7519d8c2e65afbb3133d241c2eb2497e6 /src/vnet
parentd1cc38d5ad6d50de7e5589bda8ad68a6bf2c84a2 (diff)
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 <fcoras@cisco.com> Change-Id: I4050f7691aa7365b77298b4427408a4a447834fa
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/tcp/tcp_types.h8
1 files changed, 4 insertions, 4 deletions
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