netcls_cgroup: implement proper hierarchy support
netcls_cgroup implemented rather weird hierarchy behavior. A new
cgroup would inherit configuration from its parent but once created it
operates independently from its parent - updates to a parent doesn't
affect its children.
Proper hierarchy behavior can easily be implemented using cgroup
descendant iterator and the is_local flag. Writing a positive value
to "net_cls.classid" updates the cgroup's classid and propagates the
classid downwards. Writing a negative value removes the local config
and makes it inherit the parent's classid, and the inherited classid
is propagated downwards.
This makes netcls_cgroup properly hierarchical and behave the same way
as netprio_cgroup.
Signed-off-by: Tejun Heo <tj@kernel.org>
1 file changed