svn commit: r365571 - in stable/12/sys/netinet: . tcp_stacks

Michael Tuexen tuexen at FreeBSD.org
Thu Sep 10 13:17:24 UTC 2020


Author: tuexen
Date: Thu Sep 10 13:17:23 2020
New Revision: 365571
URL: https://svnweb.freebsd.org/changeset/base/365571

Log:
  MFC r357101:
  
  Don't delay the ACK for a TCP segment with the CWR flag set.
  This allows the data sender to increase the CWND faster.

Modified:
  stable/12/sys/netinet/tcp_input.c
  stable/12/sys/netinet/tcp_stacks/rack.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_input.c
==============================================================================
--- stable/12/sys/netinet/tcp_input.c	Thu Sep 10 13:15:17 2020	(r365570)
+++ stable/12/sys/netinet/tcp_input.c	Thu Sep 10 13:17:23 2020	(r365571)
@@ -1610,8 +1610,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
 	 * TCP ECN processing.
 	 */
 	if (tp->t_flags & TF_ECN_PERMIT) {
-		if (thflags & TH_CWR)
+		if (thflags & TH_CWR) {
 			tp->t_flags &= ~TF_ECN_SND_ECE;
+			tp->t_flags |= TF_ACKNOW;
+		}
 		switch (iptos & IPTOS_ECN_MASK) {
 		case IPTOS_ECN_CE:
 			tp->t_flags |= TF_ECN_SND_ECE;

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- stable/12/sys/netinet/tcp_stacks/rack.c	Thu Sep 10 13:15:17 2020	(r365570)
+++ stable/12/sys/netinet/tcp_stacks/rack.c	Thu Sep 10 13:17:23 2020	(r365571)
@@ -6733,8 +6733,10 @@ rack_hpts_do_segment(struct mbuf *m, struct tcphdr *th
 	 * this to occur after we've validated the segment.
 	 */
 	if (tp->t_flags & TF_ECN_PERMIT) {
-		if (thflags & TH_CWR)
+		if (thflags & TH_CWR) {
 			tp->t_flags &= ~TF_ECN_SND_ECE;
+			tp->t_flags |= TF_ACKNOW;
+		}
 		switch (iptos & IPTOS_ECN_MASK) {
 		case IPTOS_ECN_CE:
 			tp->t_flags |= TF_ECN_SND_ECE;


More information about the svn-src-stable-12 mailing list