HomeFreeBSD

Add tcp_freecb() - single place to free tcpcb.

Description

Add tcp_freecb() - single place to free tcpcb.

Until this change there were two places where we would free tcpcb -
tcp_discardcb() in case if all timers are drained and tcp_timer_discard()
otherwise. They were pretty much copy-n-paste, except that in the
default case we would run tcp_hc_update(). Merge this into single
function tcp_freecb() and move new short version of tcp_timer_discard()
to tcp_timer.c and make it static.

Reviewed by: rrs, hselasky
Differential revision: https://reviews.freebsd.org/D32965

Details

Provenance
glebiusAuthored on Nov 19 2021, 4:26 AM
Reviewer
rrs
Differential Revision
D32965: tcp_timewait: use on stack struct tcptw as last resort
Parents
rGfb8588d2cb44: tcp_timewait: use on stack struct tcptw as last resort
Branches
Unknown
Tags
Unknown