Skip to content

Commit ba6da02

Browse files
idoschdavem330
authored andcommitted
mlxsw: spectrum_router: Introduce emulated VLAN RIFs
Router interfaces (RIFs) constructed on top of VLAN-aware bridges are of "VLAN" type, whereas RIFs constructed on top of VLAN-unaware bridges of "FID" type. In other words, the RIF type is derived from the underlying FID type. VLAN RIFs are used on top of 802.1Q FIDs, whereas FID RIFs are used on top of 802.1D FIDs. Since the previous patch emulated 802.1Q FIDs using 802.1D FIDs, this patch emulates VLAN RIFs using FID RIFs. Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Petr Machata <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d62dd8a commit ba6da02

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7296,6 +7296,15 @@ static const struct mlxsw_sp_rif_ops mlxsw_sp_rif_fid_ops = {
72967296
.fdb_del = mlxsw_sp_rif_fid_fdb_del,
72977297
};
72987298

7299+
static const struct mlxsw_sp_rif_ops mlxsw_sp_rif_vlan_emu_ops = {
7300+
.type = MLXSW_SP_RIF_TYPE_VLAN,
7301+
.rif_size = sizeof(struct mlxsw_sp_rif),
7302+
.configure = mlxsw_sp_rif_fid_configure,
7303+
.deconfigure = mlxsw_sp_rif_fid_deconfigure,
7304+
.fid_get = mlxsw_sp_rif_vlan_fid_get,
7305+
.fdb_del = mlxsw_sp_rif_vlan_fdb_del,
7306+
};
7307+
72997308
static struct mlxsw_sp_rif_ipip_lb *
73007309
mlxsw_sp_rif_ipip_lb_rif(struct mlxsw_sp_rif *rif)
73017310
{

0 commit comments

Comments
 (0)