Lines Matching refs:opt_inst
126 static void __team_option_inst_del(struct team_option_inst *opt_inst) in __team_option_inst_del() argument
128 list_del(&opt_inst->list); in __team_option_inst_del()
129 kfree(opt_inst); in __team_option_inst_del()
135 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_option() local
137 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_option()
138 if (opt_inst->option == option) in __team_option_inst_del_option()
139 __team_option_inst_del(opt_inst); in __team_option_inst_del_option()
146 struct team_option_inst *opt_inst; in __team_option_inst_add() local
156 opt_inst = kmalloc(sizeof(*opt_inst), GFP_KERNEL); in __team_option_inst_add()
157 if (!opt_inst) in __team_option_inst_add()
159 opt_inst->option = option; in __team_option_inst_add()
160 opt_inst->info.port = port; in __team_option_inst_add()
161 opt_inst->info.array_index = i; in __team_option_inst_add()
162 opt_inst->changed = true; in __team_option_inst_add()
163 opt_inst->removed = false; in __team_option_inst_add()
164 list_add_tail(&opt_inst->list, &team->option_inst_list); in __team_option_inst_add()
166 err = option->init(team, &opt_inst->info); in __team_option_inst_add()
195 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_option() local
197 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_option()
198 if (opt_inst->option == option) { in __team_option_inst_mark_removed_option()
199 opt_inst->changed = true; in __team_option_inst_mark_removed_option()
200 opt_inst->removed = true; in __team_option_inst_mark_removed_option()
208 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_port() local
210 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_port()
211 if (opt_inst->option->per_port && in __team_option_inst_del_port()
212 opt_inst->info.port == port) in __team_option_inst_del_port()
213 __team_option_inst_del(opt_inst); in __team_option_inst_del_port()
240 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_port() local
242 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_port()
243 if (opt_inst->info.port == port) { in __team_option_inst_mark_removed_port()
244 opt_inst->changed = true; in __team_option_inst_mark_removed_port()
245 opt_inst->removed = true; in __team_option_inst_mark_removed_port()
357 struct team_option_inst *opt_inst, in team_option_get() argument
360 if (!opt_inst->option->getter) in team_option_get()
362 return opt_inst->option->getter(team, ctx); in team_option_get()
366 struct team_option_inst *opt_inst, in team_option_set() argument
369 if (!opt_inst->option->setter) in team_option_set()
371 return opt_inst->option->setter(team, ctx); in team_option_set()
376 struct team_option_inst *opt_inst; in team_option_inst_set_change() local
378 opt_inst = container_of(opt_inst_info, struct team_option_inst, info); in team_option_inst_set_change()
379 opt_inst->changed = true; in team_option_inst_set_change()
2226 struct team_option_inst *opt_inst) in team_nl_fill_one_option_get() argument
2229 struct team_option *option = opt_inst->option; in team_nl_fill_one_option_get()
2230 struct team_option_inst_info *opt_inst_info = &opt_inst->info; in team_nl_fill_one_option_get()
2235 err = team_option_get(team, opt_inst, &ctx); in team_nl_fill_one_option_get()
2249 if (opt_inst->option->array_size && in team_nl_fill_one_option_get()
2291 if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED)) in team_nl_fill_one_option_get()
2293 if (opt_inst->changed) { in team_nl_fill_one_option_get()
2296 opt_inst->changed = false; in team_nl_fill_one_option_get()
2330 struct team_option_inst *opt_inst; in team_nl_send_options_get() local
2336 opt_inst = list_first_entry(sel_opt_inst_list, in team_nl_send_options_get()
2357 list_for_each_entry_from(opt_inst, sel_opt_inst_list, tmp_list) { in team_nl_send_options_get()
2358 err = team_nl_fill_one_option_get(skb, team, opt_inst); in team_nl_send_options_get()
2398 struct team_option_inst *opt_inst; in team_nl_cmd_options_get() local
2406 list_for_each_entry(opt_inst, &team->option_inst_list, list) in team_nl_cmd_options_get()
2407 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in team_nl_cmd_options_get()
2446 struct team_option_inst *opt_inst; in team_nl_cmd_options_set() local
2500 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in team_nl_cmd_options_set()
2501 struct team_option *option = opt_inst->option; in team_nl_cmd_options_set()
2506 opt_inst_info = &opt_inst->info; in team_nl_cmd_options_set()
2541 err = team_option_set(team, opt_inst, &ctx); in team_nl_cmd_options_set()
2544 opt_inst->changed = true; in team_nl_cmd_options_set()
2545 list_add(&opt_inst->tmp_list, &opt_inst_list); in team_nl_cmd_options_set()
2761 struct team_option_inst *opt_inst; in __team_options_change_check() local
2764 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_options_change_check()
2765 if (opt_inst->changed) in __team_options_change_check()
2766 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in __team_options_change_check()