提交 0f1aad2b 编写于 作者: J Jiri Pirko 提交者: David S. Miller

team: allow async option changes

This patch adds two exported functions. One allows to mark option
instance as changed and the second processes change check and does
transfer of changed options to userspace.
Signed-off-by: NJiri Pirko <jpirko@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 85d59a87
...@@ -82,6 +82,7 @@ static void team_refresh_port_linkup(struct team_port *port) ...@@ -82,6 +82,7 @@ static void team_refresh_port_linkup(struct team_port *port)
port->state.linkup; port->state.linkup;
} }
/******************* /*******************
* Options handling * Options handling
*******************/ *******************/
...@@ -387,6 +388,22 @@ static int team_option_set(struct team *team, ...@@ -387,6 +388,22 @@ static int team_option_set(struct team *team,
return err; return err;
} }
void team_option_inst_set_change(struct team_option_inst_info *opt_inst_info)
{
struct team_option_inst *opt_inst;
opt_inst = container_of(opt_inst_info, struct team_option_inst, info);
opt_inst->changed = true;
}
EXPORT_SYMBOL(team_option_inst_set_change);
void team_options_change_check(struct team *team)
{
__team_options_change_check(team);
}
EXPORT_SYMBOL(team_options_change_check);
/**************** /****************
* Mode handling * Mode handling
****************/ ****************/
...@@ -2051,6 +2068,7 @@ static void team_port_change_check(struct team_port *port, bool linkup) ...@@ -2051,6 +2068,7 @@ static void team_port_change_check(struct team_port *port, bool linkup)
mutex_unlock(&team->lock); mutex_unlock(&team->lock);
} }
/************************************ /************************************
* Net device notifier event handler * Net device notifier event handler
************************************/ ************************************/
......
...@@ -112,6 +112,9 @@ struct team_option { ...@@ -112,6 +112,9 @@ struct team_option {
int (*setter)(struct team *team, struct team_gsetter_ctx *ctx); int (*setter)(struct team *team, struct team_gsetter_ctx *ctx);
}; };
extern void team_option_inst_set_change(struct team_option_inst_info *opt_inst_info);
extern void team_options_change_check(struct team *team);
struct team_mode { struct team_mode {
const char *kind; const char *kind;
struct module *owner; struct module *owner;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册