-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Illegal "rate" when running tcset #54
Comments
@ducalpha I've made the package Unfortunately, I could not reproduce the problem for now. |
My iproute2 version is
I think the best way is to get the maximum speed of the network device instead of hard-coding the __NO_LIMIT value. |
Thank you for your information.
That's what I thought as a solution at first, but I'm not so sure that can be resolved the root cause.
Anyway, current fix is a temporal solution. I will try to reproduce the problem by creating an environment same as yours. |
Probably I am using an old version of |
Thank you for your comment. You are right. Old version of
int get_rate(unsigned int *rate, const char *str)
{
char *p;
double bps = strtod(str, &p);
// ....
bps /= 8; /* -> bytes per second */
*rate = bps;
/* detect if an overflow happened */
if (*rate != floor(bps))
return -1; // reach this line when the rate is 1000G
return 0;
} This limitation was removed by the below commit.
This commit applied since I'll fix the problem appropriately.
Change the rate upper limit calculation by |
I've fixed the issue at tcconfig 0.7.1. |
I ran
--device eth0 --delay 25 --rate 1M
but encountered an error complaining about Illegal rate.My computer uses Ubuntu 14.04 (kernel 4.4.0) with a gigabit ethernet.
Fix: It seems that setting the unlimited rate as 1000Gbit is not good on my machine. Changing shaper/htb.py:HtbShaper's
__NO_LIMIT = "1000G
" to"1G"
solved the problem for me.The text was updated successfully, but these errors were encountered: