Lines Matching refs:opt_inst
129 static void __team_option_inst_del(struct team_option_inst *opt_inst) in __team_option_inst_del() argument
131 list_del(&opt_inst->list); in __team_option_inst_del()
132 kfree(opt_inst); in __team_option_inst_del()
138 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_option() local
140 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_option()
141 if (opt_inst->option == option) in __team_option_inst_del_option()
142 __team_option_inst_del(opt_inst); in __team_option_inst_del_option()
149 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 option->init(team, &opt_inst->info); in __team_option_inst_add()
194 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_option() local
196 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_option()
197 if (opt_inst->option == option) { in __team_option_inst_mark_removed_option()
198 opt_inst->changed = true; in __team_option_inst_mark_removed_option()
199 opt_inst->removed = true; in __team_option_inst_mark_removed_option()
207 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_port() local
209 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_port()
210 if (opt_inst->option->per_port && in __team_option_inst_del_port()
211 opt_inst->info.port == port) in __team_option_inst_del_port()
212 __team_option_inst_del(opt_inst); in __team_option_inst_del_port()
239 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_port() local
241 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_port()
242 if (opt_inst->info.port == port) { in __team_option_inst_mark_removed_port()
243 opt_inst->changed = true; in __team_option_inst_mark_removed_port()
244 opt_inst->removed = true; in __team_option_inst_mark_removed_port()
356 struct team_option_inst *opt_inst, in team_option_get() argument
359 if (!opt_inst->option->getter) in team_option_get()
362 opt_inst->option->getter(team, ctx); in team_option_get()
367 struct team_option_inst *opt_inst, in team_option_set() argument
370 if (!opt_inst->option->setter) in team_option_set()
372 return opt_inst->option->setter(team, ctx); in team_option_set()
377 struct team_option_inst *opt_inst; in team_option_inst_set_change() local
379 opt_inst = container_of(opt_inst_info, struct team_option_inst, info); in team_option_inst_set_change()
380 opt_inst->changed = true; in team_option_inst_set_change()
2346 struct team_option_inst *opt_inst) in team_nl_fill_one_option_get() argument
2349 struct team_option *option = opt_inst->option; in team_nl_fill_one_option_get()
2350 struct team_option_inst_info *opt_inst_info = &opt_inst->info; in team_nl_fill_one_option_get()
2355 err = team_option_get(team, opt_inst, &ctx); in team_nl_fill_one_option_get()
2369 if (opt_inst->option->array_size && in team_nl_fill_one_option_get()
2411 if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED)) in team_nl_fill_one_option_get()
2413 if (opt_inst->changed) { in team_nl_fill_one_option_get()
2416 opt_inst->changed = false; in team_nl_fill_one_option_get()
2450 struct team_option_inst *opt_inst; in team_nl_send_options_get() local
2456 opt_inst = list_first_entry(sel_opt_inst_list, in team_nl_send_options_get()
2479 list_for_each_entry_from(opt_inst, sel_opt_inst_list, tmp_list) { in team_nl_send_options_get()
2480 err = team_nl_fill_one_option_get(skb, team, opt_inst); in team_nl_send_options_get()
2519 struct team_option_inst *opt_inst; in team_nl_cmd_options_get() local
2527 list_for_each_entry(opt_inst, &team->option_inst_list, list) in team_nl_cmd_options_get()
2528 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in team_nl_cmd_options_get()
2571 struct team_option_inst *opt_inst; in team_nl_cmd_options_set() local
2628 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in team_nl_cmd_options_set()
2629 struct team_option *option = opt_inst->option; in team_nl_cmd_options_set()
2634 opt_inst_info = &opt_inst->info; in team_nl_cmd_options_set()
2669 err = team_option_set(team, opt_inst, &ctx); in team_nl_cmd_options_set()
2672 opt_inst->changed = true; in team_nl_cmd_options_set()
2673 list_add(&opt_inst->tmp_list, &opt_inst_list); in team_nl_cmd_options_set()
2906 struct team_option_inst *opt_inst; in __team_options_change_check() local
2909 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_options_change_check()
2910 if (opt_inst->changed) in __team_options_change_check()
2911 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in __team_options_change_check()