Page MenuHomeFreeBSD

pf: Convert pfi_kkif to use counter_u64
ClosedPublic

Authored by kp on Dec 24 2020, 3:48 PM.
Tags
None
Referenced Files
F98690409: D27763.diff
Fri, Oct 4, 8:58 AM
Unknown Object (File)
Tue, Oct 1, 9:58 PM
Unknown Object (File)
Mon, Sep 30, 9:29 AM
Unknown Object (File)
Sun, Sep 29, 4:36 AM
Unknown Object (File)
Sun, Sep 29, 1:15 AM
Unknown Object (File)
Fri, Sep 27, 12:36 AM
Unknown Object (File)
Thu, Sep 26, 12:26 PM
Unknown Object (File)
Wed, Sep 25, 8:34 AM

Details

Summary

Improve caching behaviour by using counter_u64 rather than variables
shared between cores. Expect a minor performance improvement.

MFC after: 2 weeks
Sponsored by: Orange Business Services

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35675
Build 32565: arc lint + arc unit

Event Timeline

kp requested review of this revision.Dec 24 2020, 3:48 PM

Looks good, modulo minor initialisation nit/remark.

sys/netpfil/pf/pf_if.c
226

Is there a point in M_ZEROing? As far as I can tell, everything is explicitly initialised later. Or you could pf_kkif_zero() to make it even clearer.

sys/netpfil/pf/pf_if.c
226

Paranoia for one, but also because otherwise we can't tell which of the counter allocations have failed and can't safely free in pfi_kkif_free().

Happily this is not in the data path, so we don't actually do this very often. A little bit of extra memory writing here isn't going to hurt anything,

Works for me! Thanks for clarifying.

This revision is now accepted and ready to land.Dec 30 2020, 11:39 AM
This revision was automatically updated to reflect the committed changes.