From ab2f6dbf9f7b7164a9810f4c80c8abf8463e42ad Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Fri, 31 Aug 2018 14:31:41 -0700 Subject: session: support multiple worker binds Allows app workers to listen on the same session endpoint. Incoming connects are spread across the workers in a round-robin fashion Change-Id: Ib5f5817230d9abc6127a85cdbdcad70d980c0f7f Signed-off-by: Florin Coras --- src/vcl/vcl_test_server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vcl/vcl_test_server.c') diff --git a/src/vcl/vcl_test_server.c b/src/vcl/vcl_test_server.c index 8b8b77fab2c..d1f2db72872 100644 --- a/src/vcl/vcl_test_server.c +++ b/src/vcl/vcl_test_server.c @@ -472,10 +472,9 @@ vcl_test_server_handle_cfg (vcl_test_server_worker_t * wrk, break; case SOCK_TEST_TYPE_EXIT: - vtinf ("Have a great day conn %d!", conn->fd); + vtinf ("Have a great day conn %d (closing)!", conn->fd); vppcom_session_close (conn->fd); conn_pool_free (conn); - vtinf ("Closed client fd %d", conn->fd); wrk->nfds--; break; @@ -644,6 +643,7 @@ main (int argc, char **argv) clib_mem_init_thread_safe (0, 64 << 20); ssm->cfg.port = SOCK_TEST_SERVER_PORT; ssm->cfg.workers = 1; + ssm->active_workers = 1; vcl_test_server_process_opts (ssm, argc, argv); rv = vppcom_app_create ("vcl_test_server"); @@ -661,7 +661,7 @@ main (int argc, char **argv) } vcl_test_server_worker_loop (&ssm->workers[0]); - while (ssm->active_workers) + while (ssm->active_workers > 0) ; vppcom_app_destroy (); -- cgit 1.2.3-korg