Re: panic: syncache: mbuf too small

From: Adrian Chadd <adrian_at_freebsd.org>
Date: Tue, 08 Feb 2022 22:38:15 UTC
On Tue, 8 Feb 2022 at 14:34, Drew Gallatin <gallatin@netflix.com> wrote:
>
> I don't think the size has changed recently.  However, there is a size difference for pkthdrs (and hence MHLEN) on 32-bit platforms vs 64-bit platforms.
>
> There are a number of bad ways to handle this.  Eg, don't permit Ipv6 on these interfaces, make these interfaces chain their headers, assuming they can do s/g dma, make them copy to a contiguous buffer.  Make mbufs bigger.   All of the things I can think of are ugly.

(a) yeah, some of the wifi firmware based things (bcom, realtek) have
some weird ass requirements where the FW/PHY/MAC/802.11 headers end up
needing to be in a contig buffer due to hardware/firmware
requirements. You can sometimes chain things afterwards, but eg on the
bwi/bwn firmware NICs you really need all of that data in the first sg
buffer the firmware sees.
(b) i think honestly we can just linearise the mbufs for the wifi
drivers that need a big headroom nowdays, it's not a huge deal and in
a lot of cases the linux drivers do? did? end up doing this to
simplify handling.



-adrian