v6: make TCP stream alloc/free to use memtank API 19/23219/7
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Mon, 4 Nov 2019 13:50:31 +0000 (13:50 +0000)
committerKonstantin Ananyev <konstantin.ananyev@intel.com>
Tue, 31 Dec 2019 11:51:05 +0000 (11:51 +0000)
commitb8f1ef2b02b8709c72408ee4803f442efc9f4576
tree95a16adc465206d351cbf1b823f793c7592f00e7
parent47eb00f25ab06a699dc27507814c7656940340af
v6: make TCP stream alloc/free to use memtank API

Introduce two extra parameters for TCP context creation:
struct {
uint32_t min;
/**< min number of free streams (grow threshold). */
uint32_t max;
/**< max number of free streams (shrink threshold). */
} free_streams;

By default these params are equal to max_streams value
(avoid dynamic allocation and preserve current beahviour).

grow() is invoked from accept() FE call to refill streams tank for BE.
shrink() is invoked from close() FE call.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Change-Id: I7af6a76d64813ee4a535323e27ffbfd75037fc92
15 files changed:
app/nginx/auto/modules
app/nginx/src/tldk/module.c
app/nginx/src/tldk/ngx_tldk.h
app/nginx/src/tldk/parse.c
examples/l4fwd/Makefile
lib/libtle_l4p/Makefile
lib/libtle_l4p/ctx.c
lib/libtle_l4p/tcp_ctl.h
lib/libtle_l4p/tcp_rxtx.c
lib/libtle_l4p/tcp_stream.c
lib/libtle_l4p/tcp_stream.h
lib/libtle_l4p/tle_ctx.h
lib/libtle_l4p/udp_stream.c
test/gtest/Makefile
test/gtest/test_tle_tcp_stream.h