diff options
author | Florin Coras <fcoras@cisco.com> | 2018-10-30 12:01:48 -0700 |
---|---|---|
committer | Marco Varlese <marco.varlese@suse.de> | 2018-10-31 08:17:33 +0000 |
commit | 5a7ca7bde104b12f8dc4a751fd911819d4bd6c8e (patch) | |
tree | c554ef8c3e544cb7c4a9134b4ac27da02c1f15a9 /src/vnet/session/session_cli.c | |
parent | 1bce5a92087fc0caffe7723d2f2de7f1bf296046 (diff) |
session: add wrk context
Change-Id: I66ca0ddea872948507d078e405eb90f9f3a0e897
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_cli.c')
-rwxr-xr-x | src/vnet/session/session_cli.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c index 6ca090a8508..d6350c62779 100755 --- a/src/vnet/session/session_cli.c +++ b/src/vnet/session/session_cli.c @@ -244,7 +244,7 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input, sst = session_type_from_proto_and_ip (transport_proto, 1); vlib_cli_output (vm, "%-40s%-24s", "Listener", "App"); /* *INDENT-OFF* */ - pool_foreach (s, smm->sessions[0], ({ + pool_foreach (s, smm->wrk[0].sessions, ({ if (s->session_state != SESSION_STATE_LISTENING || s->session_type != sst) continue; @@ -257,10 +257,10 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } - for (i = 0; i < vec_len (smm->sessions); i++) + for (i = 0; i < vec_len (smm->wrk); i++) { u32 once_per_pool; - pool = smm->sessions[i]; + pool = smm->wrk[0].sessions; once_per_pool = 1; @@ -323,8 +323,9 @@ clear_session_command_fn (vlib_main_t * vm, unformat_input_t * input, { session_manager_main_t *smm = &session_manager_main; u32 thread_index = 0, clear_all = 0; + session_manager_worker_t *wrk; u32 session_index = ~0; - stream_session_t **pool, *session; + stream_session_t *session; if (!smm->is_enabled) { @@ -359,9 +360,9 @@ clear_session_command_fn (vlib_main_t * vm, unformat_input_t * input, if (clear_all) { /* *INDENT-OFF* */ - vec_foreach (pool, smm->sessions) + vec_foreach (wrk, smm->wrk) { - pool_foreach(session, *pool, ({ + pool_foreach(session, wrk->sessions, ({ clear_session (session); })); }; |