summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_cli.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-30 12:01:48 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-10-31 08:17:33 +0000
commit5a7ca7bde104b12f8dc4a751fd911819d4bd6c8e (patch)
treec554ef8c3e544cb7c4a9134b4ac27da02c1f15a9 /src/vnet/session/session_cli.c
parent1bce5a92087fc0caffe7723d2f2de7f1bf296046 (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-xsrc/vnet/session/session_cli.c13
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);
}));
};
0; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2017 Red Hat and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* Doxygen directory documentation */

/**
@dir
@brief Interface.

This is a high level directory which contains sub-directories for all the
networking protocols. Also contained within this directory are more generic
CLI command files such as interface management.

*/
/*? %%clicmd:group_label Interface %% ?*/
/*? %%syscfg:group_label Interface %% ?*/