mlxsw: spectrum_qdisc: Validate qdisc topology
authorPetr Machata <petrm@nvidia.com>
Tue, 19 Oct 2021 08:07:10 +0000 (11:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Oct 2021 11:24:52 +0000 (12:24 +0100)
commitc2792f38caae108cd1a082b9fa838d47f051ad50
tree6eed41aa566bccaf07cbd13d4abffa306230ca63
parent01164dda0a64498c9f8fded838e80f645e918a5d
mlxsw: spectrum_qdisc: Validate qdisc topology

A following patch will enable offloading qdiscs that are deeper than
directly under root qdisc. Currently the topology validation consists of
demanding a root qdisc position for ETS and PRIO. Since RED and TBF are
considered classless, this is enough. In order to prevent some nonsensical
combinations when RED and TBF become classful, introduce a more general
topology validator.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c