Details
- Reviewers
tuexen - Group Reviewers
network - Commits
- rG9880ce076584: icmp6: make icmp6_ratelimit() responsible to update the stats counter
rGdc167e64dce3: icmp6: make icmp6_ratelimit() responsible to update the stats counter
rG9e09b33e8efc: icmp6: make icmp6_ratelimit() responsible to update the stats counter
rGc6c96aaba8dd: icmp6: make icmp6_ratelimit() responsible to update the stats counter
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/netinet6/icmp6.c | ||
---|---|---|
2745 | There are consumers that do not increase statistic icp6s_toofreq such as
I'm not sure those are intended or not but I like the current implementation of icmp6_ratelimit() as it is simple and follows the single responsibility principle. |
sys/netinet6/icmp6.c | ||
---|---|---|
2745 | I'm convinced that consumers that didn't update icp6s_toofreq will now be fixed. Every return of a positive value from icmp6_ratelimit() means a dropped (or suppressed) packet. Such packets shall be counted. The "too frequent" counter is the right and the only counter that fits this purpose. Here is how it is visible to a user with netstat(1): inet6.c: p(icp6s_toofreq, "\t{:errors-discarded-by-rate-limitation/%ju} " We can create a separate counter to count non-errors (e.g. echo replies) separately. I won't be against that, so if anyone makes a review - I'd approve. However, I see little value in additional counter, so I won't do that myself. But not counting at all is definitely a problem and must be fixed. |