Page MenuHomeFreeBSD

Add sysctl to disable the TCP hostcache
ClosedPublic

Authored by j-nitrology.com on May 4 2016, 4:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 5:29 AM
Unknown Object (File)
Fri, Nov 22, 11:43 PM
Unknown Object (File)
Tue, Nov 19, 6:35 PM
Unknown Object (File)
Oct 1 2024, 4:47 PM
Unknown Object (File)
Oct 1 2024, 5:07 AM
Unknown Object (File)
Sep 27 2024, 2:56 PM
Unknown Object (File)
Sep 23 2024, 9:41 PM
Unknown Object (File)
Sep 18 2024, 2:11 PM

Details

Summary

This adds a sysctl which allows you to disable the TCP hostcache. This is handy during testing of network related changes where cached entries may pollute your results, or during known congestion events where you don't want to unfairly penalize hosts.

Prior to r232346 this would have meant you would break any connection with a sub 1500 MTU, as the hostcache was authoritative. All entries as they stand today should simply be used to pre populate values for efficiency.

Test Plan

This has been running in production at Limelight

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

j-nitrology.com retitled this revision from to Add sysctl to disable the TCP hostcache.
j-nitrology.com updated this object.
j-nitrology.com edited the test plan for this revision. (Show Details)
j-nitrology.com added a reviewer: hiren.
j-nitrology.com edited edge metadata.

The default needs to maintain the current behavior

bz requested changes to this revision.May 4 2016, 10:01 AM
bz added a reviewer: bz.
bz added a subscriber: bz.
bz added inline comments.
sys/netinet/tcp_hostcache.c
283 ↗(On Diff #15883)

This needs to go after variable declarations

341 ↗(On Diff #15883)

This needs to go after the variable declarations; same applies for all further down; I'll stop repeating myself ;)

470 ↗(On Diff #15883)

Maybe we should also fix the comment to say zero instead of NULL

This revision now requires changes to proceed.May 4 2016, 10:01 AM

This seems like a good idea, but fixing the style bugs (e.g., local variable definitions should be at the start of the function before any executable code) is necessary.

Making it per-VNET caused me slight pondering, but seems like the right overall choice.

I'm glad that the description of the patch indicates that code calling into the cache has been inspected for poor interactions with the cache being disabled. I assume experimentation has taken place on both IPv4 and IPv6?

j-nitrology.com edited edge metadata.

I've moved all functionality to post declaration and updated the comment about the return on tcp_hc_getmtu().
@rwatson yes I just figure it's a near free feature should you be using jails to do various testing. It has been tested with both v4 and v6 traffic.

When someone has a moment, might this look good after the updates?

Seems like this is good to go in. @bz @rwatson ?

I'll go ahead with a commit in a couple days if I don't hear anything back. Thank you for looking into it.

sbruno added a reviewer: sbruno.
sbruno added a subscriber: sbruno.

All review comments have been addressed by submitter.

rrs added a reviewer: rrs.
This revision was automatically updated to reflect the committed changes.