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>
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index b7467bb..25b641d 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -408,12 +408,10 @@
*/
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;
}