aboutsummaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/iflib.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 90747ef1aa78..e88c76f23622 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -1725,6 +1725,14 @@ iflib_txq_destroy(iflib_txq_t txq)
for (int i = 0; i < txq->ift_size; i++)
iflib_txsd_destroy(ctx, txq, i);
+
+ if (txq->ift_br != NULL) {
+ ifmp_ring_free(txq->ift_br);
+ txq->ift_br = NULL;
+ }
+
+ mtx_destroy(&txq->ift_mtx);
+
if (txq->ift_sds.ifsd_map != NULL) {
free(txq->ift_sds.ifsd_map, M_IFLIB);
txq->ift_sds.ifsd_map = NULL;
@@ -1745,6 +1753,9 @@ iflib_txq_destroy(iflib_txq_t txq)
bus_dma_tag_destroy(txq->ift_tso_buf_tag);
txq->ift_tso_buf_tag = NULL;
}
+ if (txq->ift_ifdi != NULL) {
+ free(txq->ift_ifdi, M_IFLIB);
+ }
}
static void
@@ -2225,6 +2236,8 @@ iflib_rx_sds_free(iflib_rxq_t rxq)
}
free(rxq->ifr_fl, M_IFLIB);
rxq->ifr_fl = NULL;
+ free(rxq->ifr_ifdi, M_IFLIB);
+ rxq->ifr_ifdi = NULL;
rxq->ifr_cq_cidx = 0;
}
}
@@ -5658,9 +5671,9 @@ iflib_tx_structures_free(if_ctx_t ctx)
int i, j;
for (i = 0; i < NTXQSETS(ctx); i++, txq++) {
- iflib_txq_destroy(txq);
for (j = 0; j < sctx->isc_ntxqs; j++)
iflib_dma_free(&txq->ift_ifdi[j]);
+ iflib_txq_destroy(txq);
}
free(ctx->ifc_txqs, M_IFLIB);
ctx->ifc_txqs = NULL;