diff options
author | Florin Coras <fcoras@cisco.com> | 2018-06-10 14:41:23 -0700 |
---|---|---|
committer | Marco Varlese <marco.varlese@suse.de> | 2018-06-11 14:08:20 +0000 |
commit | 40903ac34f89d9e2ad775e98b7bcec5b7feb0207 (patch) | |
tree | 550a152e6a9359248ec50ffbeb0063b564bbcb48 /src/vnet/session-apps/echo_client.c | |
parent | d723161e038d00e59766aa67a6a0dcc350227e4b (diff) |
udp: fix for multiple workers and add test
Since the main thread is not used for session polling anymore, when vpp
is started with multiple wokers, allocate connections on the first. Also
add a simple udp make test.
Change-Id: Id869f5d89e0fced51048f0384fa86a5022258b7c
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session-apps/echo_client.c')
-rw-r--r-- | src/vnet/session-apps/echo_client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/session-apps/echo_client.c b/src/vnet/session-apps/echo_client.c index 1d010f23d4d..6ee91f9c54b 100644 --- a/src/vnet/session-apps/echo_client.c +++ b/src/vnet/session-apps/echo_client.c @@ -369,7 +369,7 @@ echo_clients_session_connected_callback (u32 app_index, u32 api_context, echo_client_main_t *ecm = &echo_client_main; eclient_session_t *session; u32 session_index; - u8 thread_index = vlib_get_thread_index (); + u8 thread_index = s->thread_index; if (is_fail) { @@ -378,7 +378,8 @@ echo_clients_session_connected_callback (u32 app_index, u32 api_context, return 0; } - ASSERT (s->thread_index == thread_index); + ASSERT (thread_index == vlib_get_thread_index () + || session_transport_service_type (s) == TRANSPORT_SERVICE_CL); if (!ecm->vpp_event_queue[thread_index]) ecm->vpp_event_queue[thread_index] = |