Page MenuHomeFreeBSD

altq: Increase maximum number of CBQ and HFSC classes
ClosedPublic

Authored by kp on Mar 3 2021, 11:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 26, 9:11 AM
Unknown Object (File)
Dec 20 2023, 4:36 AM
Unknown Object (File)
Oct 18 2023, 3:50 AM
Unknown Object (File)
Oct 14 2023, 11:30 AM
Unknown Object (File)
Aug 2 2023, 4:55 AM
Unknown Object (File)
Aug 2 2023, 3:33 AM
Unknown Object (File)
Aug 1 2023, 9:13 PM
Unknown Object (File)
Aug 1 2023, 9:00 PM

Details

Summary

In some configurations we need more classes than ALTQ supports by
default. Increase the maximum number of classes we allow.
This will only cost us a comparatively trivial amount of memory, so
there's little reason not to do so.

If ever we find we want even more we may want to consider turning these
defines into a tunable, but for now do the easy thing.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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

Event Timeline

kp requested review of this revision.Mar 3 2021, 11:07 AM

How common is this requirement?
For normal production the customer is able to set the values manually before compiling.
I don't assume they will wait 3 week before having it in STABLE and some months to have it in RELEASE.

How common is this requirement?

I have no idea. Rubicon (i.e. pfSense) need this, and this is part of the diff-reduction effort.
64 HFSC classes isn't all that many if you want per-client queues.

For normal production the customer is able to set the values manually before compiling.

Yeah, but that's not ideal. If we want users to be able to tune this we should make it a tuneable rather than a compile-time value.

Happily the impact is very limited, because it really is only a tiny increase in memory use, and ALTQ is disabled by default anyway.
For HFSC it's literally ~2000 extra pointers, so as close to nothing as makes no difference. The CBQ structure is a bit bigger, but we're still talking about a few hundred kilobytes at most (for the extra ~1800 classes).

This revision is now accepted and ready to land.Mar 3 2021, 7:19 PM