diff options
author | Shay Drory <shayd@nvidia.com> | 2023-01-19 10:10:50 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-07-27 21:37:29 +0300 |
commit | b90ebfc018b087ba1e4981b298b58733236ff296 (patch) | |
tree | dd3305421bbd8791286aefe269538996c341fad8 /include | |
parent | 06cd555f73caec515a14d42ef052221fa2587ff9 (diff) | |
download | linux-b90ebfc018b087ba1e4981b298b58733236ff296.tar.xz |
net/mlx5: Allocate command stats with xarray
Command stats is an array with more than 2K entries, which amounts to
~180KB. This is way more than actually needed, as only ~190 entries
are being used.
Therefore, replace the array with xarray.
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx5/driver.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 39c5f4087c39..f21703fb75fd 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -322,7 +322,7 @@ struct mlx5_cmd { struct mlx5_cmd_debug dbg; struct cmd_msg_cache cache[MLX5_NUM_COMMAND_CACHES]; int checksum_disabled; - struct mlx5_cmd_stats stats[MLX5_CMD_OP_MAX]; + struct xarray stats; }; struct mlx5_cmd_mailbox { |