summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-07-17 10:46:29 -0700
committerFlorin Coras <florin.coras@gmail.com>2018-07-27 17:40:29 +0000
commit54693d23307ce8944a4d97379efd3bd4dcf0485c (patch)
tree14ee8cded17a87405de9c0cc9ba3fe7370aabc7f /src/vnet/session/session_api.c
parent5df580eec93c0c6fc07dd38f8713f671565b9c38 (diff)
vcl: use events for epoll/select/read/write
Have vcl poll and wait on the event message queues as opposed to constantly polling the session fifos. This also adds event signaling to cut through sessions. On the downside, because we can't wait on multiple condvars, i.e., when we have multiple message queues because of cut-through registrations, we do timed waits. Change-Id: I29ade95dba449659fe46008bb1af502276a7c5fd Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_api.c')
-rwxr-xr-xsrc/vnet/session/session_api.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 724aff1598d..8585b57b030 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -435,7 +435,9 @@ mq_send_session_accepted_cb (stream_session_t * s)
}
mp->handle = application_local_session_handle (ls);
mp->port = ls->port;
- mp->vpp_event_queue_address = ls->client_evt_q;
+ vpp_queue = session_manager_get_vpp_event_queue (0);
+ mp->vpp_event_queue_address = pointer_to_uword (vpp_queue);
+ mp->client_event_queue_address = ls->client_evt_q;
mp->server_event_queue_address = ls->server_evt_q;
}
svm_msg_q_add (app_mq, msg, SVM_Q_WAIT);
@@ -541,8 +543,10 @@ mq_send_session_connected_cb (u32 app_index, u32 api_context,
local_session_t *ls = (local_session_t *) s;
mp->handle = application_local_session_handle (ls);
mp->lcl_port = ls->port;
- mp->vpp_event_queue_address = ls->server_evt_q;
+ vpp_mq = session_manager_get_vpp_event_queue (0);
+ mp->vpp_event_queue_address = pointer_to_uword (vpp_mq);
mp->client_event_queue_address = ls->client_evt_q;
+ mp->server_event_queue_address = ls->server_evt_q;
mp->server_rx_fifo = pointer_to_uword (s->server_tx_fifo);
mp->server_tx_fifo = pointer_to_uword (s->server_rx_fifo);
}