@@ -1040,6 +1040,10 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv)
1040
1040
return err ;
1041
1041
}
1042
1042
1043
+ err = mlx5e_rep_neigh_init (rpriv );
1044
+ if (err )
1045
+ goto err_neigh_init ;
1046
+
1043
1047
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK ) {
1044
1048
err = mlx5e_init_uplink_rep_tx (rpriv );
1045
1049
if (err )
@@ -1056,6 +1060,8 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv)
1056
1060
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK )
1057
1061
mlx5e_cleanup_uplink_rep_tx (rpriv );
1058
1062
err_init_tx :
1063
+ mlx5e_rep_neigh_cleanup (rpriv );
1064
+ err_neigh_init :
1059
1065
mlx5e_destroy_tises (priv );
1060
1066
return err ;
1061
1067
}
@@ -1069,22 +1075,17 @@ static void mlx5e_cleanup_rep_tx(struct mlx5e_priv *priv)
1069
1075
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK )
1070
1076
mlx5e_cleanup_uplink_rep_tx (rpriv );
1071
1077
1078
+ mlx5e_rep_neigh_cleanup (rpriv );
1072
1079
mlx5e_destroy_tises (priv );
1073
1080
}
1074
1081
1075
1082
static void mlx5e_rep_enable (struct mlx5e_priv * priv )
1076
1083
{
1077
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1078
-
1079
1084
mlx5e_set_netdev_mtu_boundaries (priv );
1080
- mlx5e_rep_neigh_init (rpriv );
1081
1085
}
1082
1086
1083
1087
static void mlx5e_rep_disable (struct mlx5e_priv * priv )
1084
1088
{
1085
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1086
-
1087
- mlx5e_rep_neigh_cleanup (rpriv );
1088
1089
}
1089
1090
1090
1091
static int mlx5e_update_rep_rx (struct mlx5e_priv * priv )
@@ -1119,7 +1120,6 @@ static int uplink_rep_async_event(struct notifier_block *nb, unsigned long event
1119
1120
1120
1121
static void mlx5e_uplink_rep_enable (struct mlx5e_priv * priv )
1121
1122
{
1122
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1123
1123
struct net_device * netdev = priv -> netdev ;
1124
1124
struct mlx5_core_dev * mdev = priv -> mdev ;
1125
1125
u16 max_mtu ;
@@ -1139,7 +1139,6 @@ static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv)
1139
1139
mlx5_notifier_register (mdev , & priv -> events_nb );
1140
1140
mlx5e_dcbnl_initialize (priv );
1141
1141
mlx5e_dcbnl_init_app (priv );
1142
- mlx5e_rep_neigh_init (rpriv );
1143
1142
mlx5e_rep_bridge_init (priv );
1144
1143
1145
1144
netdev -> wanted_features |= NETIF_F_HW_TC ;
@@ -1154,7 +1153,6 @@ static void mlx5e_uplink_rep_enable(struct mlx5e_priv *priv)
1154
1153
1155
1154
static void mlx5e_uplink_rep_disable (struct mlx5e_priv * priv )
1156
1155
{
1157
- struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
1158
1156
struct mlx5_core_dev * mdev = priv -> mdev ;
1159
1157
1160
1158
rtnl_lock ();
@@ -1164,7 +1162,6 @@ static void mlx5e_uplink_rep_disable(struct mlx5e_priv *priv)
1164
1162
rtnl_unlock ();
1165
1163
1166
1164
mlx5e_rep_bridge_cleanup (priv );
1167
- mlx5e_rep_neigh_cleanup (rpriv );
1168
1165
mlx5e_dcbnl_delete_app (priv );
1169
1166
mlx5_notifier_unregister (mdev , & priv -> events_nb );
1170
1167
mlx5e_rep_tc_disable (priv );
0 commit comments