Lines Matching defs:option
108 struct team_option_inst { /* One for each option instance */
111 struct team_option *option;
120 struct team_option *option;
122 list_for_each_entry(option, &team->option_list, list) {
123 if (strcmp(option->name, opt_name) == 0)
124 return option;
136 struct team_option *option)
141 if (opt_inst->option == option)
146 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 option->init(team, &opt_inst->info);
175 struct team_option *option)
179 if (!option->per_port) {
180 err = __team_option_inst_add(team, option, NULL);
187 __team_option_inst_del_option(team, option);
192 struct team_option *option)
197 if (opt_inst->option == option) {
210 if (opt_inst->option->per_port &&
219 struct team_option *option;
222 list_for_each_entry(option, &team->option_list, list) {
223 if (!option->per_port)
225 err = __team_option_inst_add(team, option, port);
250 const struct team_option *option,
261 for (i = 0; i < option_count; i++, option++) {
262 if (__team_find_option(team, option->name)) {
266 dst_opts[i] = kmemdup(option, sizeof(*option), GFP_KERNEL);
299 const struct team_option *option,
304 for (i = 0; i < option_count; i++, option++) {
307 del_opt = __team_find_option(team, option->name);
314 const struct team_option *option,
319 for (i = 0; i < option_count; i++, option++) {
322 del_opt = __team_find_option(team, option->name);
334 const struct team_option *option,
339 err = __team_options_register(team, option, option_count);
348 const struct team_option *option,
351 __team_options_mark_removed(team, option, option_count);
353 __team_options_unregister(team, option, option_count);
361 if (!opt_inst->option->getter)
364 opt_inst->option->getter(team, ctx);
372 if (!opt_inst->option->setter)
374 return opt_inst->option->setter(team, ctx);
2351 struct team_option *option = opt_inst->option;
2365 if (nla_put_string(skb, TEAM_ATTR_OPTION_NAME, option->name))
2371 if (opt_inst->option->array_size &&
2376 switch (option->type) {
2631 struct team_option *option = opt_inst->option;
2639 if (option->type != opt_type ||
2640 strcmp(option->name, opt_name) ||
2642 (option->array_size && !opt_is_array) ||