From 7e78119c257579731c8902556b4a197c3fc3e92e Mon Sep 17 00:00:00 2001 From: liuyacan Date: Mon, 14 Jun 2021 18:09:01 +0800 Subject: tcp: prevent timer handler being called frequently In the current implement, tcp would start or up an one tick retransmit timer for that connection if vlib_buffer_alloc() return 0. Now the tick is 0.1ms, this means that if VPP is in a buffer shortage state, there would be a large number of burst timer expirations. This commit limits the minimum interval of the retransmission timer to 100ms. Type: fix Signed-off-by: liuyacan Change-Id: Ia11d693fe46119c5dc16b24ca93c30c31109057a --- src/vnet/tcp/tcp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/vnet/tcp/tcp.c') diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index 0ceac828d2d..c70a44cae90 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -1590,6 +1590,7 @@ tcp_configuration_init (void) tcp_cfg.lastack_time = 300000; /* 30s */ tcp_cfg.finwait2_time = 300000; /* 30s */ tcp_cfg.closing_time = 300000; /* 30s */ + tcp_cfg.alloc_err_timeout = 1000; /* 100ms */ /* This value is seconds */ tcp_cfg.cleanup_time = 0.1; /* 100ms */ -- cgit 1.2.3-korg