tcp: remove tcptw, the compressed timewait state structure
authorGleb Smirnoff <glebius@FreeBSD.org>
Fri, 7 Oct 2022 02:22:23 +0000 (19:22 -0700)
committerGleb Smirnoff <glebius@FreeBSD.org>
Fri, 7 Oct 2022 02:22:23 +0000 (19:22 -0700)
commit0d7445193abc7c68703fd9b6de39f3f6cf6b55c9
treebcf338c82244f0611770b4de5f04e2c0f6b179bd
parentf48114b653a2a3d8f817ad68186235595ce304ed
tcp: remove tcptw, the compressed timewait state structure

The memory savings the tcptw brought back in 2003 (see 340c35de6a2) no
longer justify the complexity required to maintain it.  For longer
explanation please check out the email [1].

Surpisingly through almost 20 years the TCP stack functionality of
handling the TIME_WAIT state with a normal tcpcb did not bitrot.  The
existing tcp_input() properly handles a tcpcb in TCPS_TIME_WAIT state,
which is confirmed by the packetdrill tcp-testsuite [2].

This change just removes tcptw and leaves INP_TIMEWAIT.  The flag will
be removed in a separate commit.  This makes it easier to review and
possibly debug the changes.

[1] https://lists.freebsd.org/archives/freebsd-net/2022-January/001206.html
[2] https://github.com/freebsd-net/tcp-testsuite

Differential revision: https://reviews.freebsd.org/D36398
sys/netinet/in_pcb.c
sys/netinet/tcp_input.c
sys/netinet/tcp_stacks/bbr.c
sys/netinet/tcp_stacks/rack.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_timer.c
sys/netinet/tcp_timer.h
sys/netinet/tcp_timewait.c
sys/netinet/tcp_var.h
sys/netinet/toecore.c
sys/netinet6/in6_pcb.c