Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Apr 2023 11:12:37 GMT
From:      Randall Stewart <rrs@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 01216268f89e - main - tcp: hpts needs to still call output even after input.
Message-ID:  <202304211112.33LBCblV022806@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by rrs:

URL: https://cgit.FreeBSD.org/src/commit/?id=01216268f89ef5403530446bda5b52a8e87ca544

commit 01216268f89ef5403530446bda5b52a8e87ca544
Author:     Randall Stewart <rrs@FreeBSD.org>
AuthorDate: 2023-04-21 11:12:25 +0000
Commit:     Randall Stewart <rrs@FreeBSD.org>
CommitDate: 2023-04-21 11:12:25 +0000

    tcp: hpts needs to still call output even after input.
    
    The other stacks it turns out actually expect the output to be called and can become stuck if it is
    not. This is because they run there timer code from there and the input routine does not always
    assure a timer is running. The real longterm fix here might be to go into the other stacks (rack and bbr)
    and make sure that a timer is running after input if you don't do output.. as well as call the timer functions.
    This would cut down on calls from hpts. But I think its too dramatic of a change for the immediate time.
    
    Reviewed by: tuexen, glebius
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39738
---
 sys/netinet/tcp_hpts.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c
index 2aa4135c7a25..cc1bd71d0d43 100644
--- a/sys/netinet/tcp_hpts.c
+++ b/sys/netinet/tcp_hpts.c
@@ -1348,11 +1348,10 @@ again:
 					/* The input killed the connection */
 					goto skip_pacing;
 				}
-			} else {
-				error = tcp_output(tp);
-				if (error < 0)
-					goto skip_pacing;
 			}
+			error = tcp_output(tp);
+			if (error < 0)
+				goto skip_pacing;
 			if (ninp) {
 				/*
 				 * If we have a nxt inp, see if we can



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304211112.33LBCblV022806>