Lines Matching defs:option
439 /* Searches for an option by name */
443 int option;
445 for (option = 0; option < BOND_OPT_LAST; option++) {
446 opt = bond_opt_get(option);
455 const struct bond_opt_value *bond_opt_get_val(unsigned int option, u64 val)
460 opt = bond_opt_get(option);
499 * bond_opt_parse - parse option value
500 * @opt: the option to parse against
504 * a possible match for the option and returns NULL if a match isn't found,
517 /* No parsing if the option wants a raw val */
598 netdev_err(bond->dev, "option %s: mode dependency failed, not supported in mode %s(%llu)\n",
617 netdev_err(bond->dev, "option %s: invalid value (%s)\n",
620 netdev_err(bond->dev, "option %s: invalid value (%llu)\n",
628 netdev_err(bond->dev, "option %s: allowed values %llu - %llu\n",
635 netdev_err(bond->dev, "option %s: unable to set because the bond device has slaves\n",
639 netdev_err(bond->dev, "option %s: unable to set because the bond device is up\n",
648 * __bond_opt_set - set a bonding option
650 * @option: option to set
653 * This function is used to change the bond's option value, it can be
654 * used for both enabling/changing an option and for disabling it. RTNL lock
658 unsigned int option, struct bond_opt_value *val)
666 opt = bond_opt_get(option);
685 * __bond_opt_set_notify - set a bonding option
687 * @option: option to set
690 * This function is used to change the bond's option value and trigger
692 * an option and for disabling it. RTNL lock must be obtained before calling
696 unsigned int option, struct bond_opt_value *val)
702 ret = __bond_opt_set(bond, option, val);
713 * @option: option to set
717 * calls __bond_opt_set. It is mainly used for sysfs option manipulation.
719 int bond_opt_tryset_rtnl(struct bonding *bond, unsigned int option, char *buf)
727 ret = __bond_opt_set_notify(bond, option, &optval);
734 * bond_opt_get - get a pointer to an option
735 * @option: option for which to return a pointer
737 * This function checks if option is valid and if so returns a pointer
738 * to its entry in the bond_opts[] option array.
740 const struct bond_option *bond_opt_get(unsigned int option)
742 if (!BOND_OPT_VALID(option))
745 return &bond_opts[option];