Re: panic: syncache: mbuf too small

From: Drew Gallatin <gallatin_at_netflix.com>
Date: Wed, 09 Feb 2022 17:13:45 UTC
Good point.  It looks like TCP already does this for tcp_output():

#ifdef INET6
                if (MHLEN < hdrlen + max_linkhdr)
                        m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
                else
#endif
                        m = m_gethdr(M_NOWAIT, MT_DATA);



On Wed, Feb 9, 2022 at 12:10 PM Ryan Stone <rysto32@gmail.com> wrote:

> Why not just allocate an mbuf cluster if the driver requires a huge
> amount of space for L2 headers?  Or is it that we want to avoid the
> extra branch in the syncache path?
>
> Obviously a second allocation isn't ideal from a perf standpoint but
> if only weird WiFi drivers feel that pain I don't think it's that big
> of a deal, but perhaps I'm misunderstanding something.
>