提交 37956d78 编写于 作者: J Jiri Pirko 提交者: David S. Miller

mlxsw: spectrum_router: Make mlxsw_sp_router_fib4_del return void and remove warn

The function return value is not checked anywhere. Also, the warning
causes huge slowdown when removing large number of FIB entries which
were not offloaded, because of ordering issue. Ido's preparing
a patchset to fix the ordering issue, but that is definitelly not
net tree material.

Fixes: b45f64d1 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls")
Signed-off-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 19271c1a
...@@ -1820,19 +1820,17 @@ static int mlxsw_sp_router_fib4_add(struct mlxsw_sp *mlxsw_sp, ...@@ -1820,19 +1820,17 @@ static int mlxsw_sp_router_fib4_add(struct mlxsw_sp *mlxsw_sp,
return err; return err;
} }
static int mlxsw_sp_router_fib4_del(struct mlxsw_sp *mlxsw_sp, static void mlxsw_sp_router_fib4_del(struct mlxsw_sp *mlxsw_sp,
struct fib_entry_notifier_info *fen_info) struct fib_entry_notifier_info *fen_info)
{ {
struct mlxsw_sp_fib_entry *fib_entry; struct mlxsw_sp_fib_entry *fib_entry;
if (mlxsw_sp->router.aborted) if (mlxsw_sp->router.aborted)
return 0; return;
fib_entry = mlxsw_sp_fib_entry_find(mlxsw_sp, fen_info); fib_entry = mlxsw_sp_fib_entry_find(mlxsw_sp, fen_info);
if (!fib_entry) { if (!fib_entry)
dev_warn(mlxsw_sp->bus_info->dev, "Failed to find FIB4 entry being removed.\n"); return;
return -ENOENT;
}
if (fib_entry->ref_count == 1) { if (fib_entry->ref_count == 1) {
mlxsw_sp_fib_entry_del(mlxsw_sp, fib_entry); mlxsw_sp_fib_entry_del(mlxsw_sp, fib_entry);
...@@ -1840,7 +1838,6 @@ static int mlxsw_sp_router_fib4_del(struct mlxsw_sp *mlxsw_sp, ...@@ -1840,7 +1838,6 @@ static int mlxsw_sp_router_fib4_del(struct mlxsw_sp *mlxsw_sp,
} }
mlxsw_sp_fib_entry_put(mlxsw_sp, fib_entry); mlxsw_sp_fib_entry_put(mlxsw_sp, fib_entry);
return 0;
} }
static int mlxsw_sp_router_set_abort_trap(struct mlxsw_sp *mlxsw_sp) static int mlxsw_sp_router_set_abort_trap(struct mlxsw_sp *mlxsw_sp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册