File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -714,6 +714,8 @@ static void team_port_enable(struct team *team,
714
714
port -> index = team -> en_port_count ++ ;
715
715
hlist_add_head_rcu (& port -> hlist ,
716
716
team_port_index_hash (team , port -> index ));
717
+ if (team -> ops .port_enabled )
718
+ team -> ops .port_enabled (team , port );
717
719
}
718
720
719
721
static void __reconstruct_port_hlist (struct team * team , int rm_index )
@@ -737,6 +739,8 @@ static void team_port_disable(struct team *team,
737
739
738
740
if (!team_port_enabled (port ))
739
741
return ;
742
+ if (team -> ops .port_disabled )
743
+ team -> ops .port_disabled (team , port );
740
744
hlist_del_rcu (& port -> hlist );
741
745
__reconstruct_port_hlist (team , rm_index );
742
746
team -> en_port_count -- ;
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ struct team_mode_ops {
74
74
int (* port_enter )(struct team * team , struct team_port * port );
75
75
void (* port_leave )(struct team * team , struct team_port * port );
76
76
void (* port_change_mac )(struct team * team , struct team_port * port );
77
+ void (* port_enabled )(struct team * team , struct team_port * port );
78
+ void (* port_disabled )(struct team * team , struct team_port * port );
77
79
};
78
80
79
81
enum team_option_type {
You can’t perform that action at this time.
0 commit comments