Page MenuHomeFreeBSD

iflib: Avoid double counting in rxeof
ClosedPublic

Authored by markj on Feb 23 2021, 3:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 10:27 PM
Unknown Object (File)
Tue, Nov 5, 12:19 PM
Unknown Object (File)
Wed, Oct 16, 7:24 PM
Unknown Object (File)
Tue, Oct 15, 1:35 AM
Unknown Object (File)
Oct 14 2024, 5:37 PM
Unknown Object (File)
Oct 14 2024, 1:50 PM
Unknown Object (File)
Oct 12 2024, 3:59 PM
Unknown Object (File)
Oct 11 2024, 7:38 AM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.