tcp: Dragging RescueRxt along with HighRxt should depend on tcp.rescuesack_agg
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 4 May 2012 04:16:21 +0000 (12:16 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 4 May 2012 05:30:22 +0000 (13:30 +0800)
sys/netinet/tcp_input.c
sys/netinet/tcp_sack.c

index 6af9777..a9da6e8 100644 (file)
@@ -3253,7 +3253,8 @@ tcp_sack_rexmt(struct tcpcb *tp, struct tcphdr *th)
                if (SEQ_LT(nextrexmt, old_snd_max) &&
                    SEQ_LT(tp->rexmt_high, tp->snd_nxt)) {
                        tp->rexmt_high = seq_min(tp->snd_nxt, old_snd_max);
-                       if ((tp->t_flags & TF_SACKRESCUED) &&
+                       if (tcp_aggressive_rescuesack &&
+                           (tp->t_flags & TF_SACKRESCUED) &&
                            SEQ_LT(tp->rexmt_rescue, tp->rexmt_high)) {
                                /* Drag RescueRxt along with HighRxt */
                                tp->rexmt_rescue = tp->rexmt_high;
index dc3849a..485c09d 100644 (file)
@@ -342,7 +342,7 @@ tcp_sack_update_scoreboard(struct tcpcb *tp, struct tcpopt *to)
        if (tp->t_flags & TF_SACKRESCUED) {
                if (SEQ_LT(tp->rexmt_rescue, tp->snd_una)) {
                        tp->t_flags &= ~TF_SACKRESCUED;
-               } else if (rexmt_high_update &&
+               } else if (tcp_aggressive_rescuesack && rexmt_high_update &&
                    SEQ_LT(tp->rexmt_rescue, tp->rexmt_high)) {
                        /* Drag RescueRxt along with HighRxt */
                        tp->rexmt_rescue = tp->rexmt_high;