@@ -1160,6 +1160,10 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv)
1160
1160
return err ;
1161
1161
}
1162
1162
1163
+ err = mlx5e_rep_neigh_init (rpriv );
1164
+ if (err )
1165
+ goto err_neigh_init ;
1166
+
1163
1167
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK ) {
1164
1168
err = mlx5e_init_uplink_rep_tx (rpriv );
1165
1169
if (err )
@@ -1176,6 +1180,8 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv)
1176
1180
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK )
1177
1181
mlx5e_cleanup_uplink_rep_tx (rpriv );
1178
1182
err_init_tx :
1183
+ mlx5e_rep_neigh_cleanup (rpriv );
1184
+ err_neigh_init :
1179
1185
mlx5e_destroy_tises (priv );
1180
1186
return err ;
1181
1187
}
@@ -1189,22 +1195,17 @@ static void mlx5e_cleanup_rep_tx(struct mlx5e_priv *priv)
1189
1195
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK )
1190
1196
mlx5e_cleanup_uplink_rep_tx (rpriv );
1191
1197
1198
+ mlx5e_rep_neigh_cleanup (rpriv );
1192
1199
mlx5e_destroy_tises (priv );
1193
1200
}
1194
1201
1195
1202
static void mlx5e_rep_enable (struct mlx5e_priv * priv )
1196
1203
{
1197
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1198
-
1199
1204
mlx5e_set_netdev_mtu_boundaries (priv );
1200
- mlx5e_rep_neigh_init (rpriv );
1201
1205
}
1202
1206
1203
1207
static void mlx5e_rep_disable (struct mlx5e_priv * priv )
1204
1208
{
1205
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1206
-
1207
- mlx5e_rep_neigh_cleanup (rpriv );
1208
1209
}
1209
1210
1210
1211
static int mlx5e_update_rep_rx (struct mlx5e_priv * priv )
@@ -1254,7 +1255,6 @@ static int uplink_rep_async_event(struct notifier_block *nb, unsigned long event
1254
1255
1255
1256
static void mlx5e_uplink_rep_enable (struct mlx5e_priv * priv )
1256
1257
{
1257
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1258
1258
struct net_device * netdev = priv -> netdev ;
1259
1259
struct mlx5_core_dev * mdev = priv -> mdev ;
1260
1260
u16 max_mtu ;
@@ -1276,7 +1276,6 @@ static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv)
1276
1276
mlx5_notifier_register (mdev , & priv -> events_nb );
1277
1277
mlx5e_dcbnl_initialize (priv );
1278
1278
mlx5e_dcbnl_init_app (priv );
1279
- mlx5e_rep_neigh_init (rpriv );
1280
1279
mlx5e_rep_bridge_init (priv );
1281
1280
1282
1281
netdev -> wanted_features |= NETIF_F_HW_TC ;
@@ -1291,7 +1290,6 @@ static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv)
1291
1290
1292
1291
static void mlx5e_uplink_rep_disable (struct mlx5e_priv * priv )
1293
1292
{
1294
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1295
1293
struct mlx5_core_dev * mdev = priv -> mdev ;
1296
1294
1297
1295
rtnl_lock ();
@@ -1301,7 +1299,6 @@ static void mlx5e_uplink_rep_disable(struct mlx5e_priv *priv)
1301
1299
rtnl_unlock ();
1302
1300
1303
1301
mlx5e_rep_bridge_cleanup (priv );
1304
- mlx5e_rep_neigh_cleanup (rpriv );
1305
1302
mlx5e_dcbnl_delete_app (priv );
1306
1303
mlx5_notifier_unregister (mdev , & priv -> events_nb );
1307
1304
mlx5e_rep_tc_disable (priv );
0 commit comments