svn commit: r221346 - head/sys/netinet

Mikolaj Golub trociny at freebsd.org
Wed Jun 8 20:46:17 UTC 2011


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


More information about the svn-src-all mailing list