]> 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)
commit818283851e6734739ebc4897721c84b453610b54
treee57f1c0b05c990e8646ae2cc4cefce28717f0ec0
parente99505c11a19297da22855d1691ebd636ce1ae91
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