Page MenuHomeFreeBSD

tcp_hostcache: limit scope of struct hc_metrics_lite and rename with tcp_ prefix
ClosedPublic

Authored by rscheff on Jul 24 2026, 8:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 21, 11:58 PM
Unknown Object (File)
Fri, Aug 21, 11:57 PM
Unknown Object (File)
Fri, Aug 21, 3:22 AM
Unknown Object (File)
Mon, Aug 17, 5:12 PM
Unknown Object (File)
Mon, Aug 17, 12:39 AM
Unknown Object (File)
Sun, Aug 16, 8:08 PM
Unknown Object (File)
Sun, Aug 16, 4:16 PM
Unknown Object (File)
Sun, Aug 16, 11:04 AM
Subscribers

Details

Summary
For some reason, the scope of the struct hc_metrics_lite was not restricted
to kernel modules but also visible to userspace. As the naming also reflected
an idiosyncracy, prefix with tcp_ and restrict the scope to the kernel only.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

If renaming, I would suggest drop the _lite prefix. It is lite only when you look from inside the hostcache module. For the rest of TCP it is just KPI structure. Doesn't make any sense outside. The name struct tcp_hc_metrics would be great. I should have done that in 09000cc133d8.

sys/netinet/tcp_var.h
910

The comment should be dropped. It must not speaking of program correctness -- we don't cast or copy one to other.

  • complete renaming from hc_metrics_lite to tcp_hc_metrics, including abbreviated variable names
This revision was not accepted when it landed; it landed in state Needs Review.Tue, Jul 28, 9:21 PM
This revision was automatically updated to reflect the committed changes.