tcp: prevent timer handler being called frequently 18/32718/3
authorliuyacan <liuyacan@corp.netease.com>
Mon, 14 Jun 2021 10:09:01 +0000 (18:09 +0800)
committerFlorin Coras <florin.coras@gmail.com>
Tue, 15 Jun 2021 05:27:32 +0000 (05:27 +0000)
commit7e78119c257579731c8902556b4a197c3fc3e92e
tree2b8d7512b16aeb4ee76bfa3c0f47bf8a8a61afe7
parent4d37bf9821d469f2c96ec3b2ddf8940320d9aa69
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 <liuyacan@corp.netease.com>
Change-Id: Ia11d693fe46119c5dc16b24ca93c30c31109057a
src/vnet/tcp/tcp.c
src/vnet/tcp/tcp.h
src/vnet/tcp/tcp_cli.c
src/vnet/tcp/tcp_output.c