Page MenuHomeFreeBSD

pf: rework anchor handling to recurse
ClosedPublic

Authored by kp on Wed, May 28, 7:33 PM.
Tags
None
Referenced Files
F120780576: D50579.diff
Sat, Jun 21, 1:10 AM
Unknown Object (File)
Wed, Jun 18, 7:45 AM
Unknown Object (File)
Mon, Jun 2, 3:48 PM
Unknown Object (File)
Sun, Jun 1, 3:15 AM

Details

Reviewers
None
Group Reviewers
pfsense
Commits
rGfe96610ba943: pf: rework anchor handling to recurse
Summary
  • percpu anchor stacks we actually don't need to pre-allocate per_anchor_stack[], if we use a 'natural' recursion, when doing anchor tree traversal.

O.K. mikeb@, mpi@

Extended because FreeBSD pf still has separate NAT rules processing, which also
needed this change.

Obtained from: OpenBSD, sashan <sashan@openbsd.org>, e236f0fa7b
Obtained from: OpenBSD, sashan <sashan@openbsd.org>, 5e4ad307dc
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.Wed, May 28, 7:33 PM
sys/netpfil/pf/pf.c
5892–5895

One of benefits of pf_test_ctx is that it provides a central point to access all those variables from functions. So it would be better to only pass ctx to pf_create_state and other functions and modify those functions to access the members of ctx.

sys/netpfil/pf/pf.c
5892–5895

That is a good idea. In fact, I thought I had already done that, but I don't seem to have that in my stack of pending patches.
I would like to keep it out of this change though.

This revision was not accepted when it landed; it landed in state Needs Review.Mon, Jun 2, 3:31 PM
This revision was automatically updated to reflect the committed changes.