summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/segment_manager.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-04 10:56:23 -0800
committerDave Barach <openvpp@barachs.net>2019-03-06 17:53:39 +0000
commit653e43f06a974121343b2c1f0e4533926020877b (patch)
tree6ab92561e8eccbda6b29316f794de531032a1259 /src/vnet/session/segment_manager.c
parenta55df1081762b4e40698ef7d9196551851be646a (diff)
session: use vpp to switch io events for ct sessions
Instead of allocating pairs of message queues per cut-thru session and having the applications map them, this uses vpp as an io event message switch. Change-Id: I51db1c7564df479a7d1a3288342394251fd188bb Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/segment_manager.c')
-rw-r--r--src/vnet/session/segment_manager.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index b7467bbbd43..25b641de167 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -408,12 +408,10 @@ segment_manager_del_sessions (segment_manager_t * sm)
*/
while (fifo)
{
- if (fifo->ct_session_index != SVM_FIFO_INVALID_SESSION_INDEX)
- session = session_get (fifo->ct_session_index, 0);
- else
- session = session_get (fifo->master_session_index,
- fifo->master_thread_index);
- vec_add1 (handles, session_handle (session));
+ session = session_get_if_valid (fifo->master_session_index,
+ fifo->master_thread_index);
+ if (session)
+ vec_add1 (handles, session_handle (session));
fifo = fifo->next;
}