HomeFreeBSD

tcp: simplify stack switching protocol

Description

tcp: simplify stack switching protocol

Before this patch, a stack (tfb) accepts a tcpcb (tp), if the
tp->t_state is TCPS_CLOSED or tfb->tfb_tcp_handoff_ok is not NULL
and tfb->tfb_tcp_handoff_ok(tp) returns 0.
After this patch, the only check is tfb->tfb_tcp_handoff_ok(tp)
returns 0. tfb->tfb_tcp_handoff_ok must always be provided.
For existing TCP stacks (FreeBSD, RACK and BBR) there is no
functional change. However, the logic is simpler.

Reviewed by: lstewart, peter_lei_ieee_.org, rrs
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45253

(cherry picked from commit 86c9325d341fc3f39543bcfaf7c3bb3ceeacbe5d)

Details

Provenance
tuexenAuthored on Jun 6 2024, 6:29 AM
Reviewer
lstewart
Differential Revision
D45253: tcp: simplify stack switching protocol
Parents
rG205157fafc25: tcp: fix sending RST after second inp lookup
Branches
Unknown
Tags
Unknown