net/mlx5: Reset bw_share field when changing a node's parent
authorCarolina Jubran <cjubran@nvidia.com>
Thu, 10 Jul 2025 13:53:42 +0000 (16:53 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Jul 2025 14:26:44 +0000 (07:26 -0700)
commitf7b76466894083c8f518cf29fef75fcd3ec670e5
tree7da471d30dc5b6b6da2c5be664fcd49a700ac71c
parent71b976db8c6e683831e1492efdf1fe0a8487adef
net/mlx5: Reset bw_share field when changing a node's parent

When changing a node's parent, its scheduling element is destroyed and
re-created with bw_share 0. However, the node's bw_share field was not
updated accordingly.

Set the node's bw_share to 0 after re-creation to keep the software
state in sync with the firmware configuration.

Fixes: 9c7bbf4c3304 ("net/mlx5: Add support for setting parent of nodes")
Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/1752155624-24095-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c