NAME
cgroup - control group based traffic control filterSYNOPSIS
tc filter ... cgroup [ match EMATCH_TREE ] [ action ACTION_SPEC ]
DESCRIPTION
This filter serves as a hint to tc that the assigned class ID of the net_cls control group the process the packet originates from belongs to should be used for classification. Obviously, it is useful for locally generated packets only.OPTIONS
- action ACTION_SPEC
- Apply an action from the generic actions framework on matching packets.
- match EMATCH_TREE
- Match packets using the extended match infrastructure. See tc-ematch(8) for a detailed description of the allowed syntax in EMATCH_TREE.
EXAMPLES
In order to use this filter, a net_cls control group has to be created first and class as well as process ID(s) assigned to it. The following creates a net_cls cgroup named "foobar":modprobe cls_cgroup mkdir /sys/fs/cgroup/net_cls mount -t cgroup -onet_cls net_cls /sys/fs/cgroup/net_cls mkdir /sys/fs/cgroup/net_cls/foobar
echo 0x10002 > /sys/fs/cgroup/net_cls/foobar/net_cls.classid
echo 1234 > /sys/fs/cgroup/net_cls/foobar/tasks echo 5678 > /sys/fs/cgroup/net_cls/foobar/tasks
SEE ALSO
tc(8), tc-ematch(8),21 Oct 2015 | iproute2 |