Skip to content

Commit d331d30

Browse files
idoschdavem330
authored andcommitted
mlxsw: spectrum_router: Adjust placement of FIB abort warning
The recent merge commit bb598c1 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") would cause the FIB abort warning to fire whenever we flush the FIB tables - either during module removal or actual abort. Move it back to its rightful location in the FIB abort function. Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0b6e3d0 commit d331d30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,9 +1872,6 @@ static void mlxsw_sp_router_fib_flush(struct mlxsw_sp *mlxsw_sp)
18721872
struct mlxsw_sp_vr *vr;
18731873
int i;
18741874

1875-
if (mlxsw_sp->router.aborted)
1876-
return;
1877-
dev_warn(mlxsw_sp->bus_info->dev, "FIB abort triggered. Note that FIB entries are no longer being offloaded to this device.\n");
18781875
for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS); i++) {
18791876
vr = &mlxsw_sp->router.vrs[i];
18801877

@@ -1899,6 +1896,9 @@ static void mlxsw_sp_router_fib4_abort(struct mlxsw_sp *mlxsw_sp)
18991896
{
19001897
int err;
19011898

1899+
if (mlxsw_sp->router.aborted)
1900+
return;
1901+
dev_warn(mlxsw_sp->bus_info->dev, "FIB abort triggered. Note that FIB entries are no longer being offloaded to this device.\n");
19021902
mlxsw_sp_router_fib_flush(mlxsw_sp);
19031903
mlxsw_sp->router.aborted = true;
19041904
err = mlxsw_sp_router_set_abort_trap(mlxsw_sp);

0 commit comments

Comments
 (0)