mlxsw: spectrum_qdisc: Unify graft validation
authorPetr Machata <petrm@nvidia.com>
Tue, 19 Oct 2021 08:07:08 +0000 (11:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Oct 2021 11:24:51 +0000 (12:24 +0100)
commitbe7e2a5a58d4905c8737b64491accb803cf987a9
treebec1b569ede6ed83ef7a4aa0fabda1d24d94c60b
parent65626e075714ac9f512ea97e051e81614a781fed
mlxsw: spectrum_qdisc: Unify graft validation

Qdisc graft operations have so far been reported at PRIO, ETS and RED, with
RED events ignored, because RED was not considered a classful qdisc. A
following patch will make mlxsw recognize RED and TBF as classful qdiscs,
and thus it is necessary to validate grafting at these qdiscs as well.
Rename the existing graft validator to make it clear that it is a generic
function, and invoke for RED and TBF graft events as well. Drop the
unnecessary PRIO helper and invoke the graft validator directly for PRIO as
well.

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