[lxc-devel] [PATCH] traffic control setup

Daniel Lezcano daniel.lezcano at free.fr
Fri May 20 08:21:06 UTC 2011


On 05/07/2011 01:30 PM, Farcasi Ana-Maria wrote:
> Hello,
>
> This commit adds traffic control support (download and upload limit rate)
> for lxc containers. At the moment, the changes apply just for veth devices.
> In order to do this, we have attached a new structure (lxc_traffic_control)
> to struct lxc_netdev. This structure contains values for download and upload
> rate limits and can be extended with other traffic control options.
>
> In the configuration file the user has to complete the options for limiting
> traffic and to attach a script that handles the limitation (in the upscript
> option). We have attached here an example of script - lxc_upscript.sh. The
> lines in the configuration file that deal with limitation are:
> lxc.network.download.rate
> lxc.network.upload.rate
> lxc.network.up.script
>
> We have also attached an example of configuration file - conf_example.conf.
>
> The body of the patch is:

Hi Ana-Maria and Irina,

sorry for the delay.

You hooked the code to use the script, that sounds not a bad idea but I 
would prefer to embed the traffic control code inside lxc for an 
embedded system. I think there is a bit more work to do in the network.c 
part to add the netlink message to set the upload and download rate.

Thanks
   -- Daniel




More information about the lxc-devel mailing list