1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

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
This commit is contained in:
Randall Stewart 2022-02-23 16:25:56 -05:00
parent 97e1303791
commit a43b0aca12

View File

@ -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 @@ rack_fast_output(struct tcpcb *tp, struct tcp_rack *rack, uint64_t ts_val,
}
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)){