Lines Matching refs:opt_inst

130 static void __team_option_inst_del(struct team_option_inst *opt_inst)  in __team_option_inst_del()  argument
132 list_del(&opt_inst->list); in __team_option_inst_del()
133 kfree(opt_inst); in __team_option_inst_del()
139 struct team_option_inst *opt_inst, *tmp; in __team_option_inst_del_option() local
141 list_for_each_entry_safe(opt_inst, tmp, &team->option_inst_list, list) { in __team_option_inst_del_option()
142 if (opt_inst->option == option) in __team_option_inst_del_option()
143 __team_option_inst_del(opt_inst); in __team_option_inst_del_option()
150 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 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()
359 struct team_option_inst *opt_inst, in team_option_get() argument
362 if (!opt_inst->option->getter) in team_option_get()
365 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()
2327 struct team_option_inst *opt_inst) in team_nl_fill_one_option_get() argument
2330 struct team_option *option = opt_inst->option; in team_nl_fill_one_option_get()
2331 struct team_option_inst_info *opt_inst_info = &opt_inst->info; in team_nl_fill_one_option_get()
2336 err = team_option_get(team, opt_inst, &ctx); in team_nl_fill_one_option_get()
2350 if (opt_inst->option->array_size && in team_nl_fill_one_option_get()
2392 if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED)) in team_nl_fill_one_option_get()
2394 if (opt_inst->changed) { in team_nl_fill_one_option_get()
2397 opt_inst->changed = false; in team_nl_fill_one_option_get()
2431 struct team_option_inst *opt_inst; in team_nl_send_options_get() local
2437 opt_inst = list_first_entry(sel_opt_inst_list, in team_nl_send_options_get()
2460 list_for_each_entry_from(opt_inst, sel_opt_inst_list, tmp_list) { in team_nl_send_options_get()
2461 err = team_nl_fill_one_option_get(skb, team, opt_inst); in team_nl_send_options_get()
2500 struct team_option_inst *opt_inst; in team_nl_options_get_doit() local
2508 list_for_each_entry(opt_inst, &team->option_inst_list, list) in team_nl_options_get_doit()
2509 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in team_nl_options_get_doit()
2552 struct team_option_inst *opt_inst; in team_nl_options_set_doit() local
2609 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in team_nl_options_set_doit()
2610 struct team_option *option = opt_inst->option; in team_nl_options_set_doit()
2615 opt_inst_info = &opt_inst->info; in team_nl_options_set_doit()
2650 err = team_option_set(team, opt_inst, &ctx); in team_nl_options_set_doit()
2653 opt_inst->changed = true; in team_nl_options_set_doit()
2654 list_add(&opt_inst->tmp_list, &opt_inst_list); in team_nl_options_set_doit()
2861 struct team_option_inst *opt_inst; in __team_options_change_check() local
2864 list_for_each_entry(opt_inst, &team->option_inst_list, list) { in __team_options_change_check()
2865 if (opt_inst->changed) in __team_options_change_check()
2866 list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list); in __team_options_change_check()