eventdev/eth_tx: fix queue delete logic

Message ID 20221020162849.1645281-1-s.v.naga.harish.k@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers
Series eventdev/eth_tx: fix queue delete logic |

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-aarch64-unit-testing fail Testing issues
ci/iol-x86_64-unit-testing fail Testing issues
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/github-robot: build fail github build: failed
ci/intel-Testing success Testing PASS

Commit Message

Naga Harish K, S V Oct. 20, 2022, 4:28 p.m. UTC
  To delete all the queues of a ethernet device associated with
adapter instance the queue_id can be passed as -1 to the queue
delete API.

When a subset of queues of a ethernet device are associated,
the queue delete logic is exiting without deleting the queues
in some cases (higher numbered associated queues) for above
scenario as the queue delete logic is not checking all the
queue association status.

This patch fixes this issue by checking the queue association
status of all the queues of the ethernet device.

Fixes: 741b499e642 ("eventdev/eth_tx: fix queue delete logic")
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index c2a848103b..f60b7a82ef 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -934,7 +934,7 @@  txa_service_queue_del(uint8_t id,
 		uint16_t i, q, nb_queues;
 		int ret = 0;
 
-		nb_queues = txa->txa_ethdev[port_id].nb_queues;
+		nb_queues = txa->txa_ethdev[port_id].dev->data->nb_tx_queues;
 		if (nb_queues == 0)
 			return 0;