Skip to content

Commit af1e696

Browse files
pmachatakuba-moo
authored andcommitted
mlxsw: spectrum_fid: Add profile_id to flood profile
In the CFF mode, flood profiles are identified by a unique numerical identifier. This is used for configuration of FIDs and for configuration of traffic-type to PGT offset rules. In both cases, the numerical identifier serves as a handle for the flood profile. Add the identifier to the flood profile structure. There is currently only one flood profile in use explicitly, the one used for all bridging. Eventually three will be necessary in total: one for bridges, one for rFIDs, one for NVE underlay. A total of four profiles are supported by the HW. Start allocating at 1, because 0 is currently used for underlay NVE flood. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://lore.kernel.org/r/19ea9c35ba8b522fa5f7eb6fd7bc1b68f0f66b41.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 5e6146e commit af1e696

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,14 @@ struct mlxsw_sp_fid_ops {
113113
const struct mlxsw_sp_port *mlxsw_sp_port);
114114
};
115115

116+
enum mlxsw_sp_fid_flood_profile_id {
117+
MLXSW_SP_FID_FLOOD_PROFILE_ID_BRIDGE = 1,
118+
};
119+
116120
struct mlxsw_sp_fid_flood_profile {
117121
const struct mlxsw_sp_flood_table *flood_tables;
118122
int nr_flood_tables;
123+
const enum mlxsw_sp_fid_flood_profile_id profile_id; /* For CFF mode. */
119124
};
120125

121126
struct mlxsw_sp_fid_family {
@@ -1188,6 +1193,7 @@ static const
11881193
struct mlxsw_sp_fid_flood_profile mlxsw_sp_fid_8021d_flood_profile = {
11891194
.flood_tables = mlxsw_sp_fid_8021d_flood_tables,
11901195
.nr_flood_tables = ARRAY_SIZE(mlxsw_sp_fid_8021d_flood_tables),
1196+
.profile_id = MLXSW_SP_FID_FLOOD_PROFILE_ID_BRIDGE,
11911197
};
11921198

11931199
static bool

0 commit comments

Comments
 (0)