Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jan 2020 15:29:15 +0000 (UTC)
From:      Randall Stewart <rrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356417 - in head/sys/netinet: . tcp_stacks
Message-ID:  <202001061529.006FTFwN040870@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rrs
Date: Mon Jan  6 15:29:14 2020
New Revision: 356417
URL: https://svnweb.freebsd.org/changeset/base/356417

Log:
  This catches rack up in the recent changes to ECN and
  also commonizes the functions that both the freebsd and
  rack stack uses.
  
  Sponsored by:Netflix Inc
  Differential Revision:	https://reviews.freebsd.org/D23052

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

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Mon Jan  6 13:21:10 2020	(r356416)
+++ head/sys/netinet/tcp_input.c	Mon Jan  6 15:29:14 2020	(r356417)
@@ -514,7 +514,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th)
 	    (tlen <= tp->t_maxseg) &&					\
 	    (V_tcp_delack_enabled || (tp->t_flags & TF_NEEDSYN)))
 
-static void inline
+void inline
 cc_ecnpkt_handler(struct tcpcb *tp, struct tcphdr *th, uint8_t iptos)
 {
 	INP_WLOCK_ASSERT(tp->t_inpcb);

Modified: head/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- head/sys/netinet/tcp_stacks/rack.c	Mon Jan  6 13:21:10 2020	(r356416)
+++ head/sys/netinet/tcp_stacks/rack.c	Mon Jan  6 15:29:14 2020	(r356417)
@@ -7715,6 +7715,10 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr
 			TCPSTAT_INC(tcps_ecn_ect1);
 			break;
 		}
+
+		/* Process a packet differently from RFC3168. */
+		cc_ecnpkt_handler(tp, th, iptos);
+
 		/* Congestion experienced. */
 		if (thflags & TH_ECE) {
 			rack_cong_signal(tp, th, CC_ECN);

Modified: head/sys/netinet/tcp_var.h
==============================================================================
--- head/sys/netinet/tcp_var.h	Mon Jan  6 13:21:10 2020	(r356416)
+++ head/sys/netinet/tcp_var.h	Mon Jan  6 15:29:14 2020	(r356417)
@@ -891,6 +891,7 @@ void	cc_ack_received(struct tcpcb *tp, struct tcphdr *
 			    uint16_t nsegs, uint16_t type);
 void 	cc_conn_init(struct tcpcb *tp);
 void 	cc_post_recovery(struct tcpcb *tp, struct tcphdr *th);
+void    cc_ecnpkt_handler(struct tcpcb *tp, struct tcphdr *th, uint8_t iptos);
 void	cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type);
 #ifdef TCP_HHOOK
 void	hhook_run_tcp_est_in(struct tcpcb *tp,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001061529.006FTFwN040870>