Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Jun 2011 23:46:06 +0300
From:      Mikolaj Golub <trociny@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Mike Silbersack <silby@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, Bjoern Zeeb <bz@freebsd.org>, svn-src-head@freebsd.org, Lawrence Stewart <lstewart@freebsd.org>
Subject:   Re: svn commit: r221346 - head/sys/netinet
Message-ID:  <86tyc0xd9t.fsf@kopusha.home.net>
In-Reply-To: <201106030944.36200.jhb@freebsd.org> (John Baldwin's message of "Fri, 3 Jun 2011 09:44:36 -0400")
References:  <201105022105.p42L5q3j054498@svn.freebsd.org> <4DCE93BF.7000803@FreeBSD.org> <86boz5fby1.fsf@kopusha.home.net> <201106030944.36200.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, 3 Jun 2011 09:44:36 -0400 John Baldwin wrote:

 JB> Please try this change.  What is happening is that you have a remaining
 JB> window that is smaller than the window scale.  You are receiving zero
 JB> window updates that are received ok (becuase the socket buffer isn't
 JB> completely empty), and that advance rcv_nxt.  However, tcp_output() is
 JB> not advancing rcv_adv because 'recwin' is calculated as zero.  My
 JB> invariants had assumed that the ACK that gets forced out for a reply
 JB> to a zero window probe would move rcv_adv, but that isn't happening.
 JB> This patch will allow rcv_adv to advance when a zero window probe is
 JB> ACK'd.  I'm not sure if this is the best way to fix this, but I think
 JB> it will fix it:

 JB> Index: tcp_output.c
 JB> ===================================================================
 JB> --- tcp_output.c        (revision 222565)
 JB> +++ tcp_output.c        (working copy)
 JB> @@ -1331,7 +1331,7 @@ out:
 JB>           * then remember the size of the advertised window.
 JB>           * Any pending ACK has now been sent.
 JB>           */
 JB> -        if (recwin > 0 && SEQ_GT(tp->rcv_nxt + recwin, tp->rcv_adv))
 JB> +        if (recwin >= 0 && SEQ_GT(tp->rcv_nxt + recwin, tp->rcv_adv))
 JB>                  tp->rcv_adv = tp->rcv_nxt + recwin;
 JB>          tp->last_ack_sent = tp->rcv_nxt;
 JB>          tp->t_flags &= ~(TF_ACKNOW | TF_DELACK);


Sorry for the delay -- I was offline :-).

Thanks, with the patch I can't reproduce the issue. I am going to run
additional tests in the coming days and will inform you if I find something
suspicious.

-- 
Mikolaj Golub



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86tyc0xd9t.fsf>