- struct avp_queue *rxq = (struct avp_queue *)rx_queue;
- struct avp_dev *avp = rxq->avp;
- struct rte_eth_dev_data *data = avp->dev_data;
- unsigned int i;
-
- for (i = 0; i < avp->num_rx_queues; i++) {
- if (data->rx_queues[i] == rxq) {
- rte_free(data->rx_queues[i]);
- data->rx_queues[i] = NULL;
- }
+ if (eth_dev->data->rx_queues[rx_queue_id] != NULL) {
+ rte_free(eth_dev->data->rx_queues[rx_queue_id]);
+ eth_dev->data->rx_queues[rx_queue_id] = NULL;