Open knumat opened 6 years ago
Hi knumat, I think it is possible because the upload limit doesn't work fine. Would you like to make a PR?
the upload bandwidth throttling has been broken since version 1.3 or before. It would be relay great if this could be addressed.
i just changed the code and replaced the bucketup to bucketupsize and tested and made no difference in 1.4. The downloads speed is throttled but the upload is not.
Have you tried to disable GRO GSO using ethtool ?
eg
ethtool -K eth0 gro off
There was an issues related to this several years ago. It seems that the leaky bucket algorithm does not rate limit properly if offloading is configured. I think that gro (receive offloading) is all that matters but you can shut off gso and test.
eg
ethtool -K eth0 gro off gso off
Hi, We have same problem. Maybe I can add some details, in our case :
using ethtool on my AMD/X86_64 system did not work. disabling gro and gso had no effect. Any other thoughts as to why the upload bandwidth limit works for some and not others?
I have some news.
chilli[32]: leaky_bucket(666): Leaky bucket dropping upload overflow from XX-XX-XX-XX-XX-XX
Chilli tell packets are dropped.
chilli[32]: leaky_bucket(704): Leaky bucket: bucketup: 518231/524288, bucketdown: 52/524288, up: 0/(4941), down: 52/(4941)
chilli[32]: leaky_bucket(704): Leaky bucket: bucketup: 517660/524288, bucketdown: 0/524288, up: 1500/(2071), down: 0/(2071)
chilli[32]: leaky_bucket(704): Leaky bucket: bucketup: 518759/524288, bucketdown: 0/524288, up: 1500/(401), down: 0/(401)
The bucket never overflow, but the packets are not dropped. Assuming this we cant forgive gro problems. I still not understand all the code, I dont know how the packets should be dropped.
Looking through src/chilli.c, it appears that there is a mismatch between the way that the upload and download bandwidth limits are handled. The download version is as follows: https://github.com/coova/coova-chilli/blob/master/src/chilli.c#L2737
The upload version is similar, but the if statement checks s_state.bucketup instead of s_state.bucketupsize: https://github.com/coova/coova-chilli/blob/master/src/chilli.c#L5638
My guess is that the download version is correct and the upload version is wrong, but I'm not familiar enough with this code to be sure.