#
d66ceb73 |
|
02-Jun-2022 |
Augustin Cavalier <waddlesplash@gmail.com> |
freebsd_network: Implement bouncing and address validation in bus_dma. This has been missing since the rewrite in 26b95c15f255904694ce8224b6f21f0b931a9cff. Until now it seems to not have been a problem since buffer sizes were generally small enough and did not cross page boundaries due to alignment guarantees. However, now that we have enabled jumbo frames by default, some drivers do hit DMA limits without bouncing, as these frames cross pages. So, now we implement a basic bouncing system. Unlike FreeBSD which maintains a global "bounce pages" cache that it pulls from, we use per-dmamap bounce buffers, lazily allocated only if needed. I tested this by forcing all non-"prohibited" dmamaps to bounce all transactions, and the rtl81xx driver still worked that way (though not all drivers may as they have expectations about contiguously allocated memory never getting bounced.) This should fix #17763. Hopefully it will also fix #17766 as well.
|
#
56cb682b |
|
22-Nov-2019 |
Augustin Cavalier <waddlesplash@gmail.com> |
freebsd_network: Moderate reorganization. * Rename device.c to device_hooks.c, as this is what it really contains. * Rename compat.c to device.c, as it implements the generic "device" related functions, both for compat layer internals and FreeBSD public ones. * Move malloc and related operations out of the now-device.c, and place them in a new "malloc.cpp", which also incorporates compat_cpp.cpp. No functional change intended.
|