From dfdeef016f8f2d4f14a3c01d183bff6170dcdbb9 Mon Sep 17 00:00:00 2001 From: Vishwesh M Rudramuni Date: Thu, 5 Oct 2017 03:37:35 +0530 Subject: common code: KW fixes for common code This patch fixes KW issues seen with the common code. Change-Id: I4f90369152345ea2ea9316b04ac946c0c69fd7d1 Signed-off-by: Vishwesh M Rudramuni --- common/vnf_common/thread.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/vnf_common/thread.c') diff --git a/common/vnf_common/thread.c b/common/vnf_common/thread.c index dcf272ff..f6f1105f 100644 --- a/common/vnf_common/thread.c +++ b/common/vnf_common/thread.c @@ -59,6 +59,8 @@ do { \ #endif +uint32_t exit_app_thread = 0; + static inline void * thread_msg_recv(struct rte_ring *r) { @@ -226,6 +228,9 @@ app_thread(void *arg) uint32_t n_regular = RTE_MIN(t->n_regular, RTE_DIM(t->regular)); uint32_t n_custom = RTE_MIN(t->n_custom, RTE_DIM(t->custom)); + if (exit_app_thread) + break; + /* Run regular pipelines */ for (j = 0; j < n_regular; j++) { struct app_thread_pipeline_data *data = &t->regular[j]; -- cgit 1.2.3-korg