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_cli.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vnet/tcp/tcp_cli.c') diff --git a/src/vnet/tcp/tcp_cli.c b/src/vnet/tcp/tcp_cli.c index 6d7b7c8ce40..c11b154cebf 100644 --- a/src/vnet/tcp/tcp_cli.c +++ b/src/vnet/tcp/tcp_cli.c @@ -1118,6 +1118,8 @@ tcp_config_fn (vlib_main_t * vm, unformat_input_t * input) tcp_cfg.lastack_time = tmp_time / TCP_TIMER_TICK; else if (unformat (input, "closing-time %u", &tmp_time)) tcp_cfg.closing_time = tmp_time / TCP_TIMER_TICK; + else if (unformat (input, "alloc-err-timeout %u", &tmp_time)) + tcp_cfg.alloc_err_timeout = tmp_time / TCP_TIMER_TICK; else if (unformat (input, "cleanup-time %u", &tmp_time)) tcp_cfg.cleanup_time = tmp_time / 1000.0; else -- cgit 1.2.3-korg