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:
Stephen Hurd 2018-02-20 18:33:45 +00:00
parent 2630b89b56
commit a4e5960730

View File

@ -1984,6 +1984,7 @@ 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);
if (fl->ifl_rxq->ifr_ctx->ifc_in_detach)
bus_dmamap_destroy(fl->ifl_desc_tag, sd_map);
}
if (*sd_m != NULL) {