@@ -950,6 +950,13 @@ static int mlx5e_init_uplink_rep_tx(struct mlx5e_rep_priv *rpriv)
950
950
return err ;
951
951
}
952
952
953
+ static void mlx5e_cleanup_uplink_rep_tx (struct mlx5e_rep_priv * rpriv )
954
+ {
955
+ mlx5e_rep_tc_netdevice_event_unregister (rpriv );
956
+ mlx5e_rep_bond_cleanup (rpriv );
957
+ mlx5e_rep_tc_cleanup (rpriv );
958
+ }
959
+
953
960
static int mlx5e_init_rep_tx (struct mlx5e_priv * priv )
954
961
{
955
962
struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
@@ -961,42 +968,36 @@ static int mlx5e_init_rep_tx(struct mlx5e_priv *priv)
961
968
return err ;
962
969
}
963
970
964
- err = mlx5e_tc_ht_init (& rpriv -> tc_ht );
965
- if (err )
966
- goto err_ht_init ;
967
-
968
971
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK ) {
969
972
err = mlx5e_init_uplink_rep_tx (rpriv );
970
973
if (err )
971
974
goto err_init_tx ;
972
975
}
973
976
977
+ err = mlx5e_tc_ht_init (& rpriv -> tc_ht );
978
+ if (err )
979
+ goto err_ht_init ;
980
+
974
981
return 0 ;
975
982
976
- err_init_tx :
977
- mlx5e_tc_ht_cleanup (& rpriv -> tc_ht );
978
983
err_ht_init :
984
+ if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK )
985
+ mlx5e_cleanup_uplink_rep_tx (rpriv );
986
+ err_init_tx :
979
987
mlx5e_destroy_tises (priv );
980
988
return err ;
981
989
}
982
990
983
- static void mlx5e_cleanup_uplink_rep_tx (struct mlx5e_rep_priv * rpriv )
984
- {
985
- mlx5e_rep_tc_netdevice_event_unregister (rpriv );
986
- mlx5e_rep_bond_cleanup (rpriv );
987
- mlx5e_rep_tc_cleanup (rpriv );
988
- }
989
-
990
991
static void mlx5e_cleanup_rep_tx (struct mlx5e_priv * priv )
991
992
{
992
993
struct mlx5e_rep_priv * rpriv = priv -> ppriv ;
993
994
994
- mlx5e_destroy_tises ( priv );
995
+ mlx5e_tc_ht_cleanup ( & rpriv -> tc_ht );
995
996
996
997
if (rpriv -> rep -> vport == MLX5_VPORT_UPLINK )
997
998
mlx5e_cleanup_uplink_rep_tx (rpriv );
998
999
999
- mlx5e_tc_ht_cleanup ( & rpriv -> tc_ht );
1000
+ mlx5e_destroy_tises ( priv );
1000
1001
}
1001
1002
1002
1003
static void mlx5e_rep_enable (struct mlx5e_priv * priv )
0 commit comments