aboutsummaryrefslogtreecommitdiffstats
path: root/app/nginx/src/tldk/module.c
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2019-11-04 13:50:31 +0000
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2019-12-31 11:51:05 +0000
commitb8f1ef2b02b8709c72408ee4803f442efc9f4576 (patch)
tree95a16adc465206d351cbf1b823f793c7592f00e7 /app/nginx/src/tldk/module.c
parent47eb00f25ab06a699dc27507814c7656940340af (diff)
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
Diffstat (limited to 'app/nginx/src/tldk/module.c')
-rw-r--r--app/nginx/src/tldk/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/nginx/src/tldk/module.c b/app/nginx/src/tldk/module.c
index 67d9746..8736529 100644
--- a/app/nginx/src/tldk/module.c
+++ b/app/nginx/src/tldk/module.c
@@ -95,6 +95,8 @@ init_context(struct tldk_ctx *tcx, const struct tldk_ctx_conf *cf,
cprm.socket_id = sid;
cprm.proto = TLE_PROTO_TCP;
cprm.max_streams = cf->nb_stream;
+ cprm.free_streams.min = cf->free_streams.nb_min;
+ cprm.free_streams.max = cf->free_streams.nb_max;
cprm.max_stream_rbufs = cf->nb_rbuf;
cprm.max_stream_sbufs = cf->nb_sbuf;
if (cf->be_in_worker != 0)