tcp: clean PRR state after ECN congestion recovery.

PRR state was not properly reset on subsequent ECN CE
events. Clean up after local transmission failures too.

Reviewed by:           tuexen, cc, #transport
MFC after:             3 days
Sponsored by:          NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43170
This commit is contained in:
Richard Scheffenegger 2024-01-08 09:28:01 +01:00
parent f4574e2dc5
commit 429f14f83a
2 changed files with 3 additions and 0 deletions

View file

@ -483,6 +483,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th)
/* XXXLAS: EXIT_RECOVERY ? */
tp->t_bytes_acked = 0;
tp->sackhint.delivered_data = 0;
tp->sackhint.prr_delivered = 0;
tp->sackhint.prr_out = 0;
}

View file

@ -1663,6 +1663,8 @@ tcp_default_output(struct tcpcb *tp)
if (flags & TH_FIN)
tp->snd_nxt--;
}
if (IN_RECOVERY(tp->t_flags))
tp->sackhint.prr_out -= len;
}
SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */
switch (error) {