Page MenuHomeFreeBSD

ip6_mroute: VNETify counters
ClosedPublic

Authored by markj on Sat, Apr 4, 11:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 15, 11:08 AM
Unknown Object (File)
Wed, Apr 15, 10:24 AM
Unknown Object (File)
Wed, Apr 15, 5:06 AM
Unknown Object (File)
Wed, Apr 15, 12:18 AM
Unknown Object (File)
Wed, Apr 15, 12:04 AM
Unknown Object (File)
Sat, Apr 11, 11:47 PM
Unknown Object (File)
Sat, Apr 11, 10:24 PM
Unknown Object (File)
Sat, Apr 11, 8:24 AM

Details

Summary

Commit a223d6c489c7 made most of the ip6_mroute state per-VNET, but
failed to do this for a couple of counter structures. Make them
per-VNET too.

Reported by: zlei
Fixes: a223d6c489c7 ("ip6_mroute: Start putting global variables into a structure")

Diff Detail

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

Event Timeline

markj requested review of this revision.Sat, Apr 4, 11:22 AM
This revision is now accepted and ready to land.Sat, Apr 4, 11:27 AM

Looks good to me.

sys/netinet6/ip6_mroute.c
163

Not related to this revision.

I'd expect the sysctls for statistics are all read-only. Any usage to update / reset those statistics by end user ?

sys/netinet6/ip6_mroute.c
163

Oh, I found the related commit d96ea877a78d. Those sysctls are made writable by intention. Quote from the commit message,

o Convert IPv6 read-only stats sysctls to the read-write ones.
o Teach netstat(1) -z to reset these stats sysctls.

Ralated PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=153206 .

sys/netinet6/ip6_mroute.c
163

Right. See the implementation of the SYSCTL_VNET_PCPUSTAT macro, any write to the sysctl just sets the counters to 0.

Here we should at some point go further and use per-CPU stats as well, but that should be done as a larger performance evaluation of this code.

This revision was automatically updated to reflect the committed changes.