]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Expose RIF MAC profiles to devlink resource
authorDanielle Ratson <danieller@nvidia.com>
Tue, 26 Oct 2021 09:42:21 +0000 (12:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Oct 2021 12:35:57 +0000 (13:35 +0100)
commitca56431d12acee6602fafc10cdbbfaf4e2cdee76
tree0c082e2fa19582c1f018868002c44107e5a27c6b
parent9bba70d9958b6f64b83251b657a75917921c0c49
mlxsw: spectrum_router: Expose RIF MAC profiles to devlink resource

Expose via devlink-resource the maximum number of RIF MAC profiles and
their current occupancy, so it can be used for debug and writing generic
tests, like in the next patch.

Example for Spectrum-2 output:

$ devlink resource show pci/0000:06:00.0
...
  name rif_mac_profiles size 4 occ 0 unit entry dpipe_tables none

Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c