Page MenuHomeFreeBSD

pf: Add DIOCGETSTATESSTATS
AbandonedPublic

Authored by kp on Jul 5 2021, 10:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 1:24 AM
Unknown Object (File)
Dec 14 2023, 10:17 PM
Unknown Object (File)
Nov 29 2023, 3:13 AM
Unknown Object (File)
Nov 29 2023, 2:45 AM
Unknown Object (File)
Nov 23 2023, 2:15 PM
Unknown Object (File)
Nov 22 2023, 7:26 PM
Unknown Object (File)
Nov 22 2023, 6:38 PM
Unknown Object (File)
Nov 14 2023, 3:58 PM

Details

Reviewers
mjg
Group Reviewers
network
pfsense
Summary

Add DIOCGETSTATESSTATS so userspace can get a reasonable estimate of how
much memory will be required to read out the full state tabe (with
DIOCGETSTATESNV).
It returns both the current number of states and an estimate of the size
per state.

Users of the call need to be aware that the number of states
may change between the DOICGETSTATESSTATS and DIOCGETSTATESNV calls.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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

Event Timeline

kp requested review of this revision.Jul 5 2021, 10:06 AM

This should have an NV suffix.

add NV suffix

This isn't strictly required, because there's no non-nvlist call to distinguish
this one from, but the review feedback suggests there's an implicit
expectation, so add it anyway.

This revision is now accepted and ready to land.Jul 5 2021, 2:09 PM

While this improves the present situation it's still unacceptably slow, so I'm going to try a version without nvlist.