net: tcp: Always set the retrans timer
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 19 Jun 2017 18:06:53 +0000 (14:06 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 20 Jul 2017 12:19:46 +0000 (08:19 -0400)
The check was for the largest possible packet.  With TSO, we send a lot of
different packet sizes, so the largest-packet check doesn't make as much
sense.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/net/tcp.c

index 053d417..bd7f7cb 100644 (file)
@@ -2692,15 +2692,11 @@ void tcpoutput(struct conv *s)
                        if (tcb->timer.state != TcptimerON)
                                tcpgo(tpriv, &tcb->timer);
 
-                       /*  If round trip timer isn't running, start it.
-                        *  measure the longest packet only in case the
-                        *  transmission time dominates RTT
-                        */
-                       if (tcb->rtt_timer.state != TcptimerON)
-                               if (ssize == tcb->mss) {
-                                       tcpgo(tpriv, &tcb->rtt_timer);
-                                       tcb->rttseq = tcb->snd.ptr;
-                               }
+                       /* If round trip timer isn't running, start it. */
+                       if (tcb->rtt_timer.state != TcptimerON) {
+                               tcpgo(tpriv, &tcb->rtt_timer);
+                               tcb->rttseq = tcb->snd.ptr;
+                       }
                }
 
                tpriv->stats[OutSegs]++;