diff --git a/sys/netinet/cc/cc_dctcp.c b/sys/netinet/cc/cc_dctcp.c index 4e143eb45551..72aa8f73c0d3 100644 --- a/sys/netinet/cc/cc_dctcp.c +++ b/sys/netinet/cc/cc_dctcp.c @@ -284,7 +284,6 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type) dctcp_data->ece_curr = 1; break; case CC_RTO: - CCV(ccv, t_flags2) |= TF2_ECN_SND_CWR; dctcp_update_alpha(ccv); dctcp_data->save_sndnxt += CCV(ccv, t_maxseg); dctcp_data->num_cong_events++; diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 91a10ee31503..5050210ca1b3 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -460,6 +460,8 @@ cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type) tp->snd_ssthresh = max(2, min(tp->snd_wnd, tp->snd_cwnd) / 2 / maxseg) * maxseg; tp->snd_cwnd = maxseg; + if (tp->t_flags2 & TF2_ECN_PERMIT) + tp->t_flags2 |= TF2_ECN_SND_CWR; break; case CC_RTO_ERR: TCPSTAT_INC(tcps_sndrexmitbad); diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 4f3bc4c732c4..bbb3756c6bfa 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -1813,6 +1813,8 @@ rack_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type) tp->snd_ssthresh = max(2, min(tp->snd_wnd, tp->snd_cwnd) / 2 / ctf_fixed_maxseg(tp)) * ctf_fixed_maxseg(tp); tp->snd_cwnd = ctf_fixed_maxseg(tp); + if (tp->t_flags2 & TF2_ECN_PERMIT) + tp->t_flags2 |= TF2_ECN_SND_CWR; break; case CC_RTO_ERR: TCPSTAT_INC(tcps_sndrexmitbad);