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
159 opt_inst = kmalloc(sizeof(*opt_inst), GFP_KERNEL); in __team_option_inst_add()
160 if (!opt_inst) in __team_option_inst_add()
162 opt_inst->option = option; in __team_option_inst_add()
163 opt_inst->info.port = port; in __team_option_inst_add()
164 opt_inst->info.array_index = i; in __team_option_inst_add()
165 opt_inst->changed = true; in __team_option_inst_add()
166 opt_inst->removed = false; in __team_option_inst_add()
167 list_add_tail(&opt_inst->list, &team->option_inst_list); in __team_option_inst_add()
169 err = option->init(team, &opt_inst->info); in __team_option_inst_add()
198 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_option() local
200 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_option()
201 if (opt_inst->option == option) { in __team_option_inst_mark_removed_option()
202 opt_inst->changed = true; in __team_option_inst_mark_removed_option()
203 opt_inst->removed = true; in __team_option_inst_mark_removed_option()
211 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_port() local
213 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_port()
214 if (opt_inst->option->per_port && in __team_option_inst_del_port()
215 opt_inst->info.port == port) in __team_option_inst_del_port()
216 __team_option_inst_del(opt_inst); in __team_option_inst_del_port()
243 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_port() local
245 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_port()
246 if (opt_inst->info.port == port) { in __team_option_inst_mark_removed_port()
247 opt_inst->changed = true; in __team_option_inst_mark_removed_port()
248 opt_inst->removed = true; in __team_option_inst_mark_removed_port()
360 struct team_option_inst *opt_inst, in team_option_get() argument
363 if (!opt_inst->option->getter) in team_option_get()
365 return opt_inst->option->getter(team, ctx); in team_option_get()
369 struct team_option_inst *opt_inst, in team_option_set() argument
372 if (!opt_inst->option->setter) in team_option_set()
374 return opt_inst->option->setter(team, ctx); in team_option_set()
379 struct team_option_inst *opt_inst; in team_option_inst_set_change() local
381 opt_inst = container_of(opt_inst_info, struct team_option_inst, info); in team_option_inst_set_change()
382 opt_inst->changed = true; in team_option_inst_set_change()
2339 struct team_option_inst *opt_inst) in team_nl_fill_one_option_get() argument
2342 struct team_option *option = opt_inst->option; in team_nl_fill_one_option_get()
2343 struct team_option_inst_info *opt_inst_info = &opt_inst->info; in team_nl_fill_one_option_get()
2348 err = team_option_get(team, opt_inst, &ctx); in team_nl_fill_one_option_get()
2362 if (opt_inst->option->array_size && in team_nl_fill_one_option_get()
2404 if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED)) in team_nl_fill_one_option_get()
2406 if (opt_inst->changed) { in team_nl_fill_one_option_get()
2409 opt_inst->changed = false; in team_nl_fill_one_option_get()
2443 struct team_option_inst *opt_inst; in team_nl_send_options_get() local
2449 opt_inst = list_first_entry(sel_opt_inst_list, in team_nl_send_options_get()
2472 list_for_each_entry_from(opt_inst, sel_opt_inst_list, tmp_list) { in team_nl_send_options_get()
2473 err = team_nl_fill_one_option_get(skb, team, opt_inst); in team_nl_send_options_get()
2512 struct team_option_inst *opt_inst; in team_nl_cmd_options_get() local
2520 list_for_each_entry(opt_inst, &team->option_inst_list, list) in team_nl_cmd_options_get()
2521 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in team_nl_cmd_options_get()
2564 struct team_option_inst *opt_inst; in team_nl_cmd_options_set() local
2621 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in team_nl_cmd_options_set()
2622 struct team_option *option = opt_inst->option; in team_nl_cmd_options_set()
2627 opt_inst_info = &opt_inst->info; in team_nl_cmd_options_set()
2662 err = team_option_set(team, opt_inst, &ctx); in team_nl_cmd_options_set()
2665 opt_inst->changed = true; in team_nl_cmd_options_set()
2666 list_add(&opt_inst->tmp_list, &opt_inst_list); in team_nl_cmd_options_set()
2899 struct team_option_inst *opt_inst; in __team_options_change_check() local
2902 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_options_change_check()
2903 if (opt_inst->changed) in __team_options_change_check()
2904 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in __team_options_change_check()