eventdev/timer: fix adapter stop function

Message ID 20220922075311.4127874-1-s.v.naga.harish.k@intel.com (mailing list archive)
State Rejected, archived
Delegated to: Jerin Jacob
Headers
Series eventdev/timer: fix adapter stop function |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Naga Harish K, S V Sept. 22, 2022, 7:53 a.m. UTC
  adapter_stop function is stopping the adapter service using
rte_service_runstate_set() api and waiting until
rte_service_may_be_active() api returns stopped state in an
infinite loop.

This results in hang issues if application calls
rte_service_lcore_stop() before adapter stop.

remove the state check after setting the service state which
avoids running into hang issues. This also makes timer adapter
stop inline with remaining adapters.

Fixes: 47d05b292820 ("eventdev: add timer adapter common code")
Cc: stable@dpdk.org

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
---
 lib/eventdev/rte_event_timer_adapter.c | 4 ----
 1 file changed, 4 deletions(-)
  

Patch

diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index d2480060c5..8266003ab1 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -1036,10 +1036,6 @@  swtim_stop(const struct rte_event_timer_adapter *adapter)
 	if (ret < 0)
 		return ret;
 
-	/* Wait for the service to complete its final iteration */
-	while (rte_service_may_be_active(sw->service_id))
-		rte_pause();
-
 	return 0;
 }