tcp_input: Partly revert 98cb2337e1000153d84b64a5e9aabbecda8e8dbf
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 11 Apr 2012 03:23:39 +0000 (11:23 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 11 Apr 2012 03:28:36 +0000 (11:28 +0800)
Since all TCP operations are carried in its own netisr thread, the
workaround/comment is no longer needed/applied; change it into
assertion instead.

The "snd_nxt < snd_una" should (hopefully) have been fixed by:
1ff9b7d322dc5a26f7173aa8c38ecb79da80e419

sys/netinet/tcp_input.c

index 86b3265..d8c90fb 100644 (file)
@@ -1985,16 +1985,10 @@ fastretransmit:
                                    tp->t_maxseg;
                                tcp_output(tp);
 
-                               /*
-                                * Other acks may have been processed,
-                                * snd_nxt cannot be reset to a value less
-                                * then snd_una.
-                                */
                                if (SEQ_LT(oldsndnxt, oldsndmax)) {
-                                   if (SEQ_GT(oldsndnxt, tp->snd_una))
+                                       KASSERT(SEQ_GEQ(oldsndnxt, tp->snd_una),
+                                           ("snd_una moved in other threads"));
                                        tp->snd_nxt = oldsndnxt;
-                                   else
-                                       tp->snd_nxt = tp->snd_una;
                                }
                                tp->snd_cwnd = oldcwnd;
                                sent = tp->snd_max - oldsndmax;