Page MenuHomeFreeBSD

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

Authored by rscheff on Fri, Jul 24, 8:32 PM.
Tags
None
Referenced Files
F164200500: D58440.diff
Wed, Jul 29, 2:33 PM
F164176251: D58440.id182630.diff
Wed, Jul 29, 9:13 AM
F164117448: D58440.diff
Tue, Jul 28, 9:39 PM
Unknown Object (File)
Mon, Jul 27, 9:48 AM
Unknown Object (File)
Sun, Jul 26, 3:39 PM
Unknown Object (File)
Sun, Jul 26, 1:51 PM
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.