mlxsw: Prepare 'bridge_type' field for SFMR usage
authorAmit Cohen <amcohen@nvidia.com>
Mon, 27 Jun 2022 07:06:11 +0000 (10:06 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jun 2022 12:31:36 +0000 (14:31 +0200)
commitfad8e1b6d52de875a63a64c465be7349958bb561
treed7550a972e20f872d812f4cc12f911a46bf8cc72
parent93303ff828fd435afef3bf1991defb3e4ae26464
mlxsw: Prepare 'bridge_type' field for SFMR usage

Under the legacy bridge model, the field 'bridge_type' is used only
in SFGC register, to determine the type of flood table (FID/FID offset).

Under the unified bridge model, it will be used also in SFMR register.
When a BUM packet needs to be flooded, SFGC is used to provide the
'mid_base' for PGT table. The access to SFGC is by
{packet type, bridge type}. Under the unified bridge model, software is
responsible for configuring 'bridge_type' as part of SFMR.

As preparation for the new required configuration, rename
'enum mlxsw_reg_sfgc_bridge_type' to 'enum mlxsw_reg_bridge_type'. Then
it can be used also in SFMR. In addition, align the names of the values to
internal documentation.

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