net/mlx5e: Preserve tc-bw during parent changes
authorCarolina Jubran <cjubran@nvidia.com>
Wed, 20 Aug 2025 13:32:04 +0000 (16:32 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Aug 2025 14:58:31 +0000 (07:58 -0700)
commite8f973576ca5387ffd2917b8ae661d3f9acde526
tree4cdf49c522561e93a0e41767043936ce4e22f64f
parent330f0f6713a39581936decac72331e6ab7f13529
net/mlx5e: Preserve tc-bw during parent changes

When changing parent of a node/leaf with tc-bw configured, the code
saves and restores tc-bw values. However, it was reading the converted
hardware bw_share values (where 0 becomes 1) instead of the original
user values, causing incorrect tc-bw calculations after parent change.

Store original tc-bw values in the node structure and use them directly
for save/restore operations.

Fixes: cf7e73770d1b ("net/mlx5: Manage TC arbiter nodes and implement full support for tc-bw")
Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/20250820133209.389065-4-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c