svn commit: r357101 - in head/sys/netinet: . tcp_stacks

Michael Tuexen tuexen at FreeBSD.org
Fri Jan 24 22:50:24 UTC 2020


Author: tuexen
Date: Fri Jan 24 22:50:23 2020
New Revision: 357101
URL: https://svnweb.freebsd.org/changeset/base/357101

Log:
  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

Modified:
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_stacks/rack.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Fri Jan 24 22:37:53 2020	(r357100)
+++ head/sys/netinet/tcp_input.c	Fri Jan 24 22:50:23 2020	(r357101)
@@ -1545,8 +1545,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
 	 * 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;

Modified: head/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- head/sys/netinet/tcp_stacks/rack.c	Fri Jan 24 22:37:53 2020	(r357100)
+++ head/sys/netinet/tcp_stacks/rack.c	Fri Jan 24 22:50:23 2020	(r357101)
@@ -7701,8 +7701,10 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr
 	 * 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;


More information about the svn-src-all mailing list