Module Name: src Committed By: martin Date: Thu Sep 3 13:40:41 UTC 2020
Modified Files: src/sys/netinet [netbsd-8]: tcp_input.c Log Message: Pull up following revision(s) (requested by kardel in ticket #1602): sys/netinet/tcp_input.c: revision 1.419 Fix fast path for uni directional transfers pure ACK case: drag snd_wl2 along so only newer ACKs can update the window size. also avoids the state where snd_wl2 is eventually larger than th_ack and thus blocking the window update mechanism and the connection gets stuck for a loooong time in the zero sized send window state. see PR/kern 55567 ok thorpej@, also found in FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.357.4.5 -r1.357.4.6 src/sys/netinet/tcp_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/tcp_input.c diff -u src/sys/netinet/tcp_input.c:1.357.4.5 src/sys/netinet/tcp_input.c:1.357.4.6 --- src/sys/netinet/tcp_input.c:1.357.4.5 Wed Jul 8 13:48:36 2020 +++ src/sys/netinet/tcp_input.c Thu Sep 3 13:40:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.357.4.5 2020/07/08 13:48:36 martin Exp $ */ +/* $NetBSD: tcp_input.c,v 1.357.4.6 2020/09/03 13:40:41 martin Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.357.4.5 2020/07/08 13:48:36 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.357.4.6 2020/09/03 13:40:41 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2009,6 +2009,19 @@ after_listen: tp->snd_fack = tp->snd_una; if (SEQ_LT(tp->snd_high, tp->snd_una)) tp->snd_high = tp->snd_una; + /* + * drag snd_wl2 along so only newer + * ACKs can update the window size. + * also avoids the state where snd_wl2 + * is eventually larger than th_ack and thus + * blocking the window update mechanism and + * the connection gets stuck for a loooong + * time in the zero sized send window state. + * + * see PR/kern 55567 + */ + tp->snd_wl2 = tp->snd_una; + m_freem(m); /*