]> 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)
commit5aec9c419526574abee4f4419e921bc01515d7d4
treebf70a3d59832c6c1c72a6e9d775add3ccf5eb265
parentf73f1508c9c5cfe5e8b8e0698ee5bada5289d417
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