OSDN Git Service

mlxsw: spectrum_fid: Configure flooding entries using PGT APIs
authorAmit Cohen <amcohen@nvidia.com>
Mon, 27 Jun 2022 07:06:21 +0000 (10:06 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jun 2022 12:31:36 +0000 (14:31 +0200)
commitfe94df6dc6225e034cca71a917c2fa3302e7b2c8
tree1d57239d8920d0b542ea272054b1762d2c63e373
parent9f6f467a3cdb1cfcca570af0c8901479b090cb35
mlxsw: spectrum_fid: Configure flooding entries using PGT APIs

The PGT (Port Group Table) table maps an index to a bitmap of local ports
to which a packet needs to be replicated. This table is used for layer 2
multicast and flooding.

In the legacy model, software did not interact with PGT table directly.
Instead, it was accessed by firmware in response to registers such as SFTR
and SMID. In the new model, the SFTR register is deprecated and software
has full control over the PGT table using the SMID register.

Use the new PGT APIs to allocate entries for flooding as part of flood
tables initialization. Add mlxsw_sp_fid_flood_tables_fini() to free the
allocated indexes. In addition, use PGT APIs to add/remove ports from PGT
table. The existing code which configures the flood entries via SFTR2 will
be removed later.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c