-
Notifications
You must be signed in to change notification settings - Fork 81
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
Support 64-bit bandwidths #395
Conversation
Signed-off-by: Georgios P. Katsikas <[email protected]>
d2f6f11
to
d81fded
Compare
The timeout value is in milliseconds, not in seconds.
Thanks! Can you take a look at the failing tests? I can help you if you don't get them. |
Looks like I used a symbol defined by DPDK, so non-DPDK builds are failing. |
Can you add an ifundef then? Probably in glue.hh if used multiple times, or just where it is used if just once. |
That one looks functional. You can use make check locally to debug. I saw some MS value changed to US, maybe that's the problem. You should try to keep configuration compatible to previous behavior. |
Some BigInt tests are broken. They were written to compare 64-bit multiplication and division with the same operation using 2-limb BigInts, where each limb was 32-bit. Now (with 64-bit limbs) to test the same way we would need to compare with 128-bit operations, which aren't necessarily supported on all platforms. |
Can you test with shift and masks? Or propose any other resolution that is acceptable :) |
Do you actually need bigint? We might keep this problem/discussion separate. |
BigInt is used by TokenBucket in a few places. Not sure if replacing it is the best solution. The problem is the test code. |
Yes, tests being broken is why I never merged. Can you try to reverse the testing to 32bits, and add maybe a few minimal 64bit ones? At least invoke it to verify it compiles? |
bcc2d32
to
29fefce
Compare
29fefce
to
8c42a0d
Compare
The RatedUnqueue test fails because it expects an inaccurate result (909|910), but receives the accurate one (1000). Is it OK to update the test file? |
Weird.. I'll take a look. |
Seems good now, thanks ! Sorry for the delay. |
The latest PR merged (#398) undid all of the changes made in this one. |
The last merge removed some changes. Sorry about that, two huge murges at the same time with different bases...
@mihaibrodschi there are two failures in the advanced test (see https://forge.uclouvain.be/ensg/fastclick/-/pipelines/53850). Not sure if you have access, but basically, I am building with and then I get:
I would say it's because you added a better precision but it does not happen in all cases. Any idea? |
@tbarbette I think the results are correct.
The BandwidthRatedSplitter uses a token bucket, which has an initial amount of tokens equal to tb_bandwidth_thresh = 131072 (see elements/standard/ratedunqueue.cc:77). For the second test, the setup is:
In this case, the BWRatedUnqueue has a token bucket with an initial token count of 5000 + tb_bandwidth_thresh. |
So there was another problem. First with batching enabled, the default burst is still to read 32 packets. So reading 32 packets leads to very large imprecision in terms of token overcommitment. With a BURST of 1, all tests are now failing for this 20/21 reason. The timing before your patch if this:
After your patch it is :
We see the bucket is refilled a bit sooner, so 3 packets go up in the first second. This is only happening with |
This is because of this code in bwratedunqueue.cc, correct?
It does not check if there are enough tokens for the entire batch, only for one packet. As for the slight timing difference, is it an incorrect result? If so, I'll see what I can do to fix it. |
Perhaps a cleaner solution for batching in BWRatedUnqueue would be to store the packets which can't be pushed due to insufficient tokens in a small queue (of size _burst). |
Yes indeed. It's not really a bug, it's a different "default" behavior (which is not appreciable). |
Based on #378 by gkatsikas.
Updates TokenBucket, GapRate and bw argument parsing.