]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mlxsw: spectrum_fid: Add an op to get PGT allocation size
authorPetr Machata <petrm@nvidia.com>
Tue, 28 Nov 2023 15:50:40 +0000 (16:50 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Nov 2023 04:03:24 +0000 (20:03 -0800)
commit1686b8d902fd4f1486b21304a62d469fd3713019
tree461c7ad9eb9987560d59ab4c48c65249ec6fdea6
parent80638da22e11164e6833f8697ad94136e0a6cdd5
mlxsw: spectrum_fid: Add an op to get PGT allocation size

In the CFF flood mode, the PGT allocation size of RFID family will not
depend on number of FIDs, but rather number of ports and LAGs. Therefore
introduce a FID family operation to calculate the PGT allocation size.

The way that size is calculated in the CFF mode depends on calling fallible
functions. Thus express the op as returning an int, with the size returned
via a pointer argument.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/1174651b7160fcedbef50010ae4b68201112fe6f.1701183892.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c