IFLIB: do not remove dmamap on buffer unload

Dmamap is created only on IFC attach. If we remove it on
buffer release, we won't be able to do ifconfig down&up. Only destroy
when in detach.

Reported by:	wma
Reviewed by:	wma
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D14060
This commit is contained in:
shurd 2018-02-20 18:33:45 +00:00
parent 9982f75418
commit c1c5080794

View File

@ -1984,7 +1984,8 @@ iflib_fl_bufs_free(iflib_fl_t fl)
if (fl->ifl_sds.ifsd_map != NULL) {
bus_dmamap_t sd_map = fl->ifl_sds.ifsd_map[i];
bus_dmamap_unload(fl->ifl_desc_tag, sd_map);
bus_dmamap_destroy(fl->ifl_desc_tag, sd_map);
if (fl->ifl_rxq->ifr_ctx->ifc_in_detach)
bus_dmamap_destroy(fl->ifl_desc_tag, sd_map);
}
if (*sd_m != NULL) {
m_init(*sd_m, M_NOWAIT, MT_DATA, 0);