git: a43b0aca125e - main - tcp: Push bit failure to set in fastpath
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 23 Feb 2022 21:27:19 UTC
The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=a43b0aca125e384dfd0bd9467baa033f01f00b40 commit a43b0aca125e384dfd0bd9467baa033f01f00b40 Author: Randall Stewart <rrs@FreeBSD.org> AuthorDate: 2022-02-23 21:25:56 +0000 Commit: Randall Stewart <rrs@FreeBSD.org> CommitDate: 2022-02-23 21:25:56 +0000 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 --- sys/netinet/tcp_stacks/rack.c | 8 ++++---- 1 file 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)){