Commit 231c8d2b authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

mlxsw: spectrum_router: Remove unnecessary checks

Now that the networking stack takes care of only notifying the routes of
interest, we do not need to maintain a list of identical routes.

Remove the check that tests if the route is the first route in the FIB
node.
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c1e46990
...@@ -3231,10 +3231,6 @@ mlxsw_sp_nexthop_group_update(struct mlxsw_sp *mlxsw_sp, ...@@ -3231,10 +3231,6 @@ mlxsw_sp_nexthop_group_update(struct mlxsw_sp *mlxsw_sp,
return 0; return 0;
} }
static bool
mlxsw_sp_fib_node_entry_is_first(const struct mlxsw_sp_fib_node *fib_node,
const struct mlxsw_sp_fib_entry *fib_entry);
static int static int
mlxsw_sp_nexthop_fib_entries_update(struct mlxsw_sp *mlxsw_sp, mlxsw_sp_nexthop_fib_entries_update(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_nexthop_group *nh_grp) struct mlxsw_sp_nexthop_group *nh_grp)
...@@ -3243,9 +3239,6 @@ mlxsw_sp_nexthop_fib_entries_update(struct mlxsw_sp *mlxsw_sp, ...@@ -3243,9 +3239,6 @@ mlxsw_sp_nexthop_fib_entries_update(struct mlxsw_sp *mlxsw_sp,
int err; int err;
list_for_each_entry(fib_entry, &nh_grp->fib_list, nexthop_group_node) { list_for_each_entry(fib_entry, &nh_grp->fib_list, nexthop_group_node) {
if (!mlxsw_sp_fib_node_entry_is_first(fib_entry->fib_node,
fib_entry))
continue;
err = mlxsw_sp_fib_entry_update(mlxsw_sp, fib_entry); err = mlxsw_sp_fib_entry_update(mlxsw_sp, fib_entry);
if (err) if (err)
return err; return err;
...@@ -3263,12 +3256,8 @@ mlxsw_sp_nexthop_fib_entries_refresh(struct mlxsw_sp_nexthop_group *nh_grp) ...@@ -3263,12 +3256,8 @@ mlxsw_sp_nexthop_fib_entries_refresh(struct mlxsw_sp_nexthop_group *nh_grp)
enum mlxsw_reg_ralue_op op = MLXSW_REG_RALUE_OP_WRITE_WRITE; enum mlxsw_reg_ralue_op op = MLXSW_REG_RALUE_OP_WRITE_WRITE;
struct mlxsw_sp_fib_entry *fib_entry; struct mlxsw_sp_fib_entry *fib_entry;
list_for_each_entry(fib_entry, &nh_grp->fib_list, nexthop_group_node) { list_for_each_entry(fib_entry, &nh_grp->fib_list, nexthop_group_node)
if (!mlxsw_sp_fib_node_entry_is_first(fib_entry->fib_node,
fib_entry))
continue;
mlxsw_sp_fib_entry_offload_refresh(fib_entry, op, 0); mlxsw_sp_fib_entry_offload_refresh(fib_entry, op, 0);
}
} }
static void mlxsw_sp_adj_grp_size_round_up(u16 *p_adj_grp_size) static void mlxsw_sp_adj_grp_size_round_up(u16 *p_adj_grp_size)
...@@ -4785,9 +4774,6 @@ static int mlxsw_sp_fib_node_entry_add(struct mlxsw_sp *mlxsw_sp, ...@@ -4785,9 +4774,6 @@ static int mlxsw_sp_fib_node_entry_add(struct mlxsw_sp *mlxsw_sp,
{ {
struct mlxsw_sp_fib_node *fib_node = fib_entry->fib_node; struct mlxsw_sp_fib_node *fib_node = fib_entry->fib_node;
if (!mlxsw_sp_fib_node_entry_is_first(fib_node, fib_entry))
return 0;
/* To prevent packet loss, overwrite the previously offloaded /* To prevent packet loss, overwrite the previously offloaded
* entry. * entry.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment