aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2025-01-06 19:35:11 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2025-01-06 19:39:40 +0000
commitbb9525f30214e8b6c53c6cccd9e8f02e8f8e8c42 (patch)
treeb4ac9e68108be585ff5490d849e2cdcada0f41bb
parentf415b2ef30f7bf0db753f09fbba7b0910475b0d2 (diff)
TCP RACK: fix TCP fast open
Do not jump to a place in the code, which requires several variables to be set (segsize, minseg, idle, len, sb_offset), which is not true. To avoid using these variables, start the HPTS timer explicitly. This fix only applies to the client side using TCP fast open. Approved by: rrs CID: 1523766 CID: 1523770 CID: 1523786 CID: 1523801 CID: 1523809 MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D48322
-rw-r--r--sys/netinet/tcp_stacks/rack.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index cc0725324760..7baf1a626787 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -19943,10 +19943,11 @@ rack_output(struct tcpcb *tp)
(tp->t_state == TCPS_SYN_SENT)) &&
SEQ_GT(tp->snd_max, tp->snd_una) && /* initial SYN or SYN|ACK sent */
(tp->t_rxtshift == 0)) { /* not a retransmit */
- cwnd_to_use = rack->r_ctl.cwnd_to_use = tp->snd_cwnd;
- so = inp->inp_socket;
- sb = &so->so_snd;
- goto just_return_nolock;
+ rack_start_hpts_timer(rack, tp, cts, 0, 0, 0);
+#ifdef TCP_ACCOUNTING
+ sched_unpin();
+#endif
+ return (0);
}
/*
* Determine length of data that should be transmitted, and flags