Don't delay the ACK for a TCP segment with the CWR flag set.

This allows the data sender to increase the CWND faster.

Submitted by:		Richard Scheffenegger
Reviewed by:		rgrimes@, tuexen@, Cheng Cui
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D22670
This commit is contained in:
Michael Tuexen 2020-01-24 22:50:23 +00:00
parent 8f63a52bdb
commit ee97681e5c
2 changed files with 6 additions and 2 deletions

View File

@ -1545,8 +1545,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
* TCP ECN processing.
*/
if (tp->t_flags2 & TF2_ECN_PERMIT) {
if (thflags & TH_CWR)
if (thflags & TH_CWR) {
tp->t_flags2 &= ~TF2_ECN_SND_ECE;
tp->t_flags |= TF_ACKNOW;
}
switch (iptos & IPTOS_ECN_MASK) {
case IPTOS_ECN_CE:
tp->t_flags2 |= TF2_ECN_SND_ECE;

View File

@ -7701,8 +7701,10 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so,
* this to occur after we've validated the segment.
*/
if (tp->t_flags2 & TF2_ECN_PERMIT) {
if (thflags & TH_CWR)
if (thflags & TH_CWR) {
tp->t_flags2 &= ~TF2_ECN_SND_ECE;
tp->t_flags |= TF_ACKNOW;
}
switch (iptos & IPTOS_ECN_MASK) {
case IPTOS_ECN_CE:
tp->t_flags2 |= TF2_ECN_SND_ECE;