From nobody Wed Feb 09 17:13:45 2022 X-Original-To: freebsd-transport@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 07D3219AC185 for ; Wed, 9 Feb 2022 17:14:04 +0000 (UTC) (envelope-from gallatin@netflix.com) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jv6166jYxz3Gh7 for ; Wed, 9 Feb 2022 17:14:02 +0000 (UTC) (envelope-from gallatin@netflix.com) Received: by mail-ej1-x633.google.com with SMTP id ka4so9189557ejc.11 for ; Wed, 09 Feb 2022 09:14:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mhc+vftDSkCsDfy1IzLbE1Ifq/xOtkXVtsO53rYT+Yk=; b=hJ5MRfpMpwJRPU2Is6ULo6SC3YCVGmZiyiB9u4I+dIYQ4hX7Ujs/kY9XAz1/kE7GTG c0cdY+6U0Bn6C7o3Wr1ohP9br7c9dxfsqWpUodMnVadTpH/wgxDuwwGDGQD60isr/DQN Zu9Kcr7/I/pIz+Krwyj8DXhJdfdj9ykUiB++w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mhc+vftDSkCsDfy1IzLbE1Ifq/xOtkXVtsO53rYT+Yk=; b=KHmfXLwIWxJHDMvddtVEKEHmtQNSfVdnKwWGs0zSYrmbf1MYjhZ2Knq0iuiJ/0sHYP l/Y2QqsiGNm0Fam6fzqfOkNLhlOEujwRiDSsUflSMNydBsF/uLTRRuhvHDd/sub3NDn8 olkIQ7EZqPQOx2PfQ1JDrx74E8VImdLBhT9WTKsRYpiWpTiBZPl/fwvaSkcYBss7ZgIG uKNMEoqyyzQDEjmmY8rnogMPgzLWOD+D2c71Sgn9Vng3JxQ1novGqOY6En1Eiu382Ds6 lr6byQbwppY3LxNGnj8d1ewIi6h5DGkJw35xZJQAB1FvU9TK3xT3S/bto2fuEjlObu40 IjwQ== X-Gm-Message-State: AOAM531PuBSvb3dXJtZCPvABIR4AJMV7OFM/J3SwGU8oDwH9DZeOAHUf gpnLm0tVIEkorMb+qHfyE1+MKWRAjikSVVLmTL8Wkko+Ysb6 X-Google-Smtp-Source: ABdhPJxY2r2iIVhMXCi4KWuecGEhspEGPo5FEpxBoEsctgG1a/b+6BLUZCRVgX0rfnFzRR6DWQ4x9Rj3GPZA5FBkV4I= X-Received: by 2002:a17:906:649c:: with SMTP id e28mr2599986ejm.324.1644426836294; Wed, 09 Feb 2022 09:13:56 -0800 (PST) List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-transport List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-transport@freebsd.org X-BeenThere: freebsd-transport@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Drew Gallatin Date: Wed, 9 Feb 2022 12:13:45 -0500 Message-ID: Subject: Re: panic: syncache: mbuf too small To: Ryan Stone Cc: Adrian Chadd , "Bjoern A. Zeeb" , "" Content-Type: multipart/alternative; boundary="00000000000070321c05d798f54e" X-Rspamd-Queue-Id: 4Jv6166jYxz3Gh7 X-Spamd-Bar: ------------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=netflix.com header.s=google header.b=hJ5MRfpM; dmarc=pass (policy=reject) header.from=netflix.com; spf=pass (mx1.freebsd.org: domain of gallatin@netflix.com designates 2a00:1450:4864:20::633 as permitted sender) smtp.mailfrom=gallatin@netflix.com X-Spamd-Result: default: False [-12.43 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[netflix.com:s=google]; FREEFALL_USER(0.00)[gallatin]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-transport@freebsd.org]; NEURAL_SPAM_SHORT(0.57)[0.570]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[netflix.com:+]; DMARC_POLICY_ALLOW(-0.50)[netflix.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::633:from]; WHITELIST_DMARC(-7.00)[netflix.com:D:+]; MLMMJ_DEST(0.00)[freebsd-transport]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; WHITELIST_SPF_DKIM(-3.00)[netflix.com:d:+,netflix.com:s:+] X-ThisMailContainsUnwantedMimeParts: N --00000000000070321c05d798f54e Content-Type: text/plain; charset="UTF-8" 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 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. > --00000000000070321c05d798f54e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Good point.=C2=A0 It looks like TCP already does this= for tcp_output():

#ifdef INET6
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (MHLEN < hdrlen + max_linkh= dr)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 m =3D m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else
#endif
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 m= =3D m_gethdr(M_NOWAIT, MT_DATA);



On Wed, Feb 9, 2022 at 1= 2:10 PM Ryan Stone <rysto32@gmail.c= om> wrote: