Skip to content

Commit e1e4ce6

Browse files
pmachatakuba-moo
authored andcommitted
mlxsw: reg: Add Switch FID Flooding Profiles Register
The SFFP register populates the fid flooding profile tables used for the NVE flooding and Compressed-FID Flooding (CFF). Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Amit Cohen <amcohen@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://lore.kernel.org/r/ca42eb67763bd0c7cf035afc62ef73632f3f61a6.1700503643.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 2d19da9 commit e1e4ce6

File tree

1 file changed

+45
-0
lines changed
  • drivers/net/ethernet/mellanox/mlxsw

1 file changed

+45
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/reg.h

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,6 +2168,50 @@ static inline void mlxsw_reg_spvc_pack(char *payload, u16 local_port, bool et1,
21682168
mlxsw_reg_spvc_et0_set(payload, et0);
21692169
}
21702170

2171+
/* SFFP - Switch FID Flooding Profiles Register
2172+
* --------------------------------------------
2173+
* The SFFP register populates the fid flooding profile tables used for the NVE
2174+
* flooding and Compressed-FID Flooding (CFF).
2175+
*
2176+
* Reserved on Spectrum-1.
2177+
*/
2178+
#define MLXSW_REG_SFFP_ID 0x2029
2179+
#define MLXSW_REG_SFFP_LEN 0x0C
2180+
2181+
MLXSW_REG_DEFINE(sffp, MLXSW_REG_SFFP_ID, MLXSW_REG_SFFP_LEN);
2182+
2183+
/* reg_sffp_profile_id
2184+
* Profile ID a.k.a. SFMR.nve_flood_prf_id or SFMR.cff_prf_id
2185+
* Range 0..max_cap_nve_flood_prf-1
2186+
* Access: Index
2187+
*/
2188+
MLXSW_ITEM32(reg, sffp, profile_id, 0x00, 16, 2);
2189+
2190+
/* reg_sffp_type
2191+
* The traffic type to reach the flooding table.
2192+
* Same as SFGC.type
2193+
* Access: Index
2194+
*/
2195+
MLXSW_ITEM32(reg, sffp, type, 0x00, 0, 4);
2196+
2197+
/* reg_sffp_flood_offset
2198+
* Flood offset. Offset to add to SFMR.cff_mid_base to get the final PGT address
2199+
* for FID flood; or offset to add to SFMR.nve_tunnel_flood_ptr to get KVD
2200+
* pointer for NVE underlay.
2201+
* Access: RW
2202+
*/
2203+
MLXSW_ITEM32(reg, sffp, flood_offset, 0x04, 0, 3);
2204+
2205+
static inline void mlxsw_reg_sffp_pack(char *payload, u8 profile_id,
2206+
enum mlxsw_reg_sfgc_type type,
2207+
u8 flood_offset)
2208+
{
2209+
MLXSW_REG_ZERO(sffp, payload);
2210+
mlxsw_reg_sffp_profile_id_set(payload, profile_id);
2211+
mlxsw_reg_sffp_type_set(payload, type);
2212+
mlxsw_reg_sffp_flood_offset_set(payload, flood_offset);
2213+
}
2214+
21712215
/* SPEVET - Switch Port Egress VLAN EtherType
21722216
* ------------------------------------------
21732217
* The switch port egress VLAN EtherType configures which EtherType to push at
@@ -12946,6 +12990,7 @@ static const struct mlxsw_reg_info *mlxsw_reg_infos[] = {
1294612990
MLXSW_REG(spvmlr),
1294712991
MLXSW_REG(spfsr),
1294812992
MLXSW_REG(spvc),
12993+
MLXSW_REG(sffp),
1294912994
MLXSW_REG(spevet),
1295012995
MLXSW_REG(smpe),
1295112996
MLXSW_REG(smid2),

0 commit comments

Comments
 (0)