git: df023b0275ed - releng/15.0 - tcp: save progress timeout cause in connection end status

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Tue, 28 Oct 2025 21:23:39 UTC
The branch releng/15.0 has been updated by cperciva:

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

commit df023b0275edf17211dd10204c11cab426075ed0
Author:     Peter Lei <peterlei@netflix.com>
AuthorDate: 2025-10-24 19:47:12 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-10-28 21:23:02 +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.
    
    Approved by:    re (cperciva)
    Reviewed by:    tuexen
    Sponsored by:   Netflix, Inc.
    
    (cherry picked from commit 1a61a673a3700c0ebdb0c5847b5923d0e3641f89)
    (cherry picked from commit 6b81787240d8abe5d0f8d8d9d9cb6b87c3ed99bf)
---
 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;
 	}
 	/*