]> git.itanic.dy.fi Git - linux-stable/commitdiff
mlxsw: spectrum: Stop ignoring learning notifications from redirected traffic
authorIdo Schimmel <idosch@nvidia.com>
Fri, 11 Aug 2023 15:13:57 +0000 (17:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Aug 2023 07:11:14 +0000 (08:11 +0100)
As explained in the previous patch, with the ignore action prepended to
the redirect action, it is not longer possible for redirected traffic to
generate learning notifications.

Therefore, remove the workaround that was added in commit 577fa14d2100
("mlxsw: spectrum: Do not process learned records with a dummy FID") as
it is no longer needed.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Petr Machata <petrm@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_switchdev.c

index 2fed55bcfd635ad48920c8cade2b32ff08307a3d..02ca2871b6f9fdf7d38bcbcc3e442b086d20fdae 100644 (file)
@@ -1271,7 +1271,6 @@ int mlxsw_sp_setup_tc_block_qevent_mark(struct mlxsw_sp_port *mlxsw_sp_port,
                                        struct flow_block_offload *f);
 
 /* spectrum_fid.c */
-bool mlxsw_sp_fid_is_dummy(struct mlxsw_sp *mlxsw_sp, u16 fid_index);
 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index(struct mlxsw_sp *mlxsw_sp,
                                                  u16 fid_index);
 int mlxsw_sp_fid_nve_ifindex(const struct mlxsw_sp_fid *fid, int *nve_ifindex);
index b6ee2d658b0c43970a921e8cb73519fc9d046b16..9df098474743d018ad52ddfff3b2650f39f7ddce 100644 (file)
@@ -137,16 +137,6 @@ static const int *mlxsw_sp_packet_type_sfgc_types[] = {
        [MLXSW_SP_FLOOD_TYPE_MC]        = mlxsw_sp_sfgc_mc_packet_types,
 };
 
-bool mlxsw_sp_fid_is_dummy(struct mlxsw_sp *mlxsw_sp, u16 fid_index)
-{
-       enum mlxsw_sp_fid_type fid_type = MLXSW_SP_FID_TYPE_DUMMY;
-       struct mlxsw_sp_fid_family *fid_family;
-
-       fid_family = mlxsw_sp->fid_core->fid_family_arr[fid_type];
-
-       return fid_family->start_index == fid_index;
-}
-
 struct mlxsw_sp_fid *mlxsw_sp_fid_lookup_by_index(struct mlxsw_sp *mlxsw_sp,
                                                  u16 fid_index)
 {
index 3662b9da54890df541b21d3732a871fdec7af3dc..6c749c148148d3a93fba39bec5596e7f75c1198f 100644 (file)
@@ -3066,9 +3066,6 @@ static void mlxsw_sp_fdb_notify_mac_process(struct mlxsw_sp *mlxsw_sp,
                goto just_remove;
        }
 
-       if (mlxsw_sp_fid_is_dummy(mlxsw_sp, fid))
-               goto just_remove;
-
        mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_fid(mlxsw_sp_port, fid);
        if (!mlxsw_sp_port_vlan) {
                netdev_err(mlxsw_sp_port->dev, "Failed to find a matching {Port, VID} following FDB notification\n");
@@ -3136,9 +3133,6 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp,
                goto just_remove;
        }
 
-       if (mlxsw_sp_fid_is_dummy(mlxsw_sp, fid))
-               goto just_remove;
-
        mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_fid(mlxsw_sp_port, fid);
        if (!mlxsw_sp_port_vlan) {
                netdev_err(mlxsw_sp_port->dev, "Failed to find a matching {Port, VID} following FDB notification\n");