summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorKommula Shiva Shankar <kshankar@marvell.com>2021-01-28 13:05:59 +0530
committerDave Barach <openvpp@barachs.net>2021-01-29 12:51:10 +0000
commitced43e28ed89172f68de5655d114b289233b2581 (patch)
treee6806dbceae2ed99fce79cd0b3c8fb82963a6495 /src/vlib
parent6a6555ac34cf1c74cb3d82ae3b77232797c73b6a (diff)
vlib: acquire barrier before exit call
Type: fix A plugin exit callback function registered via VLIB_MAIN_LOOP_EXIT_FUNCTION() is called without stopping worker cores doing data path processing. Following error is observed while exiting vpp. error log: vppctl# q 0: /vpp_master/src/vnet/interface.c:1058 (vnet_delete_hw_interface) assertion `ii == 0 || this_vlib_main->parked_at_barrier == 1' fails This patch calls all exit() functions after acquiring barrier Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com> Reviewed-by: Nitin Saxena <nsaxena@marvell.com> Change-Id: I2fd565f0afaa62cb0fb0389922f49e4d382f028c
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c
index c76d874e991..77c69794d0f 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -2246,6 +2246,7 @@ vlib_main (vlib_main_t * volatile vm, unformat_input_t * input)
vlib_main_loop (vm);
done:
+ vlib_worker_thread_barrier_sync (vm);
/* Call all exit functions. */
{
clib_error_t *sub_error;
@@ -2253,6 +2254,7 @@ done:
if (sub_error)
clib_error_report (sub_error);
}
+ vlib_worker_thread_barrier_release (vm);
if (error)
clib_error_report (error);