summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAmit Cohen <amcohen@nvidia.com>2022-06-19 13:29:16 +0300
committerDavid S. Miller <davem@davemloft.net>2022-06-20 10:03:33 +0100
commit94536249b8d8e7434d79e5a8373986818d7d512b (patch)
treeaf526c2ea03f53c1029cfe711f723f149a6c38f7 /drivers
parent485c281cadf784b4b4182f0854858cfd2fe87d34 (diff)
downloadlinux-stable-94536249b8d8e7434d79e5a8373986818d7d512b.tar.gz
linux-stable-94536249b8d8e7434d79e5a8373986818d7d512b.tar.bz2
linux-stable-94536249b8d8e7434d79e5a8373986818d7d512b.zip
mlxsw: reg: Add flood related field to SFMR register
SFMR register creates and configures FIDs. As preparation for unified bridge model, add a required field for future use. The PGT (Port Group) table maps multicast ID (MID) to {local port list, SMPE index} on Spectrum-1 and to {local port list} on the other ASICs. In the legacy model, software did not interact with this table directly. Instead, it was accessed by firmware in response to registers such as SFTR and SMID. In the new model, the SFTR register is deprecated and software has full control over the PGT table using the SMID register. The configuration of MDB entries (using SFD) is unchanged, but flooding configuration is completely different. SFGC register maps {packet type, bridge type} -> {MID base, table type}, then with FID and FID-offset which are configured via SFMR, the MID index is obtained. Add the field 'flood_bridge_type' to SFMR, software can separate between 802.1q FIDs and vFIDs using two types which are supported. 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')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/reg.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index 0600ede2eb7a..c32c433c2f93 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -1831,6 +1831,16 @@ MLXSW_ITEM32(reg, sfmr, fid, 0x00, 0, 16);
*/
MLXSW_ITEM32(reg, sfmr, flood_rsp, 0x08, 31, 1);
+/* reg_sfmr_flood_bridge_type
+ * Flood bridge type (see SFGC.bridge_type).
+ * 0 - type_0.
+ * 1 - type_1.
+ * Access: RW
+ *
+ * Note: Reserved when legacy bridge model is used and when flood_rsp=1.
+ */
+MLXSW_ITEM32(reg, sfmr, flood_bridge_type, 0x08, 28, 1);
+
/* reg_sfmr_fid_offset
* FID offset.
* Used to point into the flooding table selected by SFGC register if