Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokenBucket: use 64bit if supported #179

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

TokenBucket: use 64bit if supported #179

wants to merge 2 commits into from

Conversation

tbarbette
Copy link
Owner

Allows all elements such as ratedsource, ratedsplitter, ratedunqueue,
and bandwidthratedunqueue to use > 4G rate.

tokenbucket64 could have lass copy pasting from tokenbucket, but I don't have time for this... I also changed the way it works a little. 32bit token buckets use overflow value as MAX. The 32bit value must therfore be scaled.
While with 64bit, I prefer to keep a reference to the max, and have easier and faster calculation.

@tbarbette
Copy link
Owner Author

It seems travis does not understand uint64_t... To be continued.

@pallas
Copy link
Collaborator

pallas commented May 1, 2019

This should be done with templates and feature checks, right?

@tbarbette
Copy link
Owner Author

This should be done with templates and feature checks, right?

Well in the end the 32bit and 64bit version do not work the same way as we do not need overflow checks and this max value trick. But some factorization could happen, yes... I tried the templating approach first and abandoned...

tbarbette and others added 2 commits May 7, 2020 11:46
Allows all elements such as ratedsource, ratedsplitter, ratedunqueue,
and bandwidthratedunqueue to use > 4G rate.

tokenbucket64 could have lass copy pasting, but I don't have time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants