Page MenuHomeFreeBSD

iflib: Avoid double counting in rxeof
ClosedPublic

Authored by markj on Feb 23 2021, 3:51 PM.
Tags
None
Referenced Files
F96120294: D28900.diff
Mon, Sep 23, 6:22 PM
Unknown Object (File)
Sat, Sep 21, 8:08 PM
Unknown Object (File)
Mon, Sep 16, 10:32 AM
Unknown Object (File)
Wed, Sep 11, 3:35 AM
Unknown Object (File)
Thu, Sep 5, 4:01 PM
Unknown Object (File)
Fri, Aug 30, 11:52 PM
Unknown Object (File)
Thu, Aug 29, 2:21 PM
Unknown Object (File)
Aug 20 2024, 12:35 PM
Subscribers

Details

Summary

iflib_rxeof() was counting everything twice. This was introduced when
pfil hooks were added to iflib. I believe we want to count rx
packets/bytes before the pfil hooks are executed, so remove the counter
adjustments that are executed after.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37317
Build 34206: arc lint + arc unit

Event Timeline

markj requested review of this revision.Feb 23 2021, 3:51 PM
erj added inline comments.
sys/net/iflib.c
2926–2927

So then, this is the one place that the stats should be incremented

sys/net/iflib.c
2926–2927

Correct. The deleted lines run after pfil hooks run, and so won't count dropped (recycled) packets.

This revision is now accepted and ready to land.Feb 23 2021, 8:16 PM
This revision was automatically updated to reflect the committed changes.