diff options
| author | 2025-11-09 11:37:51 +0200 | |
|---|---|---|
| committer | 2025-11-11 15:05:44 +0100 | |
| commit | a7bf4d5063c7837096aab2853224eb23628514d9 (patch) | |
| tree | 2a13a79516c6c9232582a79059619f10e0e33278 /lib/livepatch/git:/git.zx2c4.com/ssh:/git@git.zx2c4.com | |
| parent | net/mlx5e: Trim the length of the num_doorbell error (diff) | |
| download | wireguard-linux-a7bf4d5063c7837096aab2853224eb23628514d9.tar.xz wireguard-linux-a7bf4d5063c7837096aab2853224eb23628514d9.zip | |
net/mlx5e: Fix maxrate wraparound in threshold between units
The previous calculation used roundup() which caused an overflow for
rates between 25.5Gbps and 26Gbps.
For example, a rate of 25.6Gbps would result in using 100Mbps units with
value of 256, which would overflow the 8 bits field.
Simplify the upper_limit_mbps calculation by removing the
unnecessary roundup, and adjust the comparison to use <= to correctly
handle the boundary condition.
Fixes: d8880795dabf ("net/mlx5e: Implement DCBNL IEEE max rate")
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/1762681073-1084058-4-git-send-email-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'lib/livepatch/git:/git.zx2c4.com/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
