eventdev/eth_tx: update service runstate in queue delete

Message ID 20220726035357.1009316-1-s.v.naga.harish.k@intel.com (mailing list archive)
State Not Applicable, archived
Delegated to: Jerin Jacob
Headers
Series eventdev/eth_tx: update service runstate in queue delete |

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/intel-Testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Naga Harish K, S V July 26, 2022, 3:53 a.m. UTC
  During the queue add, service component runstate is set to 1,
when there is minimum one queue associated with the adapter
instance. The same is not updated during queue delete operation.

This patch update service component runstate to 0 when there
are no more queues associated with the adapter instance

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
Cc: stable@dpdk.org

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

Patch

diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index b4b37f1cae..a237e8edba 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -905,6 +905,7 @@  txa_service_queue_del(uint8_t id,
 
 	txa_service_queue_array_free(txa, port_id);
 
+	rte_service_component_runstate_set(txa->service_id, txa->nb_queues);
 ret_unlock:
 	rte_spinlock_unlock(&txa->tx_lock);
 	return 0;