]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mlxsw: spectrum: Rename MLXSW_SP_RIF_TYPE_VLAN
authorAmit Cohen <amcohen@nvidia.com>
Thu, 23 Jun 2022 07:17:36 +0000 (10:17 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Jun 2022 11:32:33 +0000 (12:32 +0100)
Currently, the driver emulates 802.1Q FIDs using 802.1D FIDs. As such,
the RIFs configured on top of these FIDs are FID RIFs and not VLAN RIFs.

As part of converting the driver to the unified bridge model, 802.1Q
FIDs and VLAN RIFs will be used.

As a preparation for this change, rename the emulated VLAN RIFs from
'MLXSW_SP_RIF_TYPE_VLAN' to 'MLXSW_SP_RIF_TYPE_VLAN_EMU'. After the
conversion the emulated VLAN RIFs will be removed.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

index acb52f6aa97d91a75be385ef2de5f9881f537cc3..80006a631333f27ad7b59fdedeac0ffc89e2812c 100644 (file)
@@ -84,7 +84,7 @@ struct mlxsw_sp_upper {
 
 enum mlxsw_sp_rif_type {
        MLXSW_SP_RIF_TYPE_SUBPORT,
-       MLXSW_SP_RIF_TYPE_VLAN,
+       MLXSW_SP_RIF_TYPE_VLAN_EMU,
        MLXSW_SP_RIF_TYPE_FID,
        MLXSW_SP_RIF_TYPE_IPIP_LB, /* IP-in-IP loopback. */
        MLXSW_SP_RIF_TYPE_MAX,
index 1f8832f8632793e65bb376c3793375b8e7cb5ed3..fb04fbec7c822be6ef19b342c574f69aa7160d4b 100644 (file)
@@ -774,7 +774,7 @@ static const struct mlxsw_sp_fid_family mlxsw_sp_fid_8021q_emu_family = {
        .end_index              = MLXSW_SP_FID_8021Q_EMU_END,
        .flood_tables           = mlxsw_sp_fid_8021d_flood_tables,
        .nr_flood_tables        = ARRAY_SIZE(mlxsw_sp_fid_8021d_flood_tables),
-       .rif_type               = MLXSW_SP_RIF_TYPE_VLAN,
+       .rif_type               = MLXSW_SP_RIF_TYPE_VLAN_EMU,
        .ops                    = &mlxsw_sp_fid_8021q_emu_ops,
 };
 
index 4c7721506603ee6dca365d0275cc33958aca3458..f4ad045e26e3fc18c5701e97cd1ba471fdc0ce62 100644 (file)
@@ -7718,7 +7718,7 @@ u16 mlxsw_sp_rif_vid(struct mlxsw_sp *mlxsw_sp, const struct net_device *dev)
        /* We only return the VID for VLAN RIFs. Otherwise we return an
         * invalid value (0).
         */
-       if (rif->ops->type != MLXSW_SP_RIF_TYPE_VLAN)
+       if (rif->ops->type != MLXSW_SP_RIF_TYPE_VLAN_EMU)
                goto out;
 
        vid = mlxsw_sp_fid_8021q_vid(rif->fid);
@@ -9540,7 +9540,7 @@ static void mlxsw_sp_rif_vlan_fdb_del(struct mlxsw_sp_rif *rif, const char *mac)
 }
 
 static const struct mlxsw_sp_rif_ops mlxsw_sp_rif_vlan_emu_ops = {
-       .type                   = MLXSW_SP_RIF_TYPE_VLAN,
+       .type                   = MLXSW_SP_RIF_TYPE_VLAN_EMU,
        .rif_size               = sizeof(struct mlxsw_sp_rif),
        .configure              = mlxsw_sp_rif_fid_configure,
        .deconfigure            = mlxsw_sp_rif_fid_deconfigure,
@@ -9618,7 +9618,7 @@ static const struct mlxsw_sp_rif_ops mlxsw_sp1_rif_ipip_lb_ops = {
 
 static const struct mlxsw_sp_rif_ops *mlxsw_sp1_rif_ops_arr[] = {
        [MLXSW_SP_RIF_TYPE_SUBPORT]     = &mlxsw_sp_rif_subport_ops,
-       [MLXSW_SP_RIF_TYPE_VLAN]        = &mlxsw_sp_rif_vlan_emu_ops,
+       [MLXSW_SP_RIF_TYPE_VLAN_EMU]    = &mlxsw_sp_rif_vlan_emu_ops,
        [MLXSW_SP_RIF_TYPE_FID]         = &mlxsw_sp_rif_fid_ops,
        [MLXSW_SP_RIF_TYPE_IPIP_LB]     = &mlxsw_sp1_rif_ipip_lb_ops,
 };
@@ -9806,7 +9806,7 @@ static const struct mlxsw_sp_rif_ops mlxsw_sp2_rif_ipip_lb_ops = {
 
 static const struct mlxsw_sp_rif_ops *mlxsw_sp2_rif_ops_arr[] = {
        [MLXSW_SP_RIF_TYPE_SUBPORT]     = &mlxsw_sp_rif_subport_ops,
-       [MLXSW_SP_RIF_TYPE_VLAN]        = &mlxsw_sp_rif_vlan_emu_ops,
+       [MLXSW_SP_RIF_TYPE_VLAN_EMU]    = &mlxsw_sp_rif_vlan_emu_ops,
        [MLXSW_SP_RIF_TYPE_FID]         = &mlxsw_sp_rif_fid_ops,
        [MLXSW_SP_RIF_TYPE_IPIP_LB]     = &mlxsw_sp2_rif_ipip_lb_ops,
 };