From a3a489691d7f2813702fae2d915120743b860d62 Mon Sep 17 00:00:00 2001 From: hanlin Date: Mon, 13 Jul 2020 11:09:15 +0800 Subject: vcl: support multi-threads with session migration Currently, mutlti-threads only support one dispatch thread and multiple worker threads, eventually only dispatch thread is a vcl worker and can interact with epoll. This patch will register all threads as vcl worker, and then each thread can interact with epoll now. Moreover, session migration also supported, such as socket created in thread A and used (bind, connect and etc.) in thread B. Type: feature Signed-off-by: hanlin Change-Id: Iab0b43a33466968c1423d7d20faf1460c8589d91 --- src/vcl/vcl_cfg.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/vcl/vcl_cfg.c') diff --git a/src/vcl/vcl_cfg.c b/src/vcl/vcl_cfg.c index 2ae940170b7..a94c874532f 100644 --- a/src/vcl/vcl_cfg.c +++ b/src/vcl/vcl_cfg.c @@ -498,6 +498,11 @@ vppcom_cfg_read_file (char *conf_fname) VCFG_DBG (0, "VCL<%d>: configured tls-engine %u (0x%x)", getpid (), vcl_cfg->tls_engine, vcl_cfg->tls_engine); } + else if (unformat (line_input, "multi-thread")) + { + vcl_cfg->mt_supported = 1; + VCFG_DBG (0, "VCL<%d>: configured with multithread", getpid ()); + } else if (unformat (line_input, "}")) { vc_cfg_input = 0; -- cgit 1.2.3-korg