Skip to content

Commit e1098bb

Browse files
gal-pressmankuba-moo
authored andcommitted
net/mlx5e: Rename upper_limit_mbps to upper_limit_100mbps
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>
1 parent e1de33c commit e1098bb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ static int mlx5e_dcbnl_ieee_setmaxrate(struct net_device *netdev,
595595
struct mlx5_core_dev *mdev = priv->mdev;
596596
u8 max_bw_value[IEEE_8021QAZ_MAX_TCS];
597597
u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS];
598-
u64 upper_limit_mbps;
598+
u64 upper_limit_100mbps;
599599
u64 upper_limit_gbps;
600600
int i;
601601
struct {
@@ -614,15 +614,15 @@ static int mlx5e_dcbnl_ieee_setmaxrate(struct net_device *netdev,
614614

615615
memset(max_bw_value, 0, sizeof(max_bw_value));
616616
memset(max_bw_unit, 0, sizeof(max_bw_unit));
617-
upper_limit_mbps = 255 * MLX5E_100MB;
617+
upper_limit_100mbps = 255 * MLX5E_100MB;
618618
upper_limit_gbps = 255 * MLX5E_1GB;
619619

620620
for (i = 0; i <= mlx5_max_tc(mdev); i++) {
621621
if (!maxrate->tc_maxrate[i]) {
622622
max_bw_unit[i] = MLX5_BW_NO_LIMIT;
623623
continue;
624624
}
625-
if (maxrate->tc_maxrate[i] <= upper_limit_mbps) {
625+
if (maxrate->tc_maxrate[i] <= upper_limit_100mbps) {
626626
max_bw_value[i] = div_u64(maxrate->tc_maxrate[i],
627627
MLX5E_100MB);
628628
max_bw_value[i] = max_bw_value[i] ? max_bw_value[i] : 1;

0 commit comments

Comments
 (0)