aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2022-02-23 21:25:56 +0000
committerRandall Stewart <rrs@FreeBSD.org>2022-02-23 21:25:56 +0000
commita43b0aca125e384dfd0bd9467baa033f01f00b40 (patch)
treed0e7b5657e9d27ebd95c52247edc4fe06059d24e
parent97e13037915c22162f199461f56951793d669f57 (diff)
downloadsrc-a43b0aca125e384dfd0bd9467baa033f01f00b40.tar.gz
src-a43b0aca125e384dfd0bd9467baa033f01f00b40.zip
tcp: Push bit failure to set in fastpath
Recently changes were made to the tcp stack to use a macro/function to set tcp flags. In the process the PUSH bit setting in the fastpath of rack was broken. This fixes that as well as cleans up a warning that is occurring when you don't have INVARIANT on (inp used in KASSERT). We can use the tcp test suite to find this bug the test plan shows the script that fails due to the missing push bit Reviewed by: rscheff, tuexen Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D34332
-rw-r--r--sys/netinet/tcp_stacks/rack.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 63a36c716531..7bab75a637fa 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -6258,11 +6258,11 @@ static int
rack_timeout_persist(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts)
{
struct tcptemp *t_template;
- struct inpcb *inp;
+#ifdef INVARIANTS
+ struct inpcb *inp = tp->t_inpcb;
+#endif
int32_t retval = 1;
- inp = tp->t_inpcb;
-
if (tp->t_timers->tt_flags & TT_STOPPED) {
return (1);
}
@@ -16217,7 +16217,7 @@ again:
}
if (rack->r_ctl.fsb.rfo_apply_push &&
(len == rack->r_ctl.fsb.left_to_send)) {
- tcp_set_flags(th, flags | TH_PUSH);
+ flags |= TH_PUSH;
add_flag |= RACK_HAD_PUSH;
}
if ((m->m_next == NULL) || (len <= 0)){