]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/mlx5e: Rename upper_limit_mbps to upper_limit_100mbps
authorGal Pressman <gal@nvidia.com>
Sun, 30 Nov 2025 10:25:32 +0000 (12:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 1 Dec 2025 22:56:27 +0000 (14:56 -0800)
Clarify that the limit represents the threshold for using 100 Mbps
units rather than a general Mbps limit.

Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Nimrod Oren <noren@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1764498334-1327918-3-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c

index dd491fd8162bb2f52c8f22c919dc86c7752e0e2c..7127442f800315fda48a24aca89289f3b9464ad1 100644 (file)
@@ -595,7 +595,7 @@ static int mlx5e_dcbnl_ieee_setmaxrate(struct net_device *netdev,
        struct mlx5_core_dev *mdev = priv->mdev;
        u8 max_bw_value[IEEE_8021QAZ_MAX_TCS];
        u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS];
-       u64 upper_limit_mbps;
+       u64 upper_limit_100mbps;
        u64 upper_limit_gbps;
        int i;
        struct {
@@ -614,7 +614,7 @@ static int mlx5e_dcbnl_ieee_setmaxrate(struct net_device *netdev,
 
        memset(max_bw_value, 0, sizeof(max_bw_value));
        memset(max_bw_unit, 0, sizeof(max_bw_unit));
-       upper_limit_mbps = 255 * MLX5E_100MB;
+       upper_limit_100mbps = 255 * MLX5E_100MB;
        upper_limit_gbps = 255 * MLX5E_1GB;
 
        for (i = 0; i <= mlx5_max_tc(mdev); i++) {
@@ -622,7 +622,7 @@ static int mlx5e_dcbnl_ieee_setmaxrate(struct net_device *netdev,
                        max_bw_unit[i]  = MLX5_BW_NO_LIMIT;
                        continue;
                }
-               if (maxrate->tc_maxrate[i] <= upper_limit_mbps) {
+               if (maxrate->tc_maxrate[i] <= upper_limit_100mbps) {
                        max_bw_value[i] = div_u64(maxrate->tc_maxrate[i],
                                                  MLX5E_100MB);
                        max_bw_value[i] = max_bw_value[i] ? max_bw_value[i] : 1;