Page MenuHomeFreeBSD

iflib: Add iflib managed counters support
Needs ReviewPublic

Authored by zlei on Jul 30 2024, 4:40 PM.
Tags
None
Referenced Files
F93313858: D46186.id141574.diff
Sun, Sep 8, 9:13 PM
Unknown Object (File)
Sat, Sep 7, 6:18 AM
Unknown Object (File)
Sun, Sep 1, 6:22 AM
Unknown Object (File)
Sun, Aug 11, 12:19 AM
Unknown Object (File)
Aug 3 2024, 4:44 PM

Details

Reviewers
shurd
Group Reviewers
iflib
network
Summary

Currently supports IFCOUNTER_OQDROPS and fallbacks to if_get_counter_default().

PR: 280386
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

zlei requested review of this revision.Jul 30 2024, 4:40 PM
zlei added inline comments.
sys/net/iflib.c
2642

I'm not convinced that we need to reset txq stats on every call iflib_stop(). The stats can persist IMO, then iflib_save_stats can be omitted. Can the author @mmacy comment on this ?

zlei added a reviewer: network.
erj added inline comments.
sys/net/iflib.c
2642

I agree that I don't think we should do this; maybe it was something that was added because it was useful for debugging when iflib was being developed?

4665

Ok, I think it makes sense that we're adding the IFCOUNTER_OQDROPS from the ifnet, too.

PR: 280386

Is this supposed to help solve the problem in the PR? I'm not sure what's going on there, but I'm not sure it's clear in there except for your comment that Odrops isn't incrementing because they're not being retrieved properly.

In D46186#1052952, @erj wrote:

PR: 280386

Is this supposed to help solve the problem in the PR?

Yes. That PR lead this change. I mean when I hacking if_bridge(4), I realized some iflib drivers ( em and igb in that PR ) does not report Odrops correctly.

I'm not sure what's going on there, but I'm not sure it's clear in there except for your comment that Odrops isn't incrementing because they're not being retrieved properly.

So users ( and also me ) got confused what happens behind. Users are more familiar with netstat(8) than driver specific sysctl variables.