@@ -1188,6 +1188,10 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv)
1188
1188
return err ;
1189
1189
}
1190
1190
1191
+ err = mlx5e_rep_neigh_init (rpriv );
1192
+ if (err )
1193
+ goto err_neigh_init ;
1194
+
1191
1195
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK ) {
1192
1196
err = mlx5e_init_uplink_rep_tx (rpriv );
1193
1197
if (err )
@@ -1204,6 +1208,8 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv)
1204
1208
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK )
1205
1209
mlx5e_cleanup_uplink_rep_tx (rpriv );
1206
1210
err_init_tx :
1211
+ mlx5e_rep_neigh_cleanup (rpriv );
1212
+ err_neigh_init :
1207
1213
mlx5e_destroy_tises (priv );
1208
1214
return err ;
1209
1215
}
@@ -1217,22 +1223,17 @@ static void mlx5e_cleanup_rep_tx(struct mlx5e_priv *priv)
1217
1223
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK )
1218
1224
mlx5e_cleanup_uplink_rep_tx (rpriv );
1219
1225
1226
+ mlx5e_rep_neigh_cleanup (rpriv );
1220
1227
mlx5e_destroy_tises (priv );
1221
1228
}
1222
1229
1223
1230
static void mlx5e_rep_enable (struct mlx5e_priv * priv )
1224
1231
{
1225
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1226
-
1227
1232
mlx5e_set_netdev_mtu_boundaries (priv );
1228
- mlx5e_rep_neigh_init (rpriv );
1229
1233
}
1230
1234
1231
1235
static void mlx5e_rep_disable (struct mlx5e_priv * priv )
1232
1236
{
1233
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1234
-
1235
- mlx5e_rep_neigh_cleanup (rpriv );
1236
1237
}
1237
1238
1238
1239
static int mlx5e_update_rep_rx (struct mlx5e_priv * priv )
@@ -1282,7 +1283,6 @@ static int uplink_rep_async_event(struct notifier_block *nb, unsigned long event
1282
1283
1283
1284
static void mlx5e_uplink_rep_enable (struct mlx5e_priv * priv )
1284
1285
{
1285
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1286
1286
struct net_device * netdev = priv -> netdev ;
1287
1287
struct mlx5_core_dev * mdev = priv -> mdev ;
1288
1288
u16 max_mtu ;
@@ -1304,7 +1304,6 @@ static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv)
1304
1304
mlx5_notifier_register (mdev , & priv -> events_nb );
1305
1305
mlx5e_dcbnl_initialize (priv );
1306
1306
mlx5e_dcbnl_init_app (priv );
1307
- mlx5e_rep_neigh_init (rpriv );
1308
1307
mlx5e_rep_bridge_init (priv );
1309
1308
1310
1309
netdev -> wanted_features |= NETIF_F_HW_TC ;
@@ -1319,7 +1318,6 @@ static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv)
1319
1318
1320
1319
static void mlx5e_uplink_rep_disable (struct mlx5e_priv * priv )
1321
1320
{
1322
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1323
1321
struct mlx5_core_dev * mdev = priv -> mdev ;
1324
1322
1325
1323
rtnl_lock ();
@@ -1329,7 +1327,6 @@ static void mlx5e_uplink_rep_disable(struct mlx5e_priv *priv)
1329
1327
rtnl_unlock ();
1330
1328
1331
1329
mlx5e_rep_bridge_cleanup (priv );
1332
- mlx5e_rep_neigh_cleanup (rpriv );
1333
1330
mlx5e_dcbnl_delete_app (priv );
1334
1331
mlx5_notifier_unregister (mdev , & priv -> events_nb );
1335
1332
mlx5e_rep_tc_disable (priv );
0 commit comments