]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/mlx5e: Extend TC max ratelimit using max_bw_value_msb
authorAlexei Lazar <alazar@nvidia.com>
Tue, 3 Feb 2026 07:30:21 +0000 (09:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Feb 2026 05:16:49 +0000 (21:16 -0800)
commit3e5aa52b45c73470092f00d219e947f32cce340c
tree20698745244700a45cc294df318890cc4824b6ef
parent23fb09db9e7474a31b2ceb639c9a0ea6bc08f80e
net/mlx5e: Extend TC max ratelimit using max_bw_value_msb

The per-TC rate limit was restricted to 255 Gbps due to the 8-bit
max_bw_value field in the QETC register.
This limit is insufficient for newer, higher-bandwidth NICs.

Extend the rate limit by using the full 16-bit max_bw_value field.
This allows the finer 100Mbps granularity to be used for rates up to
~6.5 Tbps, instead of switching to 1Gbps granularity at higher rates.

The extended range is only used when the device advertises support
via the qetcr_qshr_max_bw_val_msb capability bit in the QCAM register.

Signed-off-by: Alexei Lazar <alazar@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260203073021.1710806-2-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/dcbnl.h
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/mellanox/mlx5/core/port.c