diff options
author | Florin Coras <fcoras@cisco.com> | 2018-10-13 12:20:01 -0700 |
---|---|---|
committer | Marco Varlese <marco.varlese@suse.de> | 2018-10-16 10:05:33 +0000 |
commit | aa27eb95b7ee3bb69b62166d5e418e973cbbdcfa (patch) | |
tree | bd0bd4a71417ac33c0bf271db5df85081f8d56ff /src/vnet | |
parent | 97748cae2e6261d8fdc7c331a4d82828ac51ed81 (diff) |
vcl: fix bidirectional tests (VPP-1455)
- add epoll dequeued events beyond maxevents to unhandled
- filter multiple epoll rx events
Change-Id: I618f5f02b19581473de891b3b59bb6a0faad10b5
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rwxr-xr-x | src/vnet/session/session_api.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c index e82be560b1f..56593865381 100755 --- a/src/vnet/session/session_api.c +++ b/src/vnet/session/session_api.c @@ -278,30 +278,6 @@ send_session_accept_callback (stream_session_t * s) return 0; } -void -mq_send_local_session_disconnected_cb (u32 app_wrk_index, - local_session_t * ls) -{ - app_worker_t *app_wrk = app_worker_get (app_wrk_index); - svm_msg_q_msg_t _msg, *msg = &_msg; - session_disconnected_msg_t *mp; - svm_msg_q_t *app_mq; - session_event_t *evt; - application_t *app; - - app = application_get (app_wrk->app_index); - app_mq = app_wrk->event_queue; - svm_msg_q_lock_and_alloc_msg_w_ring (app_mq, SESSION_MQ_CTRL_EVT_RING, - SVM_Q_WAIT, msg); - evt = svm_msg_q_msg_data (app_mq, msg); - memset (evt, 0, sizeof (*evt)); - evt->event_type = SESSION_CTRL_EVT_DISCONNECTED; - mp = (session_disconnected_msg_t *) evt->data; - mp->handle = application_local_session_handle (ls); - mp->context = app->api_client_index; - svm_msg_q_add_and_unlock (app_mq, msg); -} - static void send_session_disconnect_callback (stream_session_t * s) { @@ -551,6 +527,30 @@ mq_send_session_disconnected_cb (stream_session_t * s) svm_msg_q_add_and_unlock (app_mq, msg); } +void +mq_send_local_session_disconnected_cb (u32 app_wrk_index, + local_session_t * ls) +{ + app_worker_t *app_wrk = app_worker_get (app_wrk_index); + svm_msg_q_msg_t _msg, *msg = &_msg; + session_disconnected_msg_t *mp; + svm_msg_q_t *app_mq; + session_event_t *evt; + application_t *app; + + app = application_get (app_wrk->app_index); + app_mq = app_wrk->event_queue; + if (mq_try_lock_and_alloc_msg (app_mq, msg)) + return; + evt = svm_msg_q_msg_data (app_mq, msg); + memset (evt, 0, sizeof (*evt)); + evt->event_type = SESSION_CTRL_EVT_DISCONNECTED; + mp = (session_disconnected_msg_t *) evt->data; + mp->handle = application_local_session_handle (ls); + mp->context = app->api_client_index; + svm_msg_q_add_and_unlock (app_mq, msg); +} + static void mq_send_session_reset_cb (stream_session_t * s) { |