]> www.infradead.org Git - users/dwmw2/linux.git/commit
net/mlx5: Refactor scheduling element configuration bitmasks
authorCarolina Jubran <cjubran@nvidia.com>
Thu, 7 Nov 2024 19:43:49 +0000 (21:43 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Nov 2024 03:28:17 +0000 (19:28 -0800)
commitcc4bb15ffa8412bfe1e189d37edb6ca7d9918cb4
tree5fa8691fbe63b54f162184217054b9e0d24c7ddd
parentac778fefed340e019bc9c022842b4a2cc5713559
net/mlx5: Refactor scheduling element configuration bitmasks

Refactor esw_qos_sched_elem_config to set bitmasks only when max_rate
or bw_share values change, allowing the function to configure nodes
with only one of these parameters.

This enables more flexible usage for nodes where only one parameter
requires configuration.

Remove scattered assignments and checks to centralize them within this
function, removing the now redundant esw_qos_set_node_max_rate
entirely.

With this refactor, also remove the assignment of the vport scheduling
node max rate to the parent max rate for unlimited vports
(where max rate is set to zero), as firmware already handles this
behavior.

Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241107194357.683732-5-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c