summaryrefslogtreecommitdiff
path: root/include/linux/mlx5
diff options
context:
space:
mode:
authorParav Pandit <parav@nvidia.com>2021-02-19 13:06:54 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-04-03 02:13:06 +0300
commit6b30b6d4d36c978e0ab0f22e85bf3c646732e98b (patch)
tree218be75a0b8e2807f1e45cb6cf487743333cf4b8 /include/linux/mlx5
parent97d85aba2543af790aaf7f4eb1c9f643a1718519 (diff)
downloadlinux-6b30b6d4d36c978e0ab0f22e85bf3c646732e98b.tar.xz
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>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r--include/linux/mlx5/driver.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index a9bd7e3bd554..baf38b5a2a8c 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -530,6 +530,7 @@ struct mlx5_rl_table {
u32 max_rate;
u32 min_rate;
struct mlx5_rl_entry *rl_entry;
+ u64 refcount;
};
struct mlx5_core_roce {