MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_tx_queue_release_op

Function bnxt_tx_queue_release_op

dpdk/drivers/net/bnxt/bnxt_txq.c:85–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void 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
121int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
122 uint16_t queue_idx,

Callers 1

bnxt_tx_queue_setup_opFunction · 0.85

Calls 8

is_bnxt_in_errorFunction · 0.85
bnxt_free_hwrm_tx_ringFunction · 0.85
bnxt_free_ringFunction · 0.85
rte_freeFunction · 0.85
bnxt_free_txq_statsFunction · 0.85
rte_memzone_freeFunction · 0.85
pthread_mutex_destroyFunction · 0.85

Tested by

no test coverage detected