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()
361 struct team_option_inst *opt_inst, in team_option_get() argument
364 if (!opt_inst->option->getter) in team_option_get()
366 return 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()
2356 struct team_option_inst *opt_inst) in team_nl_fill_one_option_get() argument
2359 struct team_option *option = opt_inst->option; in team_nl_fill_one_option_get()
2360 struct team_option_inst_info *opt_inst_info = &opt_inst->info; in team_nl_fill_one_option_get()
2365 err = team_option_get(team, opt_inst, &ctx); in team_nl_fill_one_option_get()
2379 if (opt_inst->option->array_size && in team_nl_fill_one_option_get()
2421 if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED)) in team_nl_fill_one_option_get()
2423 if (opt_inst->changed) { in team_nl_fill_one_option_get()
2426 opt_inst->changed = false; in team_nl_fill_one_option_get()
2460 struct team_option_inst *opt_inst; in team_nl_send_options_get() local
2466 opt_inst = list_first_entry(sel_opt_inst_list, in team_nl_send_options_get()
2489 list_for_each_entry_from(opt_inst, sel_opt_inst_list, tmp_list) { in team_nl_send_options_get()
2490 err = team_nl_fill_one_option_get(skb, team, opt_inst); in team_nl_send_options_get()
2529 struct team_option_inst *opt_inst; in team_nl_cmd_options_get() local
2537 list_for_each_entry(opt_inst, &team->option_inst_list, list) in team_nl_cmd_options_get()
2538 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in team_nl_cmd_options_get()
2581 struct team_option_inst *opt_inst; in team_nl_cmd_options_set() local
2638 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in team_nl_cmd_options_set()
2639 struct team_option *option = opt_inst->option; in team_nl_cmd_options_set()
2644 opt_inst_info = &opt_inst->info; in team_nl_cmd_options_set()
2679 err = team_option_set(team, opt_inst, &ctx); in team_nl_cmd_options_set()
2682 opt_inst->changed = true; in team_nl_cmd_options_set()
2683 list_add(&opt_inst->tmp_list, &opt_inst_list); in team_nl_cmd_options_set()
2915 struct team_option_inst *opt_inst; in __team_options_change_check() local
2918 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_options_change_check()
2919 if (opt_inst->changed) in __team_options_change_check()
2920 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in __team_options_change_check()