Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/netinet Pull up following revision(s) (requested by k...



details:   https://anonhg.NetBSD.org/src/rev/8aa26f1e13e6
branches:  netbsd-9
changeset: 964106:8aa26f1e13e6
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Sep 03 13:38:29 2020 +0000

description:
Pull up following revision(s) (requested by kardel in ticket #1074):

        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

diffstat:

 sys/netinet/tcp_input.c |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 843a62936498 -r 8aa26f1e13e6 sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c   Wed Sep 02 12:44:02 2020 +0000
+++ b/sys/netinet/tcp_input.c   Thu Sep 03 13:38:29 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_input.c,v 1.414.2.2 2020/07/07 11:00:54 martin Exp $       */
+/*     $NetBSD: tcp_input.c,v 1.414.2.3 2020/09/03 13:38:29 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.414.2.2 2020/07/07 11:00:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.414.2.3 2020/09/03 13:38:29 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1896,6 +1896,19 @@
                                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);
 
                                /*



Home | Main Index | Thread Index | Old Index