On Friday, October 17, 2014 11:32:13 PM Jason Wolfe wrote:
> Producing 10G of random traffic against a server with this assertion
> added took about 2 hours to panic, so if it turns out we need anything
> further it should be pretty quick.
> 
> #4 list
> 2816                     * timer and remember to restart (more output or 
> persist).
> 2817                     * If there is more data to be acked, restart 
> retransmit
> 2818                     * timer, using current (possibly backed-off) value.
> 2819                     */
> 2820                    if (th->th_ack == tp->snd_max) {
> 2821                            tcp_timer_activate(tp, TT_REXMT, 0);
> 2822                            needoutput = 1;
> 2823                    } else if (!tcp_timer_active(tp, TT_PERSIST))
> 2824                            tcp_timer_activate(tp, TT_REXMT, 
> tp->t_rxtcur);

Bah, this is just a bug in my assertion.  Rather than having a separate
tcp_timer_deactivate() routine, a delta of 0 passed to tcp_timer_activate()
means "stop the timer".  My assertions were incorrect and need to exclude the
stop case.  Here is an updated patch (or you can just fix yours locally):

Index: tcp_timer.c
===================================================================
--- tcp_timer.c (revision 273219)
+++ tcp_timer.c (working copy)
@@ -869,10 +869,16 @@ tcp_timer_activate(struct tcpcb *tp, int timer_typ
                case TT_REXMT:
                        t_callout = &tp->t_timers->tt_rexmt;
                        f_callout = tcp_timer_rexmt;
+                       if (callout_active(&tp->t_timers->tt_persist) &&
+                           delta != 0)
+                               panic("scheduling retransmit with persist 
active");
                        break;
                case TT_PERSIST:
                        t_callout = &tp->t_timers->tt_persist;
                        f_callout = tcp_timer_persist;
+                       if (callout_active(&tp->t_timers->tt_rexmt) &&
+                           delta != 0)
+                               panic("scheduling persist with retransmit 
active");
                        break;
                case TT_KEEP:
                        t_callout = &tp->t_timers->tt_keep;


-- 
John Baldwin
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to