Page MenuHomeFreeBSD

tcp: virtualise net.inet.tcp.msl sysctl.
ClosedPublic

Authored by melifaro on Dec 4 2021, 10:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 8:22 PM
Unknown Object (File)
Sun, Apr 21, 9:08 PM
Unknown Object (File)
Mar 19 2024, 12:20 AM
Unknown Object (File)
Dec 27 2023, 3:59 AM
Unknown Object (File)
Dec 7 2023, 3:55 PM
Unknown Object (File)
Dec 7 2023, 3:55 PM
Unknown Object (File)
Nov 15 2023, 1:38 PM
Unknown Object (File)
Nov 11 2023, 8:35 PM
Subscribers

Details

Summary

VNET teardown waits 2*MSL (60 seconds by default) before expiring
tcp PCBs. These PCBs holds references to nexthops, which, in turn,
reference ifnets. This chain results in VNET interfaces being destroyed
and moved to default VNET only after 60 seconds.
Allow tcp_msl to be set in jail by virtualising net.inet.tcp.msl sysctl,
permitting more predictable VNET tests outcomes.

MFC after: 1 week

Test Plan
# s ifconfig lo create
lo3
# s jail -c name=test persist vnet vnet.interface="lo3"
# s jexec test sysctl net.inet.tcp.msl=100
net.inet.tcp.msl: 30000 -> 100
# s jexec test sysctl net.inet.tcp.msl
net.inet.tcp.msl: 100
# sysctl net.inet.tcp.msl
net.inet.tcp.msl: 30000

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43150
Build 40038: arc lint + arc unit

Event Timeline

sys/netinet/tcp_timer.c
122

While here you can remove CTLFLAG_NEEDGIANT.

melifaro edited the test plan for this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Dec 26 2021, 3:06 PM
This revision was automatically updated to reflect the committed changes.

Can't you use in the jail tcpdrop -s TIME_WAIT to deterministically terminate all TCP connection in the TIME_WAIT state?