summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_cli.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-11-13 15:52:38 -0800
committerDamjan Marion <dmarion@me.com>2018-11-18 19:46:38 +0000
commit053a0e44edb21713e0825f9c09ba4af12e686b38 (patch)
tree950e303daf1b367eab26cc823c0efc23ae170b1d /src/vnet/session/session_cli.c
parent0c4fec0134f32bc913299b37d048a99293b1a851 (diff)
vcl/session: apps with process workers
Allow apps to register child processes as app workers. In particular, on fork vcl now registers the child process with vpp as a new worker. Change-Id: I52a65fbc3292962b1f6e1fe0f6153f739e6e0d4a Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_cli.c')
-rwxr-xr-xsrc/vnet/session/session_cli.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index 651abe17597..3fe49917feb 100755
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -205,10 +205,12 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input,
vlib_cli_command_t * cmd)
{
session_manager_main_t *smm = &session_manager_main;
- u8 *str = 0, one_session = 0, do_listeners = 0, sst, *app_name;
- int verbose = 0, i;
+ u8 *str = 0, one_session = 0, do_listeners = 0, sst;
stream_session_t *pool, *s;
u32 transport_proto = ~0;
+ app_worker_t *app_wrk;
+ int verbose = 0, i;
+ const u8 *app_name;
if (!smm->is_enabled)
{
@@ -248,10 +250,10 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input,
if (s->session_state != SESSION_STATE_LISTENING
|| s->session_type != sst)
continue;
- app_name = application_name_from_index (s->app_wrk_index);
+ app_wrk = app_worker_get (s->app_wrk_index);
+ app_name = application_name_from_index (app_wrk->app_index);
vlib_cli_output (vm, "%U%-25v%", format_stream_session, s, 1,
app_name);
- vec_free (app_name);
}));
/* *INDENT-ON* */
return 0;