mlxsw: Add SMPE related fields to SMID2 register
authorAmit Cohen <amcohen@nvidia.com>
Sun, 19 Jun 2022 10:29:13 +0000 (13:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jun 2022 09:03:33 +0000 (10:03 +0100)
commit894b98d50b6415ef4ff8cdbc9725e249f9d8fd24
treefce5c0e612b38a8941a9a5a115db9f821b257972
parente0f071c5b8e123e13f3c3ccf4285cbab44394481
mlxsw: Add SMPE related fields to SMID2 register

SMID register maps multicast ID (MID) into a list of local ports.
As preparation for unified bridge model, add some required fields for
future use.

The device includes two main tables to support layer 2 multicast (i.e.,
MDB and flooding). These are the PGT (Port Group Table) and the
MPE (Multicast Port Egress) table.
- PGT is {MID -> (bitmap of local_port, SPME index)}
- MPE is {(Local port, SMPE index) -> eVID}

In Spectrum-1, both indexes into the MPE table (local port and SMPE) are
derived from the PGT table. Therefore, the SMPE index needs to be
programmed as part of the PGT entry via new fields in SMID - 'smpe_valid'
and 'smpe'.

Add the two mentioned fields for future use and align the callers of
mlxsw_reg_smid2_pack() to pass zeros for SMPE fields.

Signed-off-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/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c