[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <469C6575-826C-4FF7-8FAE-78166EEB177B@cumulusnetworks.com>
Date: Fri, 20 Dec 2013 18:06:03 -0800
From: Scott Feldman <sfeldma@...ulusnetworks.com>
To: Ding Tianhong <dingtianhong@...wei.com>
Cc: Jay Vosburgh <fubar@...ibm.com>,
Andy Gospodarek <andy@...yhouse.net>,
"David S. Miller" <davem@...emloft.net>,
Veaceslav Falico <vfalico@...hat.com>,
Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 1/3] bonding: add option lp_interval for loading module
On Dec 19, 2013, at 9:10 PM, Ding Tianhong <dingtianhong@...wei.com> wrote:
> @@ -4271,6 +4276,12 @@ static int bond_check_params(struct bond_params *params)
> fail_over_mac_value = BOND_FOM_NONE;
> }
>
> + if (lp_interval == 0) {
> + pr_warning("Warning: ip_interval must be between 1 and %d, so it was reset to %d\n",
> + INT_MAX, BOND_ALB_DEFAULT_LP_INTERVAL);
> + lp_interval = BOND_ALB_DEFAULT_LP_INTERVAL;
> + }
> +
[sorry, replied with wrong email]
What do you think about using the new bond_option_xxx_set() functions for module parameters also? The above code, for example, is duplicated in bond_option_lp_interval_set(). This way, we have a unified solution, where option bounds checking, compatibility, warnings, etc happened in one place for all three modes of input: sysfs, netlink, and module params.
-scott
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists