Page MenuHomeFreeBSD

pf: remove pd_refs from pfsync
ClosedPublic

Authored by kp on Mar 24 2023, 8:42 AM.
Tags
None
Referenced Files
F137803095: D39248.diff
Tue, Nov 25, 11:13 PM
Unknown Object (File)
Tue, Nov 25, 8:22 PM
Unknown Object (File)
Tue, Nov 18, 9:25 AM
Unknown Object (File)
Wed, Nov 12, 5:32 PM
Unknown Object (File)
Oct 27 2025, 5:02 PM
Unknown Object (File)
Oct 26 2025, 1:47 AM
Unknown Object (File)
Oct 16 2025, 11:15 AM
Unknown Object (File)
Oct 15 2025, 5:26 AM

Details

Summary

It only served to complicate cleanup, and added no value.

While here drop packets in pfsync_defer_tmo() if we don't have a syncif,
rather than just leaving them on the queue.

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.Mar 24 2023, 8:42 AM
zlei added inline comments.
sys/netpfil/pf/if_pfsync.c
414

On clone destroy event, is it possible b is hold locked by other thread ?
Do we need lock for sync, or at least a memory fence ?

416

Do we need lock for sync, or at least a memory fence ?

So that TAILQ_FIRST will be safe.

1832

I think PF_STATE_LOCK() is needed.

sys/netpfil/pf/if_pfsync.c
416

Good catch. Mark also pointed that out in D39223. I'll fix it there.

1832

There are a number of locking issues around state accesses in pfsync. I don't intend to fix them in this commit.

This revision is now accepted and ready to land.Mar 27 2023, 9:52 PM
This revision was automatically updated to reflect the committed changes.