Lines Matching defs:option

502 /* Searches for an option by name */
506 int option;
508 for (option = 0; option < BOND_OPT_LAST; option++) {
509 opt = bond_opt_get(option);
518 const struct bond_opt_value *bond_opt_get_val(unsigned int option, u64 val)
523 opt = bond_opt_get(option);
562 * bond_opt_parse - parse option value
563 * @opt: the option to parse against
567 * a possible match for the option and returns NULL if a match isn't found,
580 /* No parsing if the option wants a raw val */
663 netdev_err(bond->dev, "option %s: mode dependency failed, not supported in mode %s(%llu)\n",
666 "option not supported in mode");
681 NL_SET_ERR_MSG_ATTR(extack, bad_attr, "invalid option value");
688 netdev_err(bond->dev, "option %s: invalid value (%s)\n",
691 netdev_err(bond->dev, "option %s: invalid value (%llu)\n",
699 netdev_err(bond->dev, "option %s: allowed values %llu - %llu\n",
707 "unable to set option because the bond device has slaves");
708 netdev_err(bond->dev, "option %s: unable to set because the bond device has slaves\n",
713 "unable to set option because the bond is up");
714 netdev_err(bond->dev, "option %s: unable to set because the bond device is up\n",
722 netdev_err(bond->dev, "option %s: interface %s does not exist!\n",
734 * __bond_opt_set - set a bonding option
736 * @option: option to set
742 * This function is used to change the bond's option value, it can be
743 * used for both enabling/changing an option and for disabling it. RTNL lock
747 unsigned int option, struct bond_opt_value *val,
756 opt = bond_opt_get(option);
775 * __bond_opt_set_notify - set a bonding option
777 * @option: option to set
780 * This function is used to change the bond's option value and trigger
782 * an option and for disabling it. RTNL lock must be obtained before calling
786 unsigned int option, struct bond_opt_value *val)
792 ret = __bond_opt_set(bond, option, val, NULL, NULL);
803 * @option: option to set
807 * calls __bond_opt_set. It is mainly used for sysfs option manipulation.
809 int bond_opt_tryset_rtnl(struct bonding *bond, unsigned int option, char *buf)
817 ret = __bond_opt_set_notify(bond, option, &optval);
824 * bond_opt_get - get a pointer to an option
825 * @option: option for which to return a pointer
827 * This function checks if option is valid and if so returns a pointer
828 * to its entry in the bond_opts[] option array.
830 const struct bond_option *bond_opt_get(unsigned int option)
832 if (!BOND_OPT_VALID(option))
835 return &bond_opts[option];