]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: qdiscs: prio: Delete child qdiscs when removing bands
authorNogah Frankel <nogahf@mellanox.com>
Wed, 28 Feb 2018 09:45:05 +0000 (10:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Feb 2018 17:06:01 +0000 (12:06 -0500)
commitc4a502a29a5eb338b1a7db68f4b311a97738cfcf
treee57f1c0b05c990e8646ae2cc4cefce28717f0ec0
parent4c06ff5ff14ec6f3b9e5c57c191ed509aa5aad92
mlxsw: spectrum: qdiscs: prio: Delete child qdiscs when removing bands

When the number the bands of sch_prio is decreased, child qdiscs on the
deleted bands would get deleted as well.
This change and deletions are being done under sch_tree_lock of the
sch_prio qdisc. Part of the destruction of qdisc is unoffloading it, if
it is offloaded. Un-offloading can't be done inside this lock.
Move the offload command to be done before reducing the number of bands,
so unoffloading of the qdiscs that are about to be deleted could be done
outside of the lock.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Reviewed-by: Yuval Mintz <yuvalm@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c
net/sched/sch_prio.c