From b8f1ef2b02b8709c72408ee4803f442efc9f4576 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Mon, 4 Nov 2019 13:50:31 +0000 Subject: 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 Change-Id: I7af6a76d64813ee4a535323e27ffbfd75037fc92 --- app/nginx/src/tldk/ngx_tldk.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/nginx/src/tldk/ngx_tldk.h') diff --git a/app/nginx/src/tldk/ngx_tldk.h b/app/nginx/src/tldk/ngx_tldk.h index ffd479b..ed6ae35 100644 --- a/app/nginx/src/tldk/ngx_tldk.h +++ b/app/nginx/src/tldk/ngx_tldk.h @@ -86,6 +86,10 @@ struct tldk_ctx_conf { uint32_t lcore; uint32_t nb_mbuf; uint32_t nb_stream; + struct { + uint32_t nb_min; + uint32_t nb_max; + } free_streams; uint32_t nb_rbuf; uint32_t nb_sbuf; uint32_t nb_dev; -- cgit 1.2.3-korg