From b1e953b38da8963253ea9c74159efdd826500adc Mon Sep 17 00:00:00 2001 From: Santosh Shukla Date: Tue, 2 Jun 2015 19:57:23 +0100 Subject: dpif-netdev: add support for graceful termination api I hit this problem reported by odp-ovs: 2015-05-29T21:38:02.463Z|00034|odp(pmd99)|ERR|odp_thread.c:179:odp_thread_init_local():odp_thread_init_local : thd_is : 127 cpu : 9 2015-05-29T21:38:02.464Z|00033|odp(pmd105)|ERR|odp_thread.c:168:odp_thread_init_local():Too many threads 2015-05-29T21:38:02.465Z|00034|odp(pmd105)|ERR|odp_init.c:168:odp_init_local():ODP thread local init failed. This happens when user create multiple ports and delete them. Due to lack of termination, ODP keep on giving alloc_id in sequence from 0--127, and pretty soon it reachs ODP_CONFIG_MAX_THREADS Below fix address this problem. Also avoid ovs-vsctl del-br br0 stalling problem when alloc_id > ODP_CONFIG_MAX_THREADS. Signed-off-by: Zoltan Kiss Signed-off-by: Santosh Shukla --- lib/dpif-netdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 9aa78ce2a..c78f88067 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -2401,6 +2401,9 @@ reload: emc_cache_uninit(&pmd->flow_cache); if (!latch_is_set(&pmd->exit_latch)){ +#ifdef ODP_NETDEV + odp_term_local(); +#endif goto reload; } -- cgit v1.2.3