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)
Wed, Apr 10, 5:19 AM
Unknown Object (File)
Mar 7 2024, 11:56 PM
Unknown Object (File)
Dec 20 2023, 4:38 AM
Unknown Object (File)
Nov 28 2023, 2:14 AM
Unknown Object (File)
Jul 11 2023, 6:12 PM
Unknown Object (File)
Jul 11 2023, 6:10 PM
Unknown Object (File)
Jul 11 2023, 6:09 PM
Unknown Object (File)
Jul 8 2023, 7:21 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.