mlxsw: reg: Add flood related field to SFMR register
authorAmit Cohen <amcohen@nvidia.com>
Sun, 19 Jun 2022 10:29:16 +0000 (13:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jun 2022 09:03:33 +0000 (10:03 +0100)
commit94536249b8d8e7434d79e5a8373986818d7d512b
treeaf526c2ea03f53c1029cfe711f723f149a6c38f7
parent485c281cadf784b4b4182f0854858cfd2fe87d34
mlxsw: reg: Add flood related field to SFMR register

SFMR register creates and configures FIDs. As preparation for unified
bridge model, add a required field for future use.

The PGT (Port Group) table maps multicast ID (MID) to
{local port list, SMPE index} on Spectrum-1 and to {local port list} on
the other ASICs.

In the legacy model, software did not interact with this 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.

The configuration of MDB entries (using SFD) is unchanged, but flooding
configuration is completely different.
SFGC register maps {packet type, bridge type} -> {MID base, table type},
then with FID and FID-offset which are configured via SFMR, the MID index
is obtained.

Add the field 'flood_bridge_type' to SFMR, software can separate between
802.1q FIDs and vFIDs using two types which are supported.

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: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/reg.h