aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_test_server.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-08-31 14:31:41 -0700
committerDamjan Marion <dmarion@me.com>2018-09-06 08:35:51 +0000
commitab2f6dbf9f7b7164a9810f4c80c8abf8463e42ad (patch)
tree7fb4dd4c70bef17f09a88130eeadeeca86b6d09c /src/vcl/vcl_test_server.c
parented234e7f151b05a5b8375dbd9f0add24fe8ebf2f (diff)
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 <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vcl_test_server.c')
-rw-r--r--src/vcl/vcl_test_server.c6
1 files changed, 3 insertions, 3 deletions
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 ();