Lines Matching refs:opt_inst
131 static void __team_option_inst_del(struct team_option_inst *opt_inst) in __team_option_inst_del() argument
133 list_del(&opt_inst->list); in __team_option_inst_del()
134 kfree(opt_inst); in __team_option_inst_del()
140 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_option() local
142 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_option()
143 if (opt_inst->option == option) in __team_option_inst_del_option()
144 __team_option_inst_del(opt_inst); in __team_option_inst_del_option()
151 struct team_option_inst *opt_inst; in __team_option_inst_add() local
160 opt_inst = kmalloc_obj(*opt_inst); in __team_option_inst_add()
161 if (!opt_inst) in __team_option_inst_add()
163 opt_inst->option = option; in __team_option_inst_add()
164 opt_inst->info.port = port; in __team_option_inst_add()
165 opt_inst->info.array_index = i; in __team_option_inst_add()
166 opt_inst->changed = true; in __team_option_inst_add()
167 opt_inst->removed = false; in __team_option_inst_add()
168 list_add_tail(&opt_inst->list, &team->option_inst_list); in __team_option_inst_add()
170 option->init(team, &opt_inst->info); in __team_option_inst_add()
196 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_option() local
198 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_option()
199 if (opt_inst->option == option) { in __team_option_inst_mark_removed_option()
200 opt_inst->changed = true; in __team_option_inst_mark_removed_option()
201 opt_inst->removed = true; in __team_option_inst_mark_removed_option()
209 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_port() local
211 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_port()
212 if (opt_inst->option->per_port && in __team_option_inst_del_port()
213 opt_inst->info.port == port) in __team_option_inst_del_port()
214 __team_option_inst_del(opt_inst); in __team_option_inst_del_port()
241 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_port() local
243 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_port()
244 if (opt_inst->info.port == port) { in __team_option_inst_mark_removed_port()
245 opt_inst->changed = true; in __team_option_inst_mark_removed_port()
246 opt_inst->removed = true; in __team_option_inst_mark_removed_port()
359 struct team_option_inst *opt_inst, in team_option_get() argument
362 if (!opt_inst->option->getter) in team_option_get()
365 opt_inst->option->getter(team, ctx); in team_option_get()
370 struct team_option_inst *opt_inst, in team_option_set() argument
373 if (!opt_inst->option->setter) in team_option_set()
375 return opt_inst->option->setter(team, ctx); in team_option_set()
380 struct team_option_inst *opt_inst; in team_option_inst_set_change() local
382 opt_inst = container_of(opt_inst_info, struct team_option_inst, info); in team_option_inst_set_change()
383 opt_inst->changed = true; in team_option_inst_set_change()
2334 struct team_option_inst *opt_inst) in team_nl_fill_one_option_get() argument
2337 struct team_option *option = opt_inst->option; in team_nl_fill_one_option_get()
2338 struct team_option_inst_info *opt_inst_info = &opt_inst->info; in team_nl_fill_one_option_get()
2343 err = team_option_get(team, opt_inst, &ctx); in team_nl_fill_one_option_get()
2357 if (opt_inst->option->array_size && in team_nl_fill_one_option_get()
2399 if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED)) in team_nl_fill_one_option_get()
2401 if (opt_inst->changed) { in team_nl_fill_one_option_get()
2404 opt_inst->changed = false; in team_nl_fill_one_option_get()
2438 struct team_option_inst *opt_inst; in team_nl_send_options_get() local
2444 opt_inst = list_first_entry(sel_opt_inst_list, in team_nl_send_options_get()
2467 list_for_each_entry_from(opt_inst, sel_opt_inst_list, tmp_list) { in team_nl_send_options_get()
2468 err = team_nl_fill_one_option_get(skb, team, opt_inst); in team_nl_send_options_get()
2507 struct team_option_inst *opt_inst; in team_nl_options_get_doit() local
2519 list_for_each_entry(opt_inst, &team->option_inst_list, list) in team_nl_options_get_doit()
2520 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in team_nl_options_get_doit()
2566 struct team_option_inst *opt_inst; in team_nl_options_set_doit() local
2623 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in team_nl_options_set_doit()
2624 struct team_option *option = opt_inst->option; in team_nl_options_set_doit()
2629 opt_inst_info = &opt_inst->info; in team_nl_options_set_doit()
2666 err = team_option_set(team, opt_inst, &ctx); in team_nl_options_set_doit()
2669 opt_inst->changed = true; in team_nl_options_set_doit()
2670 list_add(&opt_inst->tmp_list, &opt_inst_list); in team_nl_options_set_doit()
2884 struct team_option_inst *opt_inst; in __team_options_change_check() local
2887 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_options_change_check()
2888 if (opt_inst->changed) in __team_options_change_check()
2889 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in __team_options_change_check()