Page MenuHomeFreeBSD

pf: inline pf_addrcpy()
ClosedPublic

Authored by kp on Mar 30 2025, 7:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 8:15 AM
Unknown Object (File)
Tue, Sep 30, 2:04 PM
Unknown Object (File)
Tue, Sep 30, 2:15 AM
Unknown Object (File)
Sep 15 2025, 1:32 AM
Unknown Object (File)
Sep 13 2025, 3:45 AM
Unknown Object (File)
Sep 8 2025, 3:46 AM
Unknown Object (File)
Sep 1 2025, 9:28 AM
Unknown Object (File)
Aug 20 2025, 11:38 AM

Details

Summary

Make it easier for the compiler to inline this in the many cases where the 'af'
is known at compile time.

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 30 2025, 7:55 PM

Sidenote: how far are we from not installing pfvar.h into /usr/include/net or maybe not installing it at all?

sys/net/pfvar.h
602

You don't need underscores in front of inline for private headers. It is C keyword with modern standards.

This revision is now accepted and ready to land.Mar 30 2025, 11:26 PM
sys/net/pfvar.h
602

Even if this header is nominally private, some public header might include it, and this bit is not guarded by _KERNEL, I believe. (And there are ioctl definitions in pfvar.h, so how can it be private?)

Probably the right thing is to make this function conditional on _KERNEL, if it isn't already. Then yes, the plain inline keyword can be used.

This revision was automatically updated to reflect the committed changes.