-
Notifications
You must be signed in to change notification settings - Fork 320
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
Add bandwidth shaping support #232
base: master
Are you sure you want to change the base?
Conversation
Features: * Per client bandwidth shaping with default setting. * Per client bandwidth shaping with per client setting get from authen server. * Gateway speed limit. (gateway bandwidth shaping) Notes: OpenWRT requires these packages, * tc * kmod-ifb * kmod-sched (sch_htb, sch_codel) * kmod-sched-core (act_mirred)
I looked over this rather quickly before bed and I have to say: this is really good. Just a question: is it possible to have a restriction of the total bandwidth without limiting individual clients? From the config description, I guess it is possible. |
Yes, it is possible. Sorry that it's not clearly mentioned in the config description. == 8< == or drop the "BandwidthDefaultClientMax{Down,Up}" from the config file as it's default value is 0 |
nice feature! |
I want to merge this. I hope to test this next weekend when I'll have some more time. |
/** Set gateway interface txqueuelen */ | ||
rc = bw_shaping_do_command(BW_PROG_IFCONFIG, "%s txqueuelen %" PRIu32, | ||
config->gw_interface, config->bw_shaping_gw_interface_txqueuelen); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't you need to check the return code here?
I have added some comments to the code. It's really good even including my minor nitpicks. From an OpenWrt packager's perspective: since traffic shaping is available by default (albeit not necessarily configured), an OpenWrt should probably include dependencies on tc and related kernel modules. That's probably quite a big dependency for an embedded system. I see two possible solutions here:
|
nice work! compiled and worked fine for client speed limiting, but with few issues:
|
So, what's current status ? who will do the suggestions ? |
@qianguozheng I was hoping for @neutronth to tackle the improvements and bug fixes. It will be several weeks at least before I can commit any time :( |
Features:
authen server.
Notes:
OpenWRT requires these packages,
* tc
* kmod-ifb
* kmod-sched (sch_htb, sch_codel)
* kmod-sched-core (act_mirred)