Skip to content

Commit

Permalink
mlxsw: spectrum_router: Make mlxsw_sp_router_fib4_del return void and…
Browse files Browse the repository at this point in the history
… 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: b45f64d ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls")
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jpirko authored and davem330 committed Oct 20, 2016
1 parent 19271c1 commit 37956d7
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
Original file line number Diff line number Diff line change
Expand Up @@ -1820,27 +1820,24 @@ static int mlxsw_sp_router_fib4_add(struct mlxsw_sp *mlxsw_sp,
return err;
}

static int mlxsw_sp_router_fib4_del(struct mlxsw_sp *mlxsw_sp,
struct fib_entry_notifier_info *fen_info)
static void mlxsw_sp_router_fib4_del(struct mlxsw_sp *mlxsw_sp,
struct fib_entry_notifier_info *fen_info)
{
struct mlxsw_sp_fib_entry *fib_entry;

if (mlxsw_sp->router.aborted)
return 0;
return;

fib_entry = mlxsw_sp_fib_entry_find(mlxsw_sp, fen_info);
if (!fib_entry) {
dev_warn(mlxsw_sp->bus_info->dev, "Failed to find FIB4 entry being removed.\n");
return -ENOENT;
}
if (!fib_entry)
return;

if (fib_entry->ref_count == 1) {
mlxsw_sp_fib_entry_del(mlxsw_sp, fib_entry);
mlxsw_sp_fib_entry_remove(fib_entry->vr->fib, 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)
Expand Down

0 comments on commit 37956d7

Please sign in to comment.