Page MenuHomeFreeBSD

pf: inline pf_addrcpy()
ClosedPublic

Authored by kp on Sun, Mar 30, 7:55 PM.
Tags
None
Referenced Files
F113790119: D49581.diff
Thu, Apr 3, 4:14 PM
Unknown Object (File)
Mon, Mar 31, 9:37 PM
Unknown Object (File)
Mon, Mar 31, 6:57 PM

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.Sun, Mar 30, 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.Sun, Mar 30, 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.