]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_qdisc: Generalize PRIO offload to support ETS
authorPetr Machata <petrm@mellanox.com>
Wed, 18 Dec 2019 14:55:17 +0000 (14:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Dec 2019 21:32:30 +0000 (13:32 -0800)
commitd2ff9bf6b5bba12722a03feba0c67377ae26a55d
treebf70a3d59832c6c1c72a6e9d775add3ccf5eb265
parent80a423d25e1859be4b01a7542697840bf0167389
mlxsw: spectrum_qdisc: Generalize PRIO offload to support ETS

Thanks to the similarity between PRIO and ETS it is possible to simply
reuse most of the code for offloading PRIO Qdisc. Extract the common
functionality into separate functions, making the current PRIO handlers
thin API adapters.

Extend the new functions to pass quanta for individual bands, which allows
configuring a subset of bands as WRR. Invoke mlxsw_sp_port_ets_set() as
appropriate to de/configure WRR-ness and weight of individual bands.

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