Page MenuHomeFreeBSD

ip6_mroute: VNETify counters
AcceptedPublic

Authored by markj on Sat, Apr 4, 11:22 AM.

Details

Reviewers
zlei
pouria
Group Reviewers
network
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 71962
Build 68845: arc lint + arc unit

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
162

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
162

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
162

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.