HomeFreeBSD

tcp/hpts: make stacks responsible for clearing themselves out HPTS

Description

tcp/hpts: make stacks responsible for clearing themselves out HPTS

There already is the tfb_tcp_timer_stop_all method that is supposed to stop
all time events associated with a given tcpcb by given stack. Some time
ago it was doing actual callout_stop(). Today bbr/rack just mark their
internal state as inactive in their tfb_tcp_timer_stop_all methods, but
tcpcb stays in HPTS wheel and potentially called in from HPTS. Change the
methods to also call tcp_hpts_remove(). Note: I'm not sure if internal
flag is still relevant once we are out of HPTS wheel.

Call the method when connection goes into TCP_CLOSED state, instead of
calling it later when tcpcb is freed. Also call it when we switch between
stacks.

Reviewed by: tuexen, rrs
Differential Revision: https://reviews.freebsd.org/D42857

(cherry picked from commit d2ef52ef3dee38cccb7f54d33ecc2a4b944dad9d)

Details

Provenance
glebiusAuthored on Dec 4 2023, 6:19 PM
Reviewer
tuexen
Differential Revision
D42857: tcp/hpts: make stacks responsible for clearing themselves out HPTS
Parents
rG76deefc548e5: hpts: make stacks responsible for tcp_hpts_init()
Branches
Unknown
Tags
Unknown