From nobody Wed Jun 08 12:53:32 2022 X-Original-To: dev-commits-src-all@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 52CD183C761; Wed, 8 Jun 2022 12:53:32 +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 4LJ6bc1jJsz3mhT; Wed, 8 Jun 2022 12:53:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654692812; 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=O3pEdwygd4lGecjekZTCdXiC+MsXet74FfGMngNf/+s=; b=cwlPmM2vUBA4lprmFeZFzwAxrSWeNxKxzgdLodyvfJ9MbfIr4PvlHJXoK1hvQrooT/19Q9 zeAGJeV4RAfxUcPrZc4uDm8pCeU2EUzCwHaD5lMTZu+KowP+X78DW7uy4Od2KUitbIEUlR pkGRXu3oMmLm6IJaXP0PDk3bCg9FRUdvNpRmWf7P5jnh2iECGlAq9AJPlhNu2lw81WfPhl N+OIsZG1Ke6rSiHJyRZfsltbVK2RLNWpgLdk/rM8n1JoD4GbMIDwL/5JRQQFhAMOl4Y2B4 pf6yqDPoeTdeOmizb5pgF8kNV3ZVv4jWJteXIl/st/jduJcfkHWllnSsf+Mewg== 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 1B3C110583; Wed, 8 Jun 2022 12:53:32 +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 258CrWwA049831; Wed, 8 Jun 2022 12:53:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 258CrWM8049830; Wed, 8 Jun 2022 12:53:32 GMT (envelope-from git) Date: Wed, 8 Jun 2022 12:53:32 GMT Message-Id: <202206081253.258CrWM8049830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 57317c8971df - main - tcp: exclude KASSERTS when rescue retransmissions are in play. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57317c8971df76bd6faeb7dfdc4379097d004caf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654692812; 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=O3pEdwygd4lGecjekZTCdXiC+MsXet74FfGMngNf/+s=; b=hqJ2m+EzPQRqG2vrgohiQ22WDgObucPOAEm0qFn9kdtbxc6RxjBlIf6MLOjA/D/n7hoa7j //UW0w+kDGBkmZB2YVTaix0xPTSSL1inuDaaoGJmgIeSIFalQ5p6Ei1OL12l7xa12kBJrQ n5HvQO77/JpdspzNPsOSiSUkh4IRkdsLjchMpgUZQ0yzLfn5SUynJjvfIDpBKtCs8sgDfW BP/LMiuUXybz9/Ks6yFBexCzDOdPqPFUER3kDOjGg7WZitBDD+RPuPsYkyyVRrlwaSNPfR KLEjXVsX+guE603oPio4I5bvOfdAJw1/2Ho6QdJk6Mqvu33/ajkll3YaBxZFsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654692812; a=rsa-sha256; cv=none; b=r3ZYabR09C7CoUv/9tD1FP8O23YdtwE6AYiI0ju4sgYSW2XucvVMCfOPPAhoHvKMVYXlXA Zhb9rsx/yzho1zmNpR7GVBhRqnUKyrv/hipLiiSzttKQfN/k6TdA2VDvhlS1Lld8uc5hET M+bAcDPoUlloVEZplTHExJvBOkBXEI89yIVvN7XUsQOK1JUuvUrDMbpR/6m3mLFuMWeFz8 sS1cReFmilmjRIMyJVuOBd4UYyQYqoIFOKgBaJvub27GQTxydINVoev9RmaOOAUcb34Hv5 XhBNwsN41Gmi+D0Me2Ns68TU5V7kHbE2XSsJfJZyihhL86tRdteLglIVCSpXng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=57317c8971df76bd6faeb7dfdc4379097d004caf commit 57317c8971df76bd6faeb7dfdc4379097d004caf Author: Richard Scheffenegger AuthorDate: 2022-06-08 12:21:28 +0000 Commit: Richard Scheffenegger CommitDate: 2022-06-08 12:51:31 +0000 tcp: exclude KASSERTS when rescue retransmissions are in play. The KASSERT criteria needs to be checked against the sendbuffer so_snd in a subsequent version. Reviewed By: tuexen, #transport PR: 263445 MFC after: 1 week Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D35431 --- sys/netinet/tcp_sack.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 97f9f6546ca9..9d4333f7f775 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -970,16 +970,18 @@ tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt) } } KASSERT(SEQ_LT(hole->start, hole->end), ("%s: hole.start >= hole.end", __func__)); - KASSERT(SEQ_LT(hole->start, tp->snd_fack), ("%s: hole.start >= snd.fack", __func__)); - KASSERT(SEQ_LT(hole->end, tp->snd_fack), ("%s: hole.end >= snd.fack", __func__)); - KASSERT(SEQ_LT(hole->rxmit, tp->snd_fack), ("%s: hole.rxmit >= snd.fack", __func__)); - if (SEQ_GEQ(hole->start, hole->end) || - SEQ_GEQ(hole->start, tp->snd_fack) || - SEQ_GEQ(hole->end, tp->snd_fack) || - SEQ_GEQ(hole->rxmit, tp->snd_fack)) { - log(LOG_CRIT,"tcp: invalid SACK hole (%u-%u,%u) vs fwd ack %u, ignoring.\n", - hole->start, hole->end, hole->rxmit, tp->snd_fack); - return (NULL); + if (!(V_tcp_do_newsack)) { + KASSERT(SEQ_LT(hole->start, tp->snd_fack), ("%s: hole.start >= snd.fack", __func__)); + KASSERT(SEQ_LT(hole->end, tp->snd_fack), ("%s: hole.end >= snd.fack", __func__)); + KASSERT(SEQ_LT(hole->rxmit, tp->snd_fack), ("%s: hole.rxmit >= snd.fack", __func__)); + if (SEQ_GEQ(hole->start, hole->end) || + SEQ_GEQ(hole->start, tp->snd_fack) || + SEQ_GEQ(hole->end, tp->snd_fack) || + SEQ_GEQ(hole->rxmit, tp->snd_fack)) { + log(LOG_CRIT,"tcp: invalid SACK hole (%u-%u,%u) vs fwd ack %u, ignoring.\n", + hole->start, hole->end, hole->rxmit, tp->snd_fack); + return (NULL); + } } return (hole); }