Adding a Cgroup tc filter

73 views
Skip to first unread message

Aryeh Weinreb

unread,
Jan 29, 2018, 11:39:21 AM1/29/18
to pyroute2-dev
Hello,

Is it possible to add a cgroup filter using the IPRoute class?

I would like to do something like this: (from: https://www.kernel.org/doc/Documentation/cgroup-v1/net_cls.txt):
tc qdisc add dev eth0 root handle 10: htb
tc class add dev eth0 parent 10: classid 10:1 htb rate 40mbit
tc filter add dev eth0 parent 10: protocol ip prio 10 handle 1: cgroup

I tried:
ip.tc("add", "htb", eth0, 0x100000)
ip.tc("add-class", "htb", eth0, 0x100001, parent=0x100000, rate="40mbit")
ip.tc("add-filter", "cgroup", eth0, parent=0x100000, prio=10, protocol=socket.AF_INET, target=0x10000)

But this didn't work.

Is this supported?

Thanks,
Aryeh

Peter Saveliev

unread,
Jan 29, 2018, 4:55:57 PM1/29/18
to Aryeh Weinreb, pyroute2-dev
Nope, it isn't supported (yet).

But let's try to implement it :) I'll write a bit later, how it's going.

--
You received this message because you are subscribed to the Google Groups "pyroute2-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyroute2-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages