]> git.openfabrics.org - ~emulex/infiniband.git/commit
bonding: prevent sysfs from allowing arp monitoring with alb/tlb
authorAndy Gospodarek <andy@greyhouse.net>
Wed, 28 Jul 2010 15:13:56 +0000 (15:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 31 Jul 2010 06:27:57 +0000 (23:27 -0700)
commitc5cb002fb0c82a0ccaef24e002ab370165b55be7
tree023901db3964b3fafa72b629727676b42d192940
parent75f5e1c6f6cef2c201da688b2279cf15156db56d
bonding: prevent sysfs from allowing arp monitoring with alb/tlb

When using module options arp monitoring and balance-alb/balance-tlb
are mutually exclusive options.  Anytime balance-alb/balance-tlb are
enabled mii monitoring is forced to 100ms if not set.  When configuring
via sysfs no checking is currently done.

Handling these cases with sysfs has to be done a bit differently because
we do not have all configuration information available at once.  This
patch will not allow a mode change to balance-alb/balance-tlb if
arp_interval is already non-zero.  It will also not allow the user to
set a non-zero arp_interval value if the mode is already set to
balance-alb/balance-tlb.  They are still mutually exclusive on a
first-come, first serve basis.

Tested with initscripts on Fedora and manual setting via sysfs.

Signed-off-by: Andy Gospodarek <gospo@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_sysfs.c