Lines Matching defs:option
107 struct team_option_inst { /* One for each option instance */
110 struct team_option *option;
119 struct team_option *option;
121 list_for_each_entry(option, &team->option_list, list) {
122 if (strcmp(option->name, opt_name) == 0)
123 return option;
135 struct team_option *option)
140 if (opt_inst->option == option)
145 static int __team_option_inst_add(struct team *team, struct team_option *option,
153 array_size = option->array_size;
161 opt_inst->option = option;
167 if (option->init) {
168 err = option->init(team, &opt_inst->info);
178 struct team_option *option)
182 if (!option->per_port) {
183 err = __team_option_inst_add(team, option, NULL);
190 __team_option_inst_del_option(team, option);
195 struct team_option *option)
200 if (opt_inst->option == option) {
213 if (opt_inst->option->per_port &&
222 struct team_option *option;
225 list_for_each_entry(option, &team->option_list, list) {
226 if (!option->per_port)
228 err = __team_option_inst_add(team, option, port);
253 const struct team_option *option,
264 for (i = 0; i < option_count; i++, option++) {
265 if (__team_find_option(team, option->name)) {
269 dst_opts[i] = kmemdup(option, sizeof(*option), GFP_KERNEL);
302 const struct team_option *option,
307 for (i = 0; i < option_count; i++, option++) {
310 del_opt = __team_find_option(team, option->name);
317 const struct team_option *option,
322 for (i = 0; i < option_count; i++, option++) {
325 del_opt = __team_find_option(team, option->name);
337 const struct team_option *option,
342 err = __team_options_register(team, option, option_count);
351 const struct team_option *option,
354 __team_options_mark_removed(team, option, option_count);
356 __team_options_unregister(team, option, option_count);
364 if (!opt_inst->option->getter)
366 return opt_inst->option->getter(team, ctx);
373 if (!opt_inst->option->setter)
375 return opt_inst->option->setter(team, ctx);
2359 struct team_option *option = opt_inst->option;
2373 if (nla_put_string(skb, TEAM_ATTR_OPTION_NAME, option->name))
2379 if (opt_inst->option->array_size &&
2384 switch (option->type) {
2639 struct team_option *option = opt_inst->option;
2647 if (option->type != opt_type ||
2648 strcmp(option->name, opt_name) ||
2650 (option->array_size && !opt_is_array) ||