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

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
rG2b3a77467dd3: hpts: make stacks responsible for tcp_hpts_init()
Branches
Unknown
Tags
Unknown