Page MenuHomeFreeBSD

pf: postpone clearing of struct pf_pdesc
ClosedPublic

Authored by kp on Jan 10 2022, 9:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 20, 8:40 AM
Unknown Object (File)
Fri, Mar 20, 8:33 AM
Unknown Object (File)
Sat, Mar 14, 3:36 PM
Unknown Object (File)
Sun, Mar 8, 9:45 PM
Unknown Object (File)
Feb 8 2026, 11:13 AM
Unknown Object (File)
Jan 30 2026, 7:16 PM
Unknown Object (File)
Jan 24 2026, 9:44 AM
Unknown Object (File)
Jan 22 2026, 9:19 PM

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.