Skip to content

Commit

Permalink
eventdev/eth_tx: fix queue delete
Browse files Browse the repository at this point in the history
[ upstream commit 75c5bfc ]

To delete all the queues of an ethdev 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 ethdev 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: 741b499 ("eventdev/eth_tx: fix queue delete logic")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
  • Loading branch information
svnagaha authored and kevintraynor committed Nov 1, 2022
1 parent 11b702a commit ff54781
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/eventdev/rte_event_eth_tx_adapter.c
Expand Up @@ -867,6 +867,8 @@ txa_service_queue_del(uint8_t id,
uint16_t i, q, nb_queues;
int ret = 0;

if (txa->txa_ethdev == NULL)
return 0;
nb_queues = txa->txa_ethdev[port_id].nb_queues;
if (nb_queues == 0)
return 0;
Expand All @@ -879,10 +881,10 @@ txa_service_queue_del(uint8_t id,

if (tqi[q].added) {
ret = txa_service_queue_del(id, dev, q);
i++;
if (ret != 0)
break;
}
i++;
q++;
}
return ret;
Expand Down

0 comments on commit ff54781

Please sign in to comment.