git: 6b81787240d8 - stable/15 - tcp: save progress timeout cause in connection end status

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Mon, 27 Oct 2025 22:49:39 UTC
The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=6b81787240d8abe5d0f8d8d9d9cb6b87c3ed99bf

commit 6b81787240d8abe5d0f8d8d9d9cb6b87c3ed99bf
Author:     Peter Lei <peterlei@netflix.com>
AuthorDate: 2025-10-24 19:47:12 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-10-27 22:44:40 +0000

    tcp: save progress timeout cause in connection end status
    
    TCP stats are currently incremented for the persist and progress
    timeout conditions, but only the persist cause was saved in the
    connection end info status, which in turn is logged in the
    blackbox "connection end" event.
    
    Reviewed by:    tuexen
    Sponsored by:   Netflix, Inc.
    
    (cherry picked from commit 1a61a673a3700c0ebdb0c5847b5923d0e3641f89)
---
 sys/netinet/tcp_timer.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 3b9fe7a317b0..57c57666fa3a 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -513,9 +513,12 @@ tcp_timer_persist(struct tcpcb *tp)
 	if (progdrop || (tp->t_rxtshift >= V_tcp_retries &&
 	    (ticks - tp->t_rcvtime >= tcp_maxpersistidle ||
 	     ticks - tp->t_rcvtime >= TCP_REXMTVAL(tp) * tcp_totbackoff))) {
-		if (!progdrop)
+		if (progdrop) {
+			tcp_log_end_status(tp, TCP_EI_STATUS_PROGRESS);
+		} else {
 			TCPSTAT_INC(tcps_persistdrop);
-		tcp_log_end_status(tp, TCP_EI_STATUS_PERSIST_MAX);
+			tcp_log_end_status(tp, TCP_EI_STATUS_PERSIST_MAX);
+		}
 		goto dropit;
 	}
 	/*