]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Let user configure max_macs param
authorShay Drory <shayd@nvidia.com>
Mon, 16 Aug 2021 05:41:08 +0000 (08:41 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 25 Oct 2021 20:51:21 +0000 (13:51 -0700)
commite52a9e301c42bde5420ff4c7f1ae39d08392c605
tree5f5c3fe17016437778393738711e698e665f87b3
parentc51a3bff19e5402223c488bf875e7f927956560e
net/mlx5: Let user configure max_macs param

Currently, max_macs is taking 70Kbytes of memory per function. This
size is not needed in all use cases, and is critical with large scale.
Hence, allow user to configure the number of max_macs.

For example, to reduce the number of max_macs to 1, execute::
$ devlink dev param set pci/0000:00:0b.0 name max_macs value 1 \
              cmode driverinit
$ devlink dev reload pci/0000:00:0b.0

Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Documentation/networking/devlink/mlx5.rst
drivers/net/ethernet/mellanox/mlx5/core/devlink.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/mlx5_ifc.h