mlxsw: spectrum_router: Don't batch neighbour deletion
Current firmware supported by the driver doesn't support batch deletion of IPv6 neighbours on a given router interface (RIF). Until a new version that supports this functionality is made available, delete neighbours one by one. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6a9bef4eee
commit
4a3c67a6e7
|
@ -1419,26 +1419,17 @@ static void mlxsw_sp_neigh_fini(struct mlxsw_sp *mlxsw_sp)
|
||||||
rhashtable_destroy(&mlxsw_sp->router->neigh_ht);
|
rhashtable_destroy(&mlxsw_sp->router->neigh_ht);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mlxsw_sp_neigh_rif_flush(struct mlxsw_sp *mlxsw_sp,
|
|
||||||
const struct mlxsw_sp_rif *rif)
|
|
||||||
{
|
|
||||||
char rauht_pl[MLXSW_REG_RAUHT_LEN];
|
|
||||||
|
|
||||||
mlxsw_reg_rauht_pack(rauht_pl, MLXSW_REG_RAUHT_OP_WRITE_DELETE_ALL,
|
|
||||||
rif->rif_index, rif->addr);
|
|
||||||
return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(rauht), rauht_pl);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void mlxsw_sp_neigh_rif_gone_sync(struct mlxsw_sp *mlxsw_sp,
|
static void mlxsw_sp_neigh_rif_gone_sync(struct mlxsw_sp *mlxsw_sp,
|
||||||
struct mlxsw_sp_rif *rif)
|
struct mlxsw_sp_rif *rif)
|
||||||
{
|
{
|
||||||
struct mlxsw_sp_neigh_entry *neigh_entry, *tmp;
|
struct mlxsw_sp_neigh_entry *neigh_entry, *tmp;
|
||||||
|
|
||||||
mlxsw_sp_neigh_rif_flush(mlxsw_sp, rif);
|
|
||||||
list_for_each_entry_safe(neigh_entry, tmp, &rif->neigh_list,
|
list_for_each_entry_safe(neigh_entry, tmp, &rif->neigh_list,
|
||||||
rif_list_node)
|
rif_list_node) {
|
||||||
|
mlxsw_sp_neigh_entry_update(mlxsw_sp, neigh_entry, false);
|
||||||
mlxsw_sp_neigh_entry_destroy(mlxsw_sp, neigh_entry);
|
mlxsw_sp_neigh_entry_destroy(mlxsw_sp, neigh_entry);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
struct mlxsw_sp_nexthop_key {
|
struct mlxsw_sp_nexthop_key {
|
||||||
struct fib_nh *fib_nh;
|
struct fib_nh *fib_nh;
|
||||||
|
|
Loading…
Reference in a new issue