bonding: fix active slaves with no primary
authorEric Kinzie <ekinzie@brocade.com>
Tue, 1 Mar 2016 17:32:01 +0000 (09:32 -0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 16 Mar 2016 18:05:47 +0000 (19:05 +0100)
commit8997a10bfcad789d000debaac4cd85cd3db57997
treeb8fd1c7b4c33308dd713db5a400a4a5c1521a6d1
parent6698820b5f6d955b6af2b916e1074db236d4f5a2
bonding: fix active slaves with no primary

If the link state of a slave is "up" when added, it is added to the list
of active slaves but, even if it is the only slave, is not selected as
the primary interface.  Generally, handling of link state interrupts
selects an interface to be primary, but only if the active count is zero.
This change avoids the situation where there are active slaves but
no primary.

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Eric Kinzie <ekinzie@brocade.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
drivers/net/bonding/rte_eth_bond_api.c