Lines Matching refs:opt_inst
135 static void __team_option_inst_del(struct team_option_inst *opt_inst) in __team_option_inst_del() argument
137 list_del(&opt_inst->list); in __team_option_inst_del()
138 kfree(opt_inst); in __team_option_inst_del()
144 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_option() local
146 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_option()
147 if (opt_inst->option == option) in __team_option_inst_del_option()
148 __team_option_inst_del(opt_inst); in __team_option_inst_del_option()
155 struct team_option_inst *opt_inst; in __team_option_inst_add() local
165 opt_inst = kmalloc(sizeof(*opt_inst), GFP_KERNEL); in __team_option_inst_add()
166 if (!opt_inst) in __team_option_inst_add()
168 opt_inst->option = option; in __team_option_inst_add()
169 opt_inst->info.port = port; in __team_option_inst_add()
170 opt_inst->info.array_index = i; in __team_option_inst_add()
171 opt_inst->changed = true; in __team_option_inst_add()
172 opt_inst->removed = false; in __team_option_inst_add()
173 list_add_tail(&opt_inst->list, &team->option_inst_list); in __team_option_inst_add()
175 err = option->init(team, &opt_inst->info); in __team_option_inst_add()
204 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_option() local
206 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_option()
207 if (opt_inst->option == option) { in __team_option_inst_mark_removed_option()
208 opt_inst->changed = true; in __team_option_inst_mark_removed_option()
209 opt_inst->removed = true; in __team_option_inst_mark_removed_option()
217 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_port() local
219 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_port()
220 if (opt_inst->option->per_port && in __team_option_inst_del_port()
221 opt_inst->info.port == port) in __team_option_inst_del_port()
222 __team_option_inst_del(opt_inst); in __team_option_inst_del_port()
249 struct team_option_inst *opt_inst; in __team_option_inst_mark_removed_port() local
251 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_option_inst_mark_removed_port()
252 if (opt_inst->info.port == port) { in __team_option_inst_mark_removed_port()
253 opt_inst->changed = true; in __team_option_inst_mark_removed_port()
254 opt_inst->removed = true; in __team_option_inst_mark_removed_port()
262 struct team_option_inst *opt_inst; in __team_option_inst_tmp_find() local
264 list_for_each_entry(opt_inst, opts, tmp_list) in __team_option_inst_tmp_find()
265 if (opt_inst == needle) in __team_option_inst_tmp_find()
377 struct team_option_inst *opt_inst, in team_option_get() argument
380 if (!opt_inst->option->getter) in team_option_get()
382 return opt_inst->option->getter(team, ctx); in team_option_get()
386 struct team_option_inst *opt_inst, in team_option_set() argument
389 if (!opt_inst->option->setter) in team_option_set()
391 return opt_inst->option->setter(team, ctx); in team_option_set()
396 struct team_option_inst *opt_inst; in team_option_inst_set_change() local
398 opt_inst = container_of(opt_inst_info, struct team_option_inst, info); in team_option_inst_set_change()
399 opt_inst->changed = true; in team_option_inst_set_change()
2267 struct team_option_inst *opt_inst) in team_nl_fill_one_option_get() argument
2270 struct team_option *option = opt_inst->option; in team_nl_fill_one_option_get()
2271 struct team_option_inst_info *opt_inst_info = &opt_inst->info; in team_nl_fill_one_option_get()
2276 err = team_option_get(team, opt_inst, &ctx); in team_nl_fill_one_option_get()
2290 if (opt_inst->option->array_size && in team_nl_fill_one_option_get()
2332 if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED)) in team_nl_fill_one_option_get()
2334 if (opt_inst->changed) { in team_nl_fill_one_option_get()
2337 opt_inst->changed = false; in team_nl_fill_one_option_get()
2371 struct team_option_inst *opt_inst; in team_nl_send_options_get() local
2377 opt_inst = list_first_entry(sel_opt_inst_list, in team_nl_send_options_get()
2400 list_for_each_entry_from(opt_inst, sel_opt_inst_list, tmp_list) { in team_nl_send_options_get()
2401 err = team_nl_fill_one_option_get(skb, team, opt_inst); in team_nl_send_options_get()
2440 struct team_option_inst *opt_inst; in team_nl_cmd_options_get() local
2448 list_for_each_entry(opt_inst, &team->option_inst_list, list) in team_nl_cmd_options_get()
2449 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in team_nl_cmd_options_get()
2492 struct team_option_inst *opt_inst; in team_nl_cmd_options_set() local
2547 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in team_nl_cmd_options_set()
2548 struct team_option *option = opt_inst->option; in team_nl_cmd_options_set()
2553 opt_inst_info = &opt_inst->info; in team_nl_cmd_options_set()
2588 err = team_option_set(team, opt_inst, &ctx); in team_nl_cmd_options_set()
2591 opt_inst->changed = true; in team_nl_cmd_options_set()
2597 opt_inst)) in team_nl_cmd_options_set()
2600 list_add(&opt_inst->tmp_list, &opt_inst_list); in team_nl_cmd_options_set()
2829 struct team_option_inst *opt_inst; in __team_options_change_check() local
2832 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_options_change_check()
2833 if (opt_inst->changed) in __team_options_change_check()
2834 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in __team_options_change_check()