* DPDK callback to release a Tx queue. * * @param dev * Pointer to Ethernet device structure. * @param idx * Transmit queue index. */
| 528 | * Transmit queue index. |
| 529 | */ |
| 530 | void |
| 531 | mlx4_tx_queue_release(struct rte_eth_dev *dev, uint16_t idx) |
| 532 | { |
| 533 | struct txq *txq = dev->data->tx_queues[idx]; |
| 534 | |
| 535 | if (txq == NULL) |
| 536 | return; |
| 537 | DEBUG("%p: removing Tx queue %hu from list", (void *)dev, idx); |
| 538 | dev->data->tx_queues[idx] = NULL; |
| 539 | mlx4_txq_free_elts(txq); |
| 540 | if (txq->qp) |
| 541 | claim_zero(mlx4_glue->destroy_qp(txq->qp)); |
| 542 | if (txq->cq) |
| 543 | claim_zero(mlx4_glue->destroy_cq(txq->cq)); |
| 544 | mlx4_mr_btree_free(&txq->mr_ctrl.cache_bh); |
| 545 | rte_free(txq); |
| 546 | } |
no test coverage detected