]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/mlx5: Remove redundant bw_share minimal value assignment
authorCarolina Jubran <cjubran@nvidia.com>
Mon, 17 Nov 2025 21:42:07 +0000 (23:42 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 19 Nov 2025 02:53:33 +0000 (18:53 -0800)
Remove unnecessary logic that sets bw_share to minimal value, when
parent has bw_share configured but nodes don't have min_rate.

This check is redundant because the parent bandwidth acts as the upper
bound regardless, and the firmware always enforces the topmost
bandwidth constraint.

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/1763415729-1238421-4-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c

index 56e6f54b1e2ed680b9c7d52d4b5a574462063f1e..4278bcb04c72ed8b39202ab08eccbdf0830d92cc 100644 (file)
@@ -341,13 +341,6 @@ static u32 esw_qos_calculate_min_rate_divider(struct mlx5_eswitch *esw,
        if (max_guarantee)
                return max_t(u32, max_guarantee / fw_max_bw_share, 1);
 
-       /* If nodes max min_rate divider is 0 but their parent has bw_share
-        * configured, then set bw_share for nodes to minimal value.
-        */
-
-       if (parent && parent->bw_share)
-               return 1;
-
        /* If the node nodes has min_rate configured, a divider of 0 sets all
         * nodes' bw_share to 0, effectively disabling min guarantees.
         */