dpdk: fix return variable size
[vpp.git] / src / vlibmemory / memory_client.c
index 3add39a..d002845 100644 (file)
@@ -100,8 +100,8 @@ static void
 vl_api_rx_thread_exit_t_handler (vl_api_rx_thread_exit_t * mp)
 {
   memory_client_main_t *mm = &memory_client_main;
-  vl_msg_api_free (mp);
-  longjmp (mm->rx_thread_jmpbuf, 1);
+  if (mm->rx_thread_jmpbuf_valid)
+    longjmp (mm->rx_thread_jmpbuf, 1);
 }
 
 static void
@@ -164,6 +164,7 @@ noop_handler (void *notused)
 {
 }
 
+void vl_msg_api_send_shmem (svm_queue_t * q, u8 * elem);
 int
 vl_client_connect (const char *name, int ctx_quota, int input_queue_size)
 {
@@ -468,6 +469,16 @@ vl_client_connect_to_vlib_no_map (const char *svm_name,
                                   0 /* dont map */ );
 }
 
+int
+vl_client_connect_to_vlib_no_rx_pthread_no_map (const char *svm_name,
+                                               const char *client_name,
+                                               int rx_queue_size)
+{
+  return connect_to_vlib_internal (svm_name, client_name, rx_queue_size,
+                                  0 /* want pthread */ ,
+                                  0 /* dont map */ );
+}
+
 static void
 disconnect_from_vlib_internal (u8 do_unmap)
 {