Skip to content
Commit 4a6ee25c authored by Tejun Heo's avatar Tejun Heo
Browse files

netprio_cgroup: reimplement priomap expansion



netprio kept track of the highest prioidx allocated and resized
priomaps accordingly when necessary.  This makes it necessary to keep
track of prioidx allocation and may end up resizing on every new
prioidx.

Update extend_netdev_table() such that it takes @target_idx which the
priomap should be able to accomodate.  If the priomap is large enough,
nothing happens; otherwise, the size is doubled until @target_idx can
be accomodated.

This makes max_prioidx and write_update_netdev_table() unnecessary.
write_priomap() now calls extend_netdev_table() directly.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Tested-and-Acked-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 52bca930
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment