The right way to do this requires informing tc that you should use groups. This has been tested on Ubuntu 12.04 with a 3.10 kernel.
Make sure you have net_cls support
$ cat /proc/cgroups
if not,
Compile a kernel with net_cls support
Just put all of these options in your .config. They do not seem to exist in menuconfig.
CONFIG_NET_CLS=y CONFIG_NET_CLS_BASIC=m CONFIG_NET_CLS_TCINDEX=m CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_FLOW=m CONFIG_NET_CLS_CGROUP=y CONFIG_NET_CLS_ACT=y CONFIG_NET_CLS_IND=y
then run and install.
Make sure you have the / etc / fstab entry
# echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /etc/fstab
Create a test group and configure it
Some cgroup settings complain about common errors if cpuset is not installed. You must also convert your primary and minor class identifier tc to the hex code 0xAAAABBBB, where AAAA is primary and BBBB is negligible.
# mkdir /sys/fs/cgroup/clstest
Configure tc
# tc qdisc add dev eth2 root handle 10: htb
Group echo tasks
(but only one at a time)
# echo $FIREFOX_PID > /sys/fs/cgroup/clstest/tasks
Change tc class
EDIT:
I could not complete this work with access. Only the output seems to work (upload). tc does not seem to accept the cgroup parameter with access.
source share