mlxsw: spectrum: qdiscs: Support qdisc per tclass
authorNogah Frankel <nogahf@mellanox.com>
Wed, 28 Feb 2018 09:44:58 +0000 (10:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Feb 2018 17:06:00 +0000 (12:06 -0500)
commiteed4baeb040aa41323d0091c18d36cc5a895792d
treea2a090d7370cb555ef226eaed3a8ad04e32b8e04
parent56beda3db6020428885f0589a0ac16768ea94543
mlxsw: spectrum: qdiscs: Support qdisc per tclass

Add the option to set a qdisc per tclass.  Match the qdisc to the tclass by
parent ID. Supported currently for sch_red only.
It allows offloading sch_prio as root qdisc and sch_red as its child.
(However, doing so might corrupt the stats for both parent and child.)

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.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c