Lines Matching refs:option
111 struct team_option *option; member
120 struct team_option *option; in __team_find_option() local
122 list_for_each_entry(option, &team->option_list, list) { in __team_find_option()
123 if (strcmp(option->name, opt_name) == 0) in __team_find_option()
124 return option; in __team_find_option()
136 struct team_option *option) in __team_option_inst_del_option() argument
141 if (opt_inst->option == option) in __team_option_inst_del_option()
146 static int __team_option_inst_add(struct team *team, struct team_option *option, in __team_option_inst_add() argument
154 array_size = option->array_size; in __team_option_inst_add()
162 opt_inst->option = option; in __team_option_inst_add()
168 if (option->init) { in __team_option_inst_add()
169 err = option->init(team, &opt_inst->info); in __team_option_inst_add()
179 struct team_option *option) in __team_option_inst_add_option() argument
183 if (!option->per_port) { in __team_option_inst_add_option()
184 err = __team_option_inst_add(team, option, NULL); in __team_option_inst_add_option()
191 __team_option_inst_del_option(team, option); in __team_option_inst_add_option()
196 struct team_option *option) in __team_option_inst_mark_removed_option() argument
201 if (opt_inst->option == option) { in __team_option_inst_mark_removed_option()
214 if (opt_inst->option->per_port && in __team_option_inst_del_port()
223 struct team_option *option; in __team_option_inst_add_port() local
226 list_for_each_entry(option, &team->option_list, list) { in __team_option_inst_add_port()
227 if (!option->per_port) in __team_option_inst_add_port()
229 err = __team_option_inst_add(team, option, port); in __team_option_inst_add_port()
254 const struct team_option *option, in __team_options_register() argument
265 for (i = 0; i < option_count; i++, option++) { in __team_options_register()
266 if (__team_find_option(team, option->name)) { in __team_options_register()
270 dst_opts[i] = kmemdup(option, sizeof(*option), GFP_KERNEL); in __team_options_register()
303 const struct team_option *option, in __team_options_mark_removed() argument
308 for (i = 0; i < option_count; i++, option++) { in __team_options_mark_removed()
311 del_opt = __team_find_option(team, option->name); in __team_options_mark_removed()
318 const struct team_option *option, in __team_options_unregister() argument
323 for (i = 0; i < option_count; i++, option++) { in __team_options_unregister()
326 del_opt = __team_find_option(team, option->name); in __team_options_unregister()
338 const struct team_option *option, in team_options_register() argument
343 err = __team_options_register(team, option, option_count); in team_options_register()
352 const struct team_option *option, in team_options_unregister() argument
355 __team_options_mark_removed(team, option, option_count); in team_options_unregister()
357 __team_options_unregister(team, option, option_count); in team_options_unregister()
365 if (!opt_inst->option->getter) in team_option_get()
367 return opt_inst->option->getter(team, ctx); in team_option_get()
374 if (!opt_inst->option->setter) in team_option_set()
376 return opt_inst->option->setter(team, ctx); in team_option_set()
2359 struct team_option *option = opt_inst->option; in team_nl_fill_one_option_get() local
2373 if (nla_put_string(skb, TEAM_ATTR_OPTION_NAME, option->name)) in team_nl_fill_one_option_get()
2379 if (opt_inst->option->array_size && in team_nl_fill_one_option_get()
2384 switch (option->type) { in team_nl_fill_one_option_get()
2639 struct team_option *option = opt_inst->option; in team_nl_cmd_options_set() local
2647 if (option->type != opt_type || in team_nl_cmd_options_set()
2648 strcmp(option->name, opt_name) || in team_nl_cmd_options_set()
2650 (option->array_size && !opt_is_array) || in team_nl_cmd_options_set()