The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=79059e0ec9b1d3273ce32fdd028802fcad4b85ab
commit 79059e0ec9b1d3273ce32fdd028802fcad4b85ab Author: Nick Banks <nickba...@netflix.com> AuthorDate: 2025-08-01 21:21:42 +0000 Commit: Michael Tuexen <tue...@freebsd.org> CommitDate: 2025-08-01 21:21:42 +0000 tcp: Fix wrap around comparison bug The variables p_curtick and p_lasttick are not in usecs. Reviewed by: tuexen MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_hpts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 22fc99496d34..b77ebc928809 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1163,8 +1163,7 @@ again: hpts->p_wheel_complete = 0; HPTS_MTX_ASSERT(hpts); slots_to_run = hpts_slots_diff(hpts->p_prev_slot, hpts->p_cur_slot); - if (((hpts->p_curtick - hpts->p_lasttick) > - ((NUM_OF_HPTSI_SLOTS-1) * HPTS_USECS_PER_SLOT)) && + if (((hpts->p_curtick - hpts->p_lasttick) > (NUM_OF_HPTSI_SLOTS - 1)) && (hpts->p_on_queue_cnt != 0)) { /* * Wheel wrap is occuring, basically we