From nobody Sat May 11 14:34:24 2024 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 4Vc7YX62QNz5KDcr; Sat, 11 May 2024 14:34:24 +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 4Vc7YX3XjQz40Yq; Sat, 11 May 2024 14:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715438064; 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=2TPwqDvFZehuPVYJtptm5G2o0Bdg3uPXJ392T4F1zx8=; b=mCYaHfKsGfRel0drNG4nZ4AobJRB2SrhScV4gMnPIIgQJsiC4b+o7ISsP3tZIEGW6DqXzS nSk6QXDcaB1MUS5p2hJwOvCPntso2iRQ4NyNf5SlklTov3AimaNlkj1k08lus4Ow4J32Be CjF2LI+8XYrAyBQdsFhXkjel3A87xoC9bVvbWsR61QsM022cdvB+75liXmTUu2oXagCYoM pgxZ8tDp8qBSjrTsma8eMVfpnJKIZupueZMLgh5jcXm11qiShDx0PrxVYChB761BcfhCvf FElnS133rCct7Zwiro/saeB7TFaaxa38SCgs4DeEnxecC9jAiE128fyHbGXhxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715438064; a=rsa-sha256; cv=none; b=FnugjsagakO2/gCpew1fUk+oq4RHJkY6qHh0lofCUmjUvInWNdgCeumFbknerHwbGjx/4G v0q9ZydkrVOFqZcaWvy3IqEHlajve82hh78Pqnxe9wbnW6RYkmRawiwI28QL5cT2GBEbv0 I14hqinNouy3uHmJzWtnCVYwK4nMPatd89bIL+aoT9N4p6DXn6xcxS4wpqyPmbmXLimjdN TAxzBn9/c8w4a+IyB8DxG3ll2ZO1WZeNSCZHHJRGddVZg0IbpG/m2FFVCIkRXpsHduE1ui 7W1lYr8iaM+wCyo2DmciWkHuTfKggcu7/sOBsXG8fnXFXkBaEq7jyOsUqw3MKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715438064; 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=2TPwqDvFZehuPVYJtptm5G2o0Bdg3uPXJ392T4F1zx8=; b=fws5TjGDWf2f003C7wuj2CwOY+bAtAEU+Rtzc2RjWLP25wsTSCe0jAZvOHbGcJUg2yFH0S HJ10LIW/hMlZbqCiKM04Q6rF6jaH4ZWh6Aa/H5nwZ8hg/Cw+uCCJiN8MqkdooWAN8eS1Gx oMxcBmtTNFc9Ko2hxbo6XOyO+sMyeV8quVhthl72Pq0Q7jcE5RjMQhocvdmnkvG0J4g+D9 qWe/29l5JwmAsPH+C3A6nHJUXY/9SwAc/+jhdGPqb3G09iHGjFYfQineyo69gQFCTvJdda F7jrl5xkx8k7tK0ag9pc8P7e97jfL9c32MvYNtWC9UMKGqztUz9V8OM1+VIuSA== 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 4Vc7YX1GpmzPvx; Sat, 11 May 2024 14:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44BEYOVj037272; Sat, 11 May 2024 14:34:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44BEYOqc037269; Sat, 11 May 2024 14:34:24 GMT (envelope-from git) Date: Sat, 11 May 2024 14:34:24 GMT Message-Id: <202405111434.44BEYOqc037269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 2f923a0cedb8 - main - tcp rack: improve handling of front states 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f923a0cedb8db9b8bd042c5b457dee6333604fe Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2f923a0cedb8db9b8bd042c5b457dee6333604fe commit 2f923a0cedb8db9b8bd042c5b457dee6333604fe Author: Michael Tuexen AuthorDate: 2024-05-11 14:28:45 +0000 Commit: Michael Tuexen CommitDate: 2024-05-11 14:28:45 +0000 tcp rack: improve handling of front states When the RACK stack wants to send a FIN, but still has outstanding or unsent data, it sends a challenge ack. Don't do this when the TCP endpoint is still in the front states, since it does not make sense. Reviewed by: rrs MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D45122 --- sys/netinet/tcp_stacks/rack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 49758072c6a1..b0d0f94b8f0e 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -22776,7 +22776,8 @@ send: * is acked first. */ flags &= ~TH_FIN; - if ((sbused(sb) == (tp->snd_max - tp->snd_una)) && + if (TCPS_HAVEESTABLISHED(tp->t_state) && + (sbused(sb) == (tp->snd_max - tp->snd_una)) && ((tp->snd_max - tp->snd_una) <= segsiz)) { /* * Ok less than or right at a MSS is