While getting more information around PR296474 it was found that existing configurations can end up with unexpectedly long pruning intervals, which defy an explict short expire timeout of the hostcache entries. When configuring the expire timeout to something short, make sure that the prune time runs at least at that interval. Similarly, when adjusting the prune interval up, ensure the expire timeout reflect that expected minimum time also. MFC after 3 days alongside D58360
Details
Details
- Reviewers
tuexen dch glebius peter.lei_ieee.org - Group Reviewers
transport - Commits
- rG2d01998e9e8a: tcp_hostcache: ensure expire and prune values stay consistent with each other
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 75131 Build 72014: arc lint + arc unit
Event Timeline
Comment Actions
I agree that switching to unsigned for time intervals should be more correct. But the struct tcp_hostcache members now are int and that makes the sysctls to be signed. If structure members are also changed, a more thorough review of all the code that uses expire and prune needed. @rscheff since you already catched one difficult signedness bug in this code, maybe you can do such sweep, too?
Comment Actions
Checking the use of purge, purgeall and expire, I agree with @pouria that those should be uint; their use is benign as they really only interface with userland / sysctl, and negative values for them are illogical. Validation handling for negatives is then handled by sysctl_handler_int already too.
Fix other sim