HomeFreeBSD

LinuxKPI: skbuff: add memlimit tunable for 64bit systems

Description

LinuxKPI: skbuff: add memlimit tunable for 64bit systems

Some drivers, such as Realtek's rtw88, require 32bit DMA in
a single segment. busdma(9) has a hard time providing this
currently for 3-ish pages at large quantities
(see lkpi_pci_nseg1_fail in linux_pci.c e86707418c8e8).
Work around this for now by allowing a tunable to enforce
physical addresses allocation limits on 64bit platforms (ignoring PAE)
using "old-school" contigmalloc(9) to avoid bouncing.

A patch needing a custom kernel compiled was tested in the last weeks
by rtw88 users providing the 32bit limit only hardcoded. The 36bit
limit can be found in iwlwifi so is added as a testing option along.

This is put in as a bandaid for now, so people no longer need to patch
and compile their own kernels to use rtw88 and to allow us to MFC the
driver as well before the amounts of commits to track increases by
much more.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Details

Provenance
bzAuthored on May 5 2022, 8:43 PM
Parents
rGadbe6e6435a2: Reenable vnet tests in CI
Branches
Unknown
Tags
Unknown