]> 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)
commit97058d733ba2448de6fd1a09e2651c9a6d2a1e3c
tree294871d1c48c7b4469b5ed069f7bb0c2627975d4
parente94189d3ee2f78ebdf639c9bdf9c931c4bbd26bc
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