From nobody Mon Feb 14 00:07:58 2022 X-Original-To: dev-commits-src-main@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 78C7A1951ED8; Mon, 14 Feb 2022 00:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jxl0t2hqGz4bJl; Mon, 14 Feb 2022 00:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644797278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ElNH46J1OKXST0MzAVYuSessOfrWL6cKzmpB0ZSYgf8=; b=Id1LFRZ1mMIQKJYytEsUTyW6FIC41u+oBH4wb6unzhEOJhNsSaMDcAbmXzfd48hVY1TDdX xT+hBB8mg06lVHbpt7cwLdo25yJMbSPk0HWU/v2mNTodyJfCvTwecLPC5cPzTahbrENUL9 W570tQOb4jN9V4jLfkXfzE+PZlEVeQLfc4LIANsTwTy8kuT3IPcSyf+DFGJ9gxnahY+eiu juq9B6UJhY/ZqAEqFA8rFAef7sJJ49Wfvxar5hu8tUPVC9HA4KWbM0b8ybIWEpmXPe0lHB 3UGQ3XIWAvfB5Pm1C4Kdir4ZkDO24emcaD2adFU8F8OfAHWf7kgEAevdCwiB8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C24324CEC; Mon, 14 Feb 2022 00:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21E07wQa056892; Mon, 14 Feb 2022 00:07:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21E07wVk056891; Mon, 14 Feb 2022 00:07:58 GMT (envelope-from git) Date: Mon, 14 Feb 2022 00:07:58 GMT Message-Id: <202202140007.21E07wVk056891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 232d323ef227 - main - TCP syncache: enhance KASSERT output List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 232d323ef227109acce37f5a0d62492673666ee2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644797278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ElNH46J1OKXST0MzAVYuSessOfrWL6cKzmpB0ZSYgf8=; b=DORxckRBZMuQ9igRIK3xpOwYkZr8wUXmI9Hffnlj3LRSboAH+shRyBjtzlbF96V8xVvsnB 6QjYBLkdtsvYz51C0srJNM8F57Fx1NVOsgSE2Y8vjmfjD+WhbvCObaczZ4YyutQ5jS61Dk Ib3sqD49Kr1BGw8RmPkrKnjT3q7epSm975L8I8KuDwtH4RxH/x9miQ0mQRIA/fiw9yZAVF rEcLT64WN5WMRU5D5stWtsnjgGYSrVt2wJxINoqsSPAlIlAbjp7K9LTJ3JZndm/itsbGiJ gfuzn8fx96+fwbn62/74hn4ILxAyEZr+gftcluQJ1XO7DE5AGKQMkKaAuSz32Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644797278; a=rsa-sha256; cv=none; b=qfAHsNoDM+XUMHZfTM0ymDTOFK4pk1t/hYi8ObeWKi3BWXUDQRZ1FcKa+/n5LS1NzgUnKp rFHw/g5MN8hfvV+GxFhAz96dZYZK8oF5oZk3MaPLLQF7qSKTDBKz06yUo4dmVF7E3pLgwu An3I0x8OAthJUENpJi/znU70IneamdWx65osswUAziQ6Pho//iMcOGlhs81Bd/ENwTHPZO kiRlKVqWohJEZAyiWTe4OfOQfz4x5OpP97v3AOIMWbJEEpzP3SQpodKVdYNj4CvfeasE/Y +cuBo7hIiHQK25weXSL2yJyCRIHnF3b57799X39qxtbzHCbYKppQFGH6+eaJgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=232d323ef227109acce37f5a0d62492673666ee2 commit 232d323ef227109acce37f5a0d62492673666ee2 Author: Bjoern A. Zeeb AuthorDate: 2022-02-08 23:47:15 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-02-14 00:03:20 +0000 TCP syncache: enhance KASSERT output Improve the "syncache: mbuf too small" assertion message with various variables (some not actually needed) but enough that it will be obvious if (a) we use IPv4 or IPv6, (b) if UDP tunneling is on, (c) what max_linkhdr is, and (d) what MHLEN is. This should help diagnostics in the future. The case was hit with wireless drivers setting a large ic_headroom and using IPv6. Reviewed by: gallatin, tuexen, rscheff MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D34217 --- sys/netinet/tcp_syncache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index ed4adda59c22..ed5981bf85d7 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1848,7 +1848,9 @@ syncache_respond(struct syncache *sc, const struct mbuf *m0, int flags) /* XXX: Assume that the entire packet will fit in a header mbuf. */ KASSERT(max_linkhdr + tlen + TCP_MAXOLEN <= MHLEN, - ("syncache: mbuf too small")); + ("syncache: mbuf too small: hlen %u, sc_port %u, max_linkhdr %d + " + "tlen %d + TCP_MAXOLEN %ju <= MHLEN %d", hlen, sc->sc_port, + max_linkhdr, tlen, (uintmax_t)TCP_MAXOLEN, MHLEN)); /* Create the IP+TCP header from scratch. */ m = m_gethdr(M_NOWAIT, MT_DATA);