summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
diff options
context:
space:
mode:
authorAmit Cohen <amcohen@nvidia.com>2022-07-04 09:11:34 +0300
committerDavid S. Miller <davem@davemloft.net>2022-07-04 11:56:57 +0300
commitd4324e3194c78a304cc86ffb4f79fef2fdadf599 (patch)
treeeb7c92ada793152f961f63ca8e3a0b47c76a4122 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h
parent662761d8987dc232e85fc35b529f80e01fd4fc71 (diff)
downloadlinux-d4324e3194c78a304cc86ffb4f79fef2fdadf599.tar.xz
mlxsw: Add new FID families for unified bridge model
In the unified bridge model, mlxsw will no longer emulate 802.1Q FIDs using 802.1D FIDs. The new FID table will look as follows: +---------------+ | 802.1q FIDs | 4K entries | [1..4094] | +---------------+ | 802.1d FIDs | 1K entries | [4095..5118] | +---------------+ | Dummy FIDs | 1 entry | [5119..5119] | +---------------+ | rFIDs | 11K entries | [5120..16383] | +---------------+ In order to make the change easier to review, four new temporary FID families will be added (e.g., MLXSW_SP_FID_TYPE_8021D_UB) and will not be registered with the FID core until mlxsw is flipped to use the unified bridge model. Add .1d, rfid and dummy FID families for unified bridge, the next patch will add .1q family separately as it requires more changes. The following changes are required: 1. Add 'smpe_index_valid' field to 'struct mlxsw_sp_fid_family' and set SFMR.smpe accordingly. SMPE index is reserved for rFIDs, as their flooding is handled by firmware, and always reserved in Spectrum-1, as it is configured as part of PGT table. 2. Add 'ubridge' field to 'struct mlxsw_sp_fid_family'. This field will be removed later, use it in mlxsw_sp_fid_family_{register,unregister}() to skip the registration / unregistration of the new families when the legacy model is used. 3. Indexes - the start and end indexes of each FID family will need to be changed according to the above diagram. 4. Add flood tables for unified bridge model, use 'fid_offset' as table type, as in the new model the access to flood tables will be using 'fid_offset' calculation. 5. FID family operation changes: a. rFID supposed to be created using SFMR, as it is not created by firmware using unified bridge model. b. port_vid_map() should perform SVFA for rFID, as the mapping is not created by firmware using unified bridge model. c. flood_index() is not aligned to the new model, as this function 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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index c67bc562b13e..701aea8f3872 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -106,6 +106,10 @@ enum mlxsw_sp_fid_type {
MLXSW_SP_FID_TYPE_8021D,
MLXSW_SP_FID_TYPE_RFID,
MLXSW_SP_FID_TYPE_DUMMY,
+ MLXSW_SP_FID_TYPE_8021Q_UB,
+ MLXSW_SP_FID_TYPE_8021D_UB,
+ MLXSW_SP_FID_TYPE_RFID_UB,
+ MLXSW_SP_FID_TYPE_DUMMY_UB,
MLXSW_SP_FID_TYPE_MAX,
};