aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/udp/udp.c')
-rw-r--r--src/vnet/udp/udp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index 1878d2ed083..40e0053bb96 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -375,8 +375,7 @@ conn_alloc:
udp_connection_register_port (vm, lcl_port, rmt->is_ip4);
/* We don't poll main thread if we have workers */
- if (vlib_num_workers ())
- thread_index = 1;
+ thread_index = transport_cl_thread ();
uc = udp_connection_alloc (thread_index);
ip_copy (&uc->c_rmt_ip, &rmt->ip, rmt->is_ip4);
@@ -408,7 +407,7 @@ udp_session_get_half_open (u32 conn_index)
u32 thread_index;
/* We don't poll main thread if we have workers */
- thread_index = vlib_num_workers ()? 1 : 0;
+ thread_index = transport_cl_thread ();
uc = udp_connection_get (conn_index, thread_index);
if (!uc)
return 0;