| 83 | } |
| 84 | |
| 85 | void bnxt_tx_queue_release_op(struct rte_eth_dev *dev, uint16_t queue_idx) |
| 86 | { |
| 87 | struct bnxt_tx_queue *txq = dev->data->tx_queues[queue_idx]; |
| 88 | |
| 89 | if (txq) { |
| 90 | if (is_bnxt_in_error(txq->bp)) |
| 91 | return; |
| 92 | |
| 93 | /* Free TX ring hardware descriptors */ |
| 94 | bnxt_free_hwrm_tx_ring(txq->bp, txq->queue_id); |
| 95 | bnxt_tx_queue_release_mbufs(txq); |
| 96 | if (txq->tx_ring) { |
| 97 | bnxt_free_ring(txq->tx_ring->tx_ring_struct); |
| 98 | rte_free(txq->tx_ring->tx_ring_struct); |
| 99 | rte_free(txq->tx_ring->nr_bds); |
| 100 | rte_free(txq->tx_ring); |
| 101 | } |
| 102 | |
| 103 | /* Free TX completion ring hardware descriptors */ |
| 104 | if (txq->cp_ring) { |
| 105 | bnxt_free_ring(txq->cp_ring->cp_ring_struct); |
| 106 | rte_free(txq->cp_ring->cp_ring_struct); |
| 107 | rte_free(txq->cp_ring); |
| 108 | } |
| 109 | |
| 110 | bnxt_free_txq_stats(txq); |
| 111 | rte_memzone_free(txq->mz); |
| 112 | txq->mz = NULL; |
| 113 | |
| 114 | rte_free(txq->free); |
| 115 | pthread_mutex_destroy(&txq->txq_lock); |
| 116 | rte_free(txq); |
| 117 | dev->data->tx_queues[queue_idx] = NULL; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, |
| 122 | uint16_t queue_idx, |
no test coverage detected