Page MenuHomeFreeBSD

pf: postpone clearing of struct pf_pdesc
ClosedPublic

Authored by kp on Jan 10 2022, 9:20 PM.
Tags
None
Referenced Files
F106167193: D33815.diff
Thu, Dec 26, 12:07 PM
Unknown Object (File)
Sat, Dec 7, 11:23 PM
Unknown Object (File)
Oct 29 2024, 10:01 PM
Unknown Object (File)
Oct 14 2024, 9:47 PM
Unknown Object (File)
Sep 26 2024, 12:14 PM
Unknown Object (File)
Sep 15 2024, 3:50 PM
Unknown Object (File)
Sep 9 2024, 8:36 AM
Unknown Object (File)
Sep 9 2024, 8:36 AM

Details

Summary

Postpone zeroing out pd until after the PFI_IFLAG_SKIP/M_SKIP_FIREWALL
checks. We don't need it until then, and it saves us a few CPU cycles in
some cases.
This isn't expected to make a measurable performance change though.

Pointed out by: markj
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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

Event Timeline

kp requested review of this revision.Jan 10 2022, 9:20 PM
mjg added a subscriber: mjg.

The thing to do in the long run is to stop zeroing it upfront to begin with. KMSAN, if operational, can be used to validate there are no uninitialized uses. I tried to do it few weeks back but ran into bugs.

This revision is now accepted and ready to land.Jan 10 2022, 9:44 PM
This revision was automatically updated to reflect the committed changes.