]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit1c375ffb2efab992b74fb1801c2e0bb2051a6e6e
tree0c082e2fa19582c1f018868002c44107e5a27c6b
parent605d25cd782a67f0c9d871096ee04acfe14f89ca
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