]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Let user configure max_macs generic param
authorShay Drory <shayd@nvidia.com>
Thu, 9 Dec 2021 10:09:29 +0000 (12:09 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 22 Dec 2021 03:08:55 +0000 (19:08 -0800)
commit4baffb25f6d5ec74cee64d1027dc60623f577290
tree294871d1c48c7b4469b5ed069f7bb0c2627975d4
parent4a242f488663f03319c052f2645fce382b86f14f
net/mlx5: Let user configure max_macs generic 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