]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Allocate rate limit table when rate is configured
authorParav Pandit <parav@nvidia.com>
Fri, 19 Feb 2021 10:06:54 +0000 (12:06 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 2 Apr 2021 23:13:06 +0000 (16:13 -0700)
commit7911f1eea6adfd49d6b9a67b21a0d9547249d4e9
tree218be75a0b8e2807f1e45cb6cf487743333cf4b8
parent6403858aa77c14adf6a0bd596b0c2b948eb4ce5f
net/mlx5: Allocate rate limit table when rate is configured

A device supports 128 rate limiters. A static table allocation consumes
8KB of memory even when rate is not configured.

Instead, allocate the table when at least one rate is configured.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/rl.c
include/linux/mlx5/driver.h