From nobody Tue May 10 13:47:53 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 79F441AD15CA; Tue, 10 May 2022 13:47:53 +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 4KyK9j2yJ7z3Ny6; Tue, 10 May 2022 13:47:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652190473; 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=MKL5lTHU8lDL7+l2ACR9AA30bBPYzbu7KfcmrCE9KO4=; b=J1vmZpObyiv2zppF+6IJb09GAnbev/DznHzTeLcpccngxLyxnBiu2hzqIx0nRb4MMsH3nC y/Gv6uX3YfcWjTJ68zlthYAtivJVBzmfdl73UoO5TKpAaFIjP/7QWsNgIvRHffZ3GjnDoF 2D5fY+TFlbG6k8Sf/y1s6hzBM45zXef714npweLDv2mqwgM+qIkA/CRJn362itLpFX48dP dtno3/qH9SB/0oyC4AJf7/x8VT1QOJ+7ZbVUfP4w6fDCtvM2+zFnhGkjecJt2dft51VfxW cbs3WLu9/ZN8ojqbVHigbEC/pSGfAkZu6DZzjiDDAvLB70v25F3z0Dtp+XmcnQ== 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 424B1265A4; Tue, 10 May 2022 13:47:53 +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 24ADlrXn088335; Tue, 10 May 2022 13:47:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24ADlrWu088334; Tue, 10 May 2022 13:47:53 GMT (envelope-from git) Date: Tue, 10 May 2022 13:47:53 GMT Message-Id: <202205101347.24ADlrWu088334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 04831efd9f6b - main - tcp: Rack idle reduce not working. 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: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04831efd9f6b1426c160befdc9f7e6b8e1f3e272 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652190473; 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=MKL5lTHU8lDL7+l2ACR9AA30bBPYzbu7KfcmrCE9KO4=; b=x25TIWq9uWv/VR7pVOE1FDSJW1WHz5WwzaCJD0bn6wkVNqpK9082KSh93Yz322PZJp9Jj6 tHaUi18FLFoawhsiHe/zxE+neSFETdv0Dy7QSQQBrt0afWXYtHwBYUoHBNXQiHDnXwbAyF W3bc0/KZyuDw8RwlprC76YRsf0w/1jL7JH3d0HY/U4Ats1yv9Z8iuJQ62Oz4BQOfo26C8i bXrWQc2Oi6XKXpOYfJKD+5JOER6CgWtsEAVkjHcB/HmHyFC/oHAY4RCE52J1g9NMh3LYnp TfI4p0/oYrGRordD8LzW2laLSCfgLocZz5/rIALWxLl0i1AOkBwfH0wlldEwnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652190473; a=rsa-sha256; cv=none; b=D67KkXLyGdJWbZdD9orzIt7crMChg+BDIu9xDtXvFWLjEy/XPFpJvb+Rtjoq/ayAnBNsqj oGDSNjKVaq8sR9z2A1Fi+NL+gqmQACk19FWfs8lfjo9OUDNzK+GZawesy9p0zaFt4cvezU DC/vSKzxQH9HF0kD6ysXIuQTs51gRqcBfVBcymHf/6rT6XACt+HT9zQZN7iDL4ppPaIj/Q JMIG9izXjszXyFJvPOHCQHqmX1e67Gxq/f9xKrH6APp7SZt9KOQoPi53pxDOqiRXJPucQw mks/VohZIpBqoGYUbow7SkThqPwkrl+K5/KPhBmqUVjE8MtuRrEwDn1VIMoPwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=04831efd9f6b1426c160befdc9f7e6b8e1f3e272 commit 04831efd9f6b1426c160befdc9f7e6b8e1f3e272 Author: Randall Stewart AuthorDate: 2022-05-10 13:46:05 +0000 Commit: Randall Stewart CommitDate: 2022-05-10 13:46:05 +0000 tcp: Rack idle reduce not working. Rack converted to micro-seconds quite some time ago, but in testing we have found a miss in that work. The idle reduce time is still based in ticks, so it must be converted to microseconds before any comparisons else you will likely not do idle reduce. Reviewed by: tuexen, thj Sponsored by: Netflix Inc Differential Revision: https://reviews.freebsd.org/D35066 --- sys/netinet/tcp_stacks/rack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 30a23a578dd4..cda6bd1fcf84 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -13467,7 +13467,7 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb /* Update the rcv time and perform idle reduction possibly */ if (tp->t_idle_reduce && (tp->snd_max == tp->snd_una) && - ((ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { + (TICKS_2_USEC(ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { counter_u64_add(rack_input_idle_reduces, 1); rack_cc_after_idle(rack, tp); } @@ -14232,7 +14232,7 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if (tp->t_idle_reduce && (tp->snd_max == tp->snd_una) && - ((ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { + (TICKS_2_USEC(ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { counter_u64_add(rack_input_idle_reduces, 1); rack_cc_after_idle(rack, tp); } @@ -16783,7 +16783,7 @@ rack_output(struct tcpcb *tp) */ idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); if (tp->t_idle_reduce) { - if (idle && ((ticks - tp->t_rcvtime) >= tp->t_rxtcur)) + if (idle && (TICKS_2_USEC(ticks - tp->t_rcvtime) >= tp->t_rxtcur)) rack_cc_after_idle(rack, tp); } tp->t_flags &= ~TF_LASTIDLE;