]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: Add a resource describing number of RIFs
authorPetr Machata <petrm@nvidia.com>
Thu, 16 Jun 2022 10:42:37 +0000 (13:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jun 2022 09:31:33 +0000 (10:31 +0100)
commite5d450062706979d164c89a48dce019ca9459a96
tree9d41738516fa314266f4d344a2210cd511e8e1ea
parent0e0456bfe0810384b99b95391267a91dd271f313
mlxsw: Add a resource describing number of RIFs

The Spectrum ASIC has a limit on how many L3 devices (called RIFs) can be
created. The limit depends on the ASIC and FW revision, and mlxsw reads it
from the FW. In order to communicate both the number of RIFs that there can
be, and how many are taken now (i.e. occupancy), introduce a corresponding
devlink resource.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@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