Lines Matching refs:opt_inst

128 static void __team_option_inst_del(struct team_option_inst *opt_inst)  in __team_option_inst_del()  argument
130 list_del(&opt_inst->list); in __team_option_inst_del()
131 kfree(opt_inst); in __team_option_inst_del()
137 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_option() local
139 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_option()
140 if (opt_inst->option == option) in __team_option_inst_del_option()
141 __team_option_inst_del(opt_inst); in __team_option_inst_del_option()
148 struct team_option_inst *opt_inst; in __team_option_inst_add() local
158 opt_inst = kmalloc(sizeof(*opt_inst), GFP_KERNEL); in __team_option_inst_add()
159 if (!opt_inst) in __team_option_inst_add()
161 opt_inst->option = option; in __team_option_inst_add()
162 opt_inst->info.port = port; in __team_option_inst_add()
163 opt_inst->info.array_index = i; in __team_option_inst_add()
164 opt_inst->changed = true; in __team_option_inst_add()
165 opt_inst->removed = false; in __team_option_inst_add()
166 list_add_tail(&opt_inst->list, &team->option_inst_list); in __team_option_inst_add()
168 err = option->init(team, &opt_inst->info); in __team_option_inst_add()
197 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_option() local
199 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_option()
200 if (opt_inst->option == option) { in __team_option_inst_mark_removed_option()
201 opt_inst->changed = true; in __team_option_inst_mark_removed_option()
202 opt_inst->removed = true; in __team_option_inst_mark_removed_option()
210 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_port() local
212 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_port()
213 if (opt_inst->option->per_port && in __team_option_inst_del_port()
214 opt_inst->info.port == port) in __team_option_inst_del_port()
215 __team_option_inst_del(opt_inst); in __team_option_inst_del_port()
242 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_port() local
244 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_port()
245 if (opt_inst->info.port == port) { in __team_option_inst_mark_removed_port()
246 opt_inst->changed = true; in __team_option_inst_mark_removed_port()
247 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()
364 return opt_inst->option->getter(team, ctx); in team_option_get()
368 struct team_option_inst *opt_inst, in team_option_set() argument
371 if (!opt_inst->option->setter) in team_option_set()
373 return opt_inst->option->setter(team, ctx); in team_option_set()
378 struct team_option_inst *opt_inst; in team_option_inst_set_change() local
380 opt_inst = container_of(opt_inst_info, struct team_option_inst, info); in team_option_inst_set_change()
381 opt_inst->changed = true; in team_option_inst_set_change()
2311 struct team_option_inst *opt_inst) in team_nl_fill_one_option_get() argument
2314 struct team_option *option = opt_inst->option; in team_nl_fill_one_option_get()
2315 struct team_option_inst_info *opt_inst_info = &opt_inst->info; in team_nl_fill_one_option_get()
2320 err = team_option_get(team, opt_inst, &ctx); in team_nl_fill_one_option_get()
2334 if (opt_inst->option->array_size && in team_nl_fill_one_option_get()
2376 if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED)) in team_nl_fill_one_option_get()
2378 if (opt_inst->changed) { in team_nl_fill_one_option_get()
2381 opt_inst->changed = false; in team_nl_fill_one_option_get()
2415 struct team_option_inst *opt_inst; in team_nl_send_options_get() local
2421 opt_inst = list_first_entry(sel_opt_inst_list, in team_nl_send_options_get()
2444 list_for_each_entry_from(opt_inst, sel_opt_inst_list, tmp_list) { in team_nl_send_options_get()
2445 err = team_nl_fill_one_option_get(skb, team, opt_inst); in team_nl_send_options_get()
2484 struct team_option_inst *opt_inst; in team_nl_cmd_options_get() local
2492 list_for_each_entry(opt_inst, &team->option_inst_list, list) in team_nl_cmd_options_get()
2493 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in team_nl_cmd_options_get()
2536 struct team_option_inst *opt_inst; in team_nl_cmd_options_set() local
2593 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in team_nl_cmd_options_set()
2594 struct team_option *option = opt_inst->option; in team_nl_cmd_options_set()
2599 opt_inst_info = &opt_inst->info; in team_nl_cmd_options_set()
2634 err = team_option_set(team, opt_inst, &ctx); in team_nl_cmd_options_set()
2637 opt_inst->changed = true; in team_nl_cmd_options_set()
2638 list_add(&opt_inst->tmp_list, &opt_inst_list); in team_nl_cmd_options_set()
2870 struct team_option_inst *opt_inst; in __team_options_change_check() local
2873 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_options_change_check()
2874 if (opt_inst->changed) in __team_options_change_check()
2875 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in __team_options_change_check()