diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-02-01 08:17:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 14:55:45 -0500 |
commit | 675b8044e17cc6528363e8b0322be0243621cd9b (patch) | |
tree | 4389c6c8835eabb477f34e1035136a9fd6757091 /drivers/net | |
parent | c3969d80a396bffd7f80ff57987b15793be67926 (diff) | |
download | linux-675b8044e17cc6528363e8b0322be0243621cd9b.tar.bz2 |
team: ab: set active port option as changed when port is leaving
In case port is leaving the team, set the option "activeport" as changed
so the change can be properly propagated to userspace
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/team/team_mode_activebackup.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/team/team_mode_activebackup.c b/drivers/net/team/team_mode_activebackup.c index 6262b4defd93..40fd3381b693 100644 --- a/drivers/net/team/team_mode_activebackup.c +++ b/drivers/net/team/team_mode_activebackup.c @@ -19,6 +19,7 @@ struct ab_priv { struct team_port __rcu *active_port; + struct team_option_inst_info *ap_opt_inst_info; }; static struct ab_priv *ab_priv(struct team *team) @@ -54,8 +55,17 @@ drop: static void ab_port_leave(struct team *team, struct team_port *port) { - if (ab_priv(team)->active_port == port) + if (ab_priv(team)->active_port == port) { RCU_INIT_POINTER(ab_priv(team)->active_port, NULL); + team_option_inst_set_change(ab_priv(team)->ap_opt_inst_info); + } +} + +static int ab_active_port_init(struct team *team, + struct team_option_inst_info *info) +{ + ab_priv(team)->ap_opt_inst_info = info; + return 0; } static int ab_active_port_get(struct team *team, struct team_gsetter_ctx *ctx) @@ -88,6 +98,7 @@ static const struct team_option ab_options[] = { { .name = "activeport", .type = TEAM_OPTION_TYPE_U32, + .init = ab_active_port_init, .getter = ab_active_port_get, .setter = ab_active_port_set, }, |