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

Function iflib_txq_destroy

freebsd/net/iflib.c:1779–1817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1777}
1778
1779static void
1780iflib_txq_destroy(iflib_txq_t txq)
1781{
1782 if_ctx_t ctx = txq->ift_ctx;
1783
1784 for (int i = 0; i < txq->ift_size; i++)
1785 iflib_txsd_destroy(ctx, txq, i);
1786
1787 if (txq->ift_br != NULL) {
1788 ifmp_ring_free(txq->ift_br);
1789 txq->ift_br = NULL;
1790 }
1791
1792 mtx_destroy(&txq->ift_mtx);
1793
1794 if (txq->ift_sds.ifsd_map != NULL) {
1795 free(txq->ift_sds.ifsd_map, M_IFLIB);
1796 txq->ift_sds.ifsd_map = NULL;
1797 }
1798 if (txq->ift_sds.ifsd_tso_map != NULL) {
1799 free(txq->ift_sds.ifsd_tso_map, M_IFLIB);
1800 txq->ift_sds.ifsd_tso_map = NULL;
1801 }
1802 if (txq->ift_sds.ifsd_m != NULL) {
1803 free(txq->ift_sds.ifsd_m, M_IFLIB);
1804 txq->ift_sds.ifsd_m = NULL;
1805 }
1806 if (txq->ift_buf_tag != NULL) {
1807 bus_dma_tag_destroy(txq->ift_buf_tag);
1808 txq->ift_buf_tag = NULL;
1809 }
1810 if (txq->ift_tso_buf_tag != NULL) {
1811 bus_dma_tag_destroy(txq->ift_tso_buf_tag);
1812 txq->ift_tso_buf_tag = NULL;
1813 }
1814 if (txq->ift_ifdi != NULL) {
1815 free(txq->ift_ifdi, M_IFLIB);
1816 }
1817}
1818
1819static void
1820iflib_txsd_free(if_ctx_t ctx, iflib_txq_t txq, int i)

Callers 1

iflib_tx_structures_freeFunction · 0.85

Calls 4

iflib_txsd_destroyFunction · 0.85
ifmp_ring_freeFunction · 0.85
freeFunction · 0.50
bus_dma_tag_destroyFunction · 0.50

Tested by

no test coverage detected