diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2010-10-13 12:01:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-18 11:32:09 -0400 |
commit | 45b0cb8abdbdd425934f6b02dbb3963dd89fef55 (patch) | |
tree | 85f5d0bbee2dbcf4538b62bc0f8e90a2992c4dcb /drivers/net/bonding | |
parent | 3b410a310b48a8e7de3438957635093596ad5ca5 (diff) |
bonding: Re-enable netpoll over bonding
With the inclusion of previous fixup patches, netpoll over bonding apears to
work reliably with failover conditions. This reverts Gospos previous commit
c22d7ac844f1cb9c6a5fd20f89ebadc2feef891b, and allows access again to the netpoll
functionality in the bonding driver.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index b46cb139477d..ecbe206f90d1 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -184,9 +184,6 @@ static int arp_ip_count; | |||
184 | static int bond_mode = BOND_MODE_ROUNDROBIN; | 184 | static int bond_mode = BOND_MODE_ROUNDROBIN; |
185 | static int xmit_hashtype = BOND_XMIT_POLICY_LAYER2; | 185 | static int xmit_hashtype = BOND_XMIT_POLICY_LAYER2; |
186 | static int lacp_fast; | 186 | static int lacp_fast; |
187 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
188 | static int disable_netpoll = 1; | ||
189 | #endif | ||
190 | 187 | ||
191 | const struct bond_parm_tbl bond_lacp_tbl[] = { | 188 | const struct bond_parm_tbl bond_lacp_tbl[] = { |
192 | { "slow", AD_LACP_SLOW}, | 189 | { "slow", AD_LACP_SLOW}, |
@@ -1811,19 +1808,15 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1811 | bond_set_carrier(bond); | 1808 | bond_set_carrier(bond); |
1812 | 1809 | ||
1813 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1810 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1814 | if (disable_netpoll) { | 1811 | if (slaves_support_netpoll(bond_dev)) { |
1812 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | ||
1813 | if (bond_dev->npinfo) | ||
1814 | slave_dev->npinfo = bond_dev->npinfo; | ||
1815 | } else if (!(bond_dev->priv_flags & IFF_DISABLE_NETPOLL)) { | ||
1815 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; | 1816 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; |
1816 | } else { | 1817 | pr_info("New slave device %s does not support netpoll\n", |
1817 | if (slaves_support_netpoll(bond_dev)) { | 1818 | slave_dev->name); |
1818 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | 1819 | pr_info("Disabling netpoll support for %s\n", bond_dev->name); |
1819 | if (bond_dev->npinfo) | ||
1820 | slave_dev->npinfo = bond_dev->npinfo; | ||
1821 | } else if (!(bond_dev->priv_flags & IFF_DISABLE_NETPOLL)) { | ||
1822 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; | ||
1823 | pr_info("New slave device %s does not support netpoll\n", | ||
1824 | slave_dev->name); | ||
1825 | pr_info("Disabling netpoll support for %s\n", bond_dev->name); | ||
1826 | } | ||
1827 | } | 1820 | } |
1828 | #endif | 1821 | #endif |
1829 | read_unlock(&bond->lock); | 1822 | read_unlock(&bond->lock); |
@@ -2030,10 +2023,8 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) | |||
2030 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2023 | #ifdef CONFIG_NET_POLL_CONTROLLER |
2031 | read_lock_bh(&bond->lock); | 2024 | read_lock_bh(&bond->lock); |
2032 | 2025 | ||
2033 | /* Make sure netpoll over stays disabled until fixed. */ | 2026 | if (slaves_support_netpoll(bond_dev)) |
2034 | if (!disable_netpoll) | 2027 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; |
2035 | if (slaves_support_netpoll(bond_dev)) | ||
2036 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | ||
2037 | read_unlock_bh(&bond->lock); | 2028 | read_unlock_bh(&bond->lock); |
2038 | if (slave_dev->netdev_ops->ndo_netpoll_cleanup) | 2029 | if (slave_dev->netdev_ops->ndo_netpoll_cleanup) |
2039 | slave_dev->netdev_ops->ndo_netpoll_cleanup(slave_dev); | 2030 | slave_dev->netdev_ops->ndo_netpoll_cleanup(slave_dev); |