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)
Sun, Nov 17, 12:34 AM
Unknown Object (File)
Fri, Oct 25, 2:31 AM
Unknown Object (File)
Oct 4 2024, 11:21 AM
Unknown Object (File)
Oct 2 2024, 12:26 PM
Unknown Object (File)
Oct 2 2024, 10:30 AM
Unknown Object (File)
Sep 23 2024, 6:50 PM
Unknown Object (File)
Sep 19 2024, 3:45 PM
Unknown Object (File)
Sep 9 2024, 4:38 AM
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 43149
Build 40037: arc lint + arc unit

Event Timeline

sys/netinet/tcp_timer.c
122–123

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?