From nobody Thu Jan 25 22:00:33 2024 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 4TLZWj6BBzz587tK; Thu, 25 Jan 2024 22:00:33 +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 4TLZWj5gcrz4bs1; Thu, 25 Jan 2024 22:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706220033; 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=R+5Jt99xUKQ76wcMgZacmKxG5ccfWY6iWgoO3SeS+eI=; b=vtDnwVHL5kGEY/2+KQks6uxQbczUeeD96BjTeL513FrETIKw+IgjfqPbZlSxc10Ti2ty11 PwrJpVnGsl1Qx3UoT7Tzxw/SWsSZQQbr+rw/rSGei9elNp1j8QIRaIk9zXmtM7+DylQ5pS KOSObtkBKq2es5iJ8IciZA8a9CaFKGExg7qdmcyE/5qmeyYM+Wl/4/SSzbTmW4YomfxkEG adNfF7rQFZj54LPZf/nixJemL4h3YyxX5jZg+tQqV3P2qhsstLEQ080A7awq8Dj72U887b GFsSNT6bBQJE/F1xmbhjzjhV2T+Png+fWxo/h3pEwy+A3QgcqA0CRyP51f6Vlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706220033; 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=R+5Jt99xUKQ76wcMgZacmKxG5ccfWY6iWgoO3SeS+eI=; b=roHkDOIP8QcZnx395UsvsP9OU8/XoUmxXIJOvulKTULfh0Hf46D8u9SrWlGWyLiUiYz4Dc 4akb88AJW4paK2MbNmvWsSN0vTGsY/VAqAZyCG88XRY/EleQrF531F1iIgOwMLhA1cJoPS IOKjPRUCHcXReGLmYxT3GX8pCde5z7u+9ZqxrPwkFeMEJ1S0i5FgtYtK95/cLpmGoUjm2B nLq5J8usF6/u9DasL0plwkdcc4JpJlntu5eyUrvELjdPcNx+cTAbD5E9GoG+/eZpceKL7q JyBlpyP2GJSZ/ECErD9+G1naaj/EFDHf168j2eBgTfO6l/rKGYe7d2qbcpFrKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706220033; a=rsa-sha256; cv=none; b=u3jcY/B3XHP2WSpihTRELp0Va9f3XrBnxDF/vIHrEKH96q/ryllGrS7vrw377QuRUHzRUS 8/KohwBQC3/FrmQiiX2j62TT80Cj4jDhvE3uKngiPAuQZZVw5y2B8Dq9MA+8gT7CkvoakQ RjnCxDwgm/jAMV0iOQajTSwtwUxUKokgUhRDblBCdU1A38n11L29bEema38BCW5AD/rb0J r7x2nhaIR/lNOK/zb1kCNZw9ZZVxsCrx5VMZPixwVhARTc33/QKXEZeVl7hwkKXxyVxFqd sDZi4HmCyzxzrPTE2JDYsFbuueL9SDCKie0Hn30L8r90qdLeXAZ19IgvtF2S5w== 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 4TLZWj4n2MzF5s; Thu, 25 Jan 2024 22:00:33 +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 40PM0XT6059091; Thu, 25 Jan 2024 22:00:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40PM0XPt059088; Thu, 25 Jan 2024 22:00:33 GMT (envelope-from git) Date: Thu, 25 Jan 2024 22:00:33 GMT Message-Id: <202401252200.40PM0XPt059088@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: 0932fb565a08 - main - tcp: fix TCPSTAT accounting for SACK 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: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0932fb565a08e6e13dd9843e7a60dae311911d0d Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=0932fb565a08e6e13dd9843e7a60dae311911d0d commit 0932fb565a08e6e13dd9843e7a60dae311911d0d Author: Richard Scheffenegger AuthorDate: 2024-01-25 21:03:36 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-25 21:58:33 +0000 tcp: fix TCPSTAT accounting for SACK Account for SACK retransmitted bytes once the actual length is known. This prevents a call to tcp_maxseg() and prepares for TSO support when transmitting from the SACK scoreboard. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43447 --- sys/netinet/tcp_output.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 71a50d54d5ee..58f63b593b2a 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -330,9 +330,6 @@ again: __func__, off)); sack_rxmit = 1; sendalot = 1; - TCPSTAT_INC(tcps_sack_rexmits); - TCPSTAT_ADD(tcps_sack_rexmit_bytes, - min(len, tcp_maxseg(tp))); } } after_sack_rexmit: @@ -1036,6 +1033,10 @@ send: tp->t_sndrexmitpack++; TCPSTAT_INC(tcps_sndrexmitpack); TCPSTAT_ADD(tcps_sndrexmitbyte, len); + if (sack_rxmit) { + TCPSTAT_INC(tcps_sack_rexmits); + TCPSTAT_ADD(tcps_sack_rexmit_bytes, len); + } #ifdef STATS stats_voi_update_abs_u32(tp->t_stats, VOI_TCP_RETXPB, len);