From nobody Wed May 08 12:55:23 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 4VZFVh0s65z5J4N3; Wed, 08 May 2024 12:55: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 4VZFVg6J0Kz4Ps0; Wed, 8 May 2024 12:55:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715172923; 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=uIH83jZ860ez4WWzUqFSQLAv/97aOlqNfxIw/O7UY7s=; b=BTWqMcOKnBHiJm7TPH889VA3E9gKVwPdat18yLec81x2Q11KsgrwQj3eC2WL7VHyWU9J2e UYiySPa8ZifhuIe4tuG1gycs36LqwIcxZYMqDeUv3XM5B75zEj7sDj3NYOa5I7Ts+itz5f x0oUXCzDlR6EUGIpcdaZGoGz8GGKjRgYIhtEWeRhm0z13DiKBQErlVQ00KCHMNLewkmuwE fjb50bSyaUSN8+F6RX1oYE/ElJZb8d02dKBLheKPdEy0g5JUzRmVfGrGZ4LnZMP5BXFjRK MWsge4qop63oBbyshNLEd5jIWMLGB1mTHHxmsemtD/p0t+TBM3x3Yjpr1sQDzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715172923; a=rsa-sha256; cv=none; b=OyGVvmFdghtmfs/9Vn7SihhpKQe51+WMX5JyNo7c3A5iGDVHpXeYbvZXg1vs8RKn+haziD y+7nzaV5tncJWP+oJfOqqlj+x/UM3eQF8f3JV6XexQkvj8XayasaMgkfnDVbixEZwbISef oVK9K5bK6zKH0k6uaEDlf2kFalCahVecxpW86mTWjAfA+2BolBbb+LdVg+vQKJvCq0b0rY BCU9ygZXZjoVYuH4m7d3Psg/gH7jGCBlGNVCaf7wXRPobWl14H+py6WN2wVoo18JBcYUUD +JvxJRdPjGSjBsm2XTtDDqB6lo5dF08JwPyAiI6YmueDDTItq8wwGOm3D4of1w== 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=1715172923; 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=uIH83jZ860ez4WWzUqFSQLAv/97aOlqNfxIw/O7UY7s=; b=ZMvnJToDCyBYhL6ToOeIZS4ujAg5R0I9bi7PIhgr+ACFfCMVc1ay/eKusroLS7b5QKxZws NyqzbgBSmuygknkmJ0QJzMBno0AAnkxBWLYcZpGHK6qnE9LaEJT39CvFXjhB87K3cALmp5 D5AaNZmvHbjbN9NrHtERvxjkuuT0GrNHPjlU0FBigD3LmfeUXIuVHb3BChb82JbvuEQddH Wam2xUJSCqc8LEy4eqnnZU378qL3SS+9ZXE+S3SVCwlnVc40i8WDrNGEA4n7k1KUISetGX onX3BxJMj9gEzz36SYlb4GIyel3WdC4ZFv2/nbIOMl+t8Une46/Dp0MRnBgMYg== 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 4VZFVg5KtdzQ2F; Wed, 8 May 2024 12:55:23 +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 448CtNjj061916; Wed, 8 May 2024 12:55:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 448CtNWE061913; Wed, 8 May 2024 12:55:23 GMT (envelope-from git) Date: Wed, 8 May 2024 12:55:23 GMT Message-Id: <202405081255.448CtNWE061913@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: 2a9aae9e5f7a - main - tcp: add counter to track when SACK loss recovery uses TSO 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: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a9aae9e5f7a1a218b2c05ed28d811e533912118 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=2a9aae9e5f7a1a218b2c05ed28d811e533912118 commit 2a9aae9e5f7a1a218b2c05ed28d811e533912118 Author: Richard Scheffenegger AuthorDate: 2024-05-08 12:36:53 +0000 Commit: Richard Scheffenegger CommitDate: 2024-05-08 12:37:33 +0000 tcp: add counter to track when SACK loss recovery uses TSO Add a counter to track how frequently SACK has transmitted more than one MSS using TSO. Instances when this will be beneficial is the use of PRR, or when ACK thinning due to GRO/LRO or ACK discards by the network are present. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D45070 --- sys/netinet/in_kdtrace.c | 1 + sys/netinet/in_kdtrace.h | 1 + sys/netinet/tcp_output.c | 3 +++ sys/netinet/tcp_var.h | 3 ++- usr.bin/netstat/inet.c | 8 +++++--- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/netinet/in_kdtrace.c b/sys/netinet/in_kdtrace.c index 2a53b11c3be2..8491a4d49d91 100644 --- a/sys/netinet/in_kdtrace.c +++ b/sys/netinet/in_kdtrace.c @@ -294,6 +294,7 @@ MIB_PROBE_TCP(tcps_finwait2_drops); MIB_PROBE_TCP(tcps_sack_recovery_episode); MIB_PROBE_TCP(tcps_sack_rexmits); +MIB_PROBE_TCP(tcps_sack_rexmits_tso); MIB_PROBE_TCP(tcps_sack_rexmit_bytes); MIB_PROBE_TCP(tcps_sack_rcv_blocks); MIB_PROBE_TCP(tcps_sack_send_blocks); diff --git a/sys/netinet/in_kdtrace.h b/sys/netinet/in_kdtrace.h index 780839299993..9896af96eb84 100644 --- a/sys/netinet/in_kdtrace.h +++ b/sys/netinet/in_kdtrace.h @@ -286,6 +286,7 @@ SDT_PROBE_DECLARE(mib, tcp, count, tcps_finwait2_drops); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_recovery_episode); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits); +SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits_tso); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmit_bytes); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rcv_blocks); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_send_blocks); diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index e64b7701c453..c318e8517c2e 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1037,6 +1037,9 @@ send: TCPSTAT_ADD(tcps_sndrexmitbyte, len); if (sack_rxmit) { TCPSTAT_INC(tcps_sack_rexmits); + if (tso) { + TCPSTAT_INC(tcps_sack_rexmits_tso); + } TCPSTAT_ADD(tcps_sack_rexmit_bytes, len); } #ifdef STATS diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 6d60c21e64e9..01dd7198511c 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1030,6 +1030,7 @@ struct tcpstat { /* SACK related stats */ uint64_t tcps_sack_recovery_episode; /* SACK recovery episodes */ uint64_t tcps_sack_rexmits; /* SACK rexmit segments */ + uint64_t tcps_sack_rexmits_tso; /* SACK rexmit TSO chunks */ uint64_t tcps_sack_rexmit_bytes; /* SACK rexmit bytes */ uint64_t tcps_sack_rcv_blocks; /* SACK blocks (options) received */ uint64_t tcps_sack_send_blocks; /* SACK blocks (options) sent */ @@ -1088,7 +1089,7 @@ struct tcpstat { uint64_t tcps_tlpresend_bytes; /* number of bytes resent by tlp */ - uint64_t _pad[4]; /* 4 TBD placeholder for STABLE */ + uint64_t _pad[3]; /* 3 TBD placeholder for STABLE */ }; #define tcps_rcvmemdrop tcps_rcvreassfull /* compat */ diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 0657926eab80..5d7fd0e46cf1 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -783,11 +783,13 @@ tcp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) p(tcps_sack_recovery_episode, "\t{:recovery-episodes/%ju} " "{N:/SACK recovery episode%s}\n"); - p(tcps_sack_rexmits, "\t{:segment-retransmits/%ju} " + p(tcps_sack_rexmits, "\t{:segment-retransmits/%ju} " "{N:/segment rexmit%s in SACK recovery episodes}\n"); - p(tcps_sack_rexmit_bytes, "\t{:byte-retransmits/%ju} " + p(tcps_sack_rexmits_tso, "\t{:tso-chunk-retransmits/%ju} " + "{N:/tso chunk rexmit%s in SACK recovery episodes}\n"); + p(tcps_sack_rexmit_bytes, "\t{:byte-retransmits/%ju} " "{N:/byte rexmit%s in SACK recovery episodes}\n"); - p(tcps_sack_rcv_blocks, "\t{:received-blocks/%ju} " + p(tcps_sack_rcv_blocks, "\t{:received-blocks/%ju} " "{N:/SACK option%s (SACK blocks) received}\n"); p(tcps_sack_send_blocks, "\t{:sent-option-blocks/%ju} " "{N:/SACK option%s (SACK blocks) sent}\n");