git: 1a61a673a370 - main - tcp: save progress timeout cause in connection end status

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Fri, 24 Oct 2025 19:49:43 UTC
The branch main has been updated by tuexen:

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

commit 1a61a673a3700c0ebdb0c5847b5923d0e3641f89
Author:     Peter Lei <peterlei@netflix.com>
AuthorDate: 2025-10-24 19:47:12 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-10-24 19:47:12 +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
    MFC after:      3 days
    Sponsored by:   Netflix, Inc.
---
 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;
 	}
 	/*