Re: [PATCH net 1/3] net/mlx5: Reset bw_share field when changing a node's parent

From: Jacob Keller
Date: Thu Jul 10 2025 - 12:32:37 EST




On 7/10/2025 6:53 AM, Tariq Toukan wrote:
> From: Carolina Jubran <cjubran@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Reviewed-by: Cosmin Ratiu <cratiu@xxxxxxxxxx>
> Reviewed-by: Dragos Tatulea <dtatulea@xxxxxxxxxx>
> Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
> index b6ae384396b3..ad9f6fca9b6a 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
> @@ -1076,6 +1076,7 @@ static int esw_qos_vports_node_update_parent(struct mlx5_esw_sched_node *node,
> return err;
> }
> esw_qos_node_set_parent(node, parent);
> + node->bw_share = 0;
>

Makes sense.

Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>

> return 0;
> }

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature