freebsd-dev/sys/dev/iwm
Adrian Chadd 5799c2bce7 [iwm] Fix up busdma use in the RX path
When allocating a new mbuf or bus_dmamap_load()-ing it fails,
we can just keep the old mbuf since we are dropping that packet anyway.
Instead of doing bus_dmamap_create() and bus_dmamap_destroy() all the time,
create an extra bus_dmamap_t which we can use to safely try
bus_dmamap_load()-ing the new mbuf. On success we just swap the spare
bus_dmamap_t with the data->map of that ring entry.

Tested:

Tested with Intel AC7260, verified with vmstat -m that new kernel no
longer visibly leaks memory from the M_DEVBUF malloc type.
Before, leakage was 1KB every few seconds while ping(8)-ing over the wlan
connection.

Submitted by:	Imre Vadasz <imre@vdsz.com>
Approved by:	re@
Obtained from:	DragonflyBSD.git cc440b26818b5dfdd9af504d71c1b0e6522b53ef
Differential Revision:	https://reviews.freebsd.org/D6742
2016-06-13 00:13:20 +00:00
..
if_iwm_binding.c
if_iwm_binding.h
if_iwm_debug.h
if_iwm_led.c
if_iwm_led.h
if_iwm_mac_ctxt.c
if_iwm_mac_ctxt.h
if_iwm_pcie_trans.c [iwm] Fix several nitpicks in iwm(4). 2016-06-02 05:43:16 +00:00
if_iwm_pcie_trans.h
if_iwm_phy_ctxt.c
if_iwm_phy_ctxt.h
if_iwm_phy_db.c
if_iwm_phy_db.h [iwm] Fix several nitpicks in iwm(4). 2016-06-02 05:43:16 +00:00
if_iwm_power.c [iwm] Fix several nitpicks in iwm(4). 2016-06-02 05:43:16 +00:00
if_iwm_power.h
if_iwm_scan.c [iwm] Clean up iwm(4) scanning logic a bit. 2016-06-02 04:54:56 +00:00
if_iwm_scan.h
if_iwm_time_event.c
if_iwm_time_event.h
if_iwm_util.c [iwm] Use IWM_MAX_CMD_PAYLOAD_SIZE to improve command length checks. 2016-06-02 04:53:28 +00:00
if_iwm_util.h
if_iwm.c [iwm] Fix up busdma use in the RX path 2016-06-13 00:13:20 +00:00
if_iwmreg.h [iwm] Fix several nitpicks in iwm(4). 2016-06-02 05:43:16 +00:00
if_iwmvar.h [iwm] Fix up busdma use in the RX path 2016-06-13 00:13:20 +00:00