From 21f337ca1878a323fd6d99c294588561cb6a89b6 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Fri, 4 May 2012 12:16:21 +0800 Subject: [PATCH] tcp: Dragging RescueRxt along with HighRxt should depend on tcp.rescuesack_agg --- sys/netinet/tcp_input.c | 3 ++- sys/netinet/tcp_sack.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 6af9777b91..a9da6e8da2 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -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; diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index dc3849a010..485c09d3c7 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -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; -- 2.41.0