It is important to stop the working threads while
some operations are performed on the working threads.
This is a backport of a fix brought in commit
e21c52861d.
This should solve Jira ticket VPP526
Change-Id: I6deb27f5de44f0f19401161ee6adecaba86dae1a
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
n = recvmsg (uf->file_descriptor, &mh, 0);
+ /* Stop workers to avoid end of the world */
+ vlib_worker_thread_barrier_sync (vlib_get_main ());
+
if (n != VHOST_USER_MSG_HDR_SZ)
goto close_socket;
goto close_socket;
}
+ vlib_worker_thread_barrier_release (vlib_get_main ());
return 0;
close_socket:
vhost_user_if_disconnect (vui);
+ vlib_worker_thread_barrier_release (vlib_get_main ());
return 0;
}