Page MenuHomeFreeBSD

altq: Increase maximum number of CBQ and HFSC classes
ClosedPublic

Authored by kp on Mar 3 2021, 11:07 AM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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