aboutsummaryrefslogtreecommitdiffstats
path: root/app/nginx
diff options
context:
space:
mode:
Diffstat (limited to 'app/nginx')
-rw-r--r--app/nginx/auto/modules7
-rw-r--r--app/nginx/src/tldk/module.c2
-rw-r--r--app/nginx/src/tldk/ngx_tldk.h4
-rw-r--r--app/nginx/src/tldk/parse.c12
4 files changed, 22 insertions, 3 deletions
diff --git a/app/nginx/auto/modules b/app/nginx/auto/modules
index f1791c9..cdba3a8 100644
--- a/app/nginx/auto/modules
+++ b/app/nginx/auto/modules
@@ -1239,9 +1239,10 @@ if [ $USE_TLDK = YES ]; then
src/tldk/tldk_event.c
src/tldk/parse.c"
ngx_module_libs="-L${TLDK_ROOT}/${RTE_TARGET}/lib -Wl,--whole-archive
- -ltle_l4p -ltle_dring -ltle_timer -Wl,--no-whole-archive
- -L${RTE_SDK}/${RTE_TARGET}/lib -Wl,--whole-archive -ldpdk
- -lm -lpcap -lnuma -Wl,--no-whole-archive"
+ -ltle_l4p -ltle_dring -ltle_memtank -ltle_timer
+ -Wl,--no-whole-archive -L${RTE_SDK}/${RTE_TARGET}/lib
+ -Wl,--whole-archive -ldpdk -lm -lpcap -lnuma
+ -Wl,--no-whole-archive"
ngx_module_link=YES
ngx_module_order=
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)
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;
diff --git a/app/nginx/src/tldk/parse.c b/app/nginx/src/tldk/parse.c
index 5d71d9e..6e20b1b 100644
--- a/app/nginx/src/tldk/parse.c
+++ b/app/nginx/src/tldk/parse.c
@@ -413,6 +413,18 @@ tldk_ctx_parse(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
&pvl) < 0)
return NGX_CONF_ERROR;
tcx->nb_stream = pvl.u64;
+ } else if (ngx_strcmp(v[0].data, "min_free_streams") == 0) {
+ if (cf->args->nelts != 2 ||
+ parse_uint_val((const char *)v[1].data,
+ &pvl) < 0)
+ return NGX_CONF_ERROR;
+ tcx->free_streams.nb_min = pvl.u64;
+ } else if (ngx_strcmp(v[0].data, "max_free_streams") == 0) {
+ if (cf->args->nelts != 2 ||
+ parse_uint_val((const char *)v[1].data,
+ &pvl) < 0)
+ return NGX_CONF_ERROR;
+ tcx->free_streams.nb_max = pvl.u64;
} else if (ngx_strcmp(v[0].data, "rbufs") == 0) {
if (cf->args->nelts != 2 ||
parse_uint_val((const char *)v[1].data,