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)
Mon, May 11, 9:20 PM
Unknown Object (File)
Wed, May 6, 10:05 PM
Unknown Object (File)
Mon, May 4, 9:50 AM
Unknown Object (File)
Fri, May 1, 12:35 PM
Unknown Object (File)
Tue, Apr 28, 7:13 AM
Unknown Object (File)
Mon, Apr 27, 2:06 PM
Unknown Object (File)
Sat, Apr 25, 8:25 AM
Unknown Object (File)
Fri, Apr 24, 6:54 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.