Skip to content

Commit

Permalink
Merge branch 'davem-next' of master.kernel.org:/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/jgarzik/netdev-2.6
  • Loading branch information
David S. Miller committed Jun 18, 2008
2 parents 30902dc + ae7b648 commit 5bbc172
Show file tree
Hide file tree
Showing 32 changed files with 2,118 additions and 8,116 deletions.
14 changes: 13 additions & 1 deletion Documentation/networking/bonding.txt
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ max_bonds
Specifies the number of bonding devices to create for this
instance of the bonding driver. E.g., if max_bonds is 3, and
the bonding driver is not already loaded, then bond0, bond1
and bond2 will be created. The default value is 1.
and bond2 will be created. The default value is 1. Specifying
a value of 0 will load bonding, but will not create any devices.

miimon

Expand Down Expand Up @@ -539,6 +540,17 @@ mode
swapped with the new curr_active_slave that was
chosen.

num_grat_arp

Specifies the number of gratuitous ARPs to be issued after a
failover event. One gratuitous ARP is issued immediately after
the failover, subsequent ARPs are sent at a rate of one per link
monitor interval (arp_interval or miimon, whichever is active).

The valid range is 0 - 255; the default value is 1. This option
affects only the active-backup mode. This option was added for
bonding version 3.3.0.

primary

A string (eth0, eth2, etc) specifying which slave is the
Expand Down
18 changes: 5 additions & 13 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2147,6 +2147,8 @@ P: Jesse Brandeburg
M: jesse.brandeburg@intel.com
P: Bruce Allan
M: bruce.w.allan@intel.com
P: PJ Waskiewicz
M: peter.p.waskiewicz.jr@intel.com
P: John Ronciak
M: john.ronciak@intel.com
L: e1000-devel@lists.sourceforge.net
Expand Down Expand Up @@ -2690,12 +2692,10 @@ L: libertas-dev@lists.infradead.org
S: Maintained

MARVELL MV643XX ETHERNET DRIVER
P: Dale Farnsworth
M: dale@farnsworth.org
P: Manish Lachwani
M: mlachwani@mvista.com
P: Lennert Buytenhek
M: buytenh@marvell.com
L: netdev@vger.kernel.org
S: Odd Fixes for 2.4; Maintained for 2.6.
S: Supported

MATROX FRAMEBUFFER DRIVER
P: Petr Vandrovec
Expand Down Expand Up @@ -3233,14 +3233,6 @@ L: linux-kernel@vger.kernel.org
T: git git.infradead.org/battery-2.6.git
S: Maintained

POWERPC 4xx EMAC DRIVER
P: Eugene Surovegin
M: ebs@ebshome.net
W: http://kernel.ebshome.net/emac/
L: linuxppc-dev@ozlabs.org
L: netdev@vger.kernel.org
S: Maintained

PNP SUPPORT
P: Adam Belay
M: ambx1@neo.rr.com
Expand Down
1 change: 0 additions & 1 deletion drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,6 @@ config IBMVETH
To compile this driver as a module, choose M here. The module will
be called ibmveth.

source "drivers/net/ibm_emac/Kconfig"
source "drivers/net/ibm_newemac/Kconfig"

config NET_PCI
Expand Down
1 change: 0 additions & 1 deletion drivers/net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

obj-$(CONFIG_E1000) += e1000/
obj-$(CONFIG_E1000E) += e1000e/
obj-$(CONFIG_IBM_EMAC) += ibm_emac/
obj-$(CONFIG_IBM_NEW_EMAC) += ibm_newemac/
obj-$(CONFIG_IGB) += igb/
obj-$(CONFIG_IXGBE) += ixgbe/
Expand Down
66 changes: 37 additions & 29 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,22 +1189,21 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)

if (new_active) {
bond_set_slave_active_flags(new_active);
}

if (new_active && bond->params.fail_over_mac)
bond_do_fail_over_mac(bond, new_active, old_active);
if (bond->params.fail_over_mac)
bond_do_fail_over_mac(bond, new_active,
old_active);

bond->send_grat_arp = bond->params.num_grat_arp;
if (bond->curr_active_slave &&
test_bit(__LINK_STATE_LINKWATCH_PENDING,
&bond->curr_active_slave->dev->state)) {
dprintk("delaying gratuitous arp on %s\n",
bond->curr_active_slave->dev->name);
} else {
if (bond->send_grat_arp > 0) {
bond_send_gratuitous_arp(bond);
bond->send_grat_arp--;
}
bond->send_grat_arp = bond->params.num_grat_arp;
bond_send_gratuitous_arp(bond);

write_unlock_bh(&bond->curr_slave_lock);
read_unlock(&bond->lock);

netdev_bonding_change(bond->dev);

read_lock(&bond->lock);
write_lock_bh(&bond->curr_slave_lock);
}
}
}
Expand Down Expand Up @@ -2235,17 +2234,6 @@ static int __bond_mii_monitor(struct bonding *bond, int have_locks)
* program could monitor the link itself if needed.
*/

if (bond->send_grat_arp) {
if (bond->curr_active_slave && test_bit(__LINK_STATE_LINKWATCH_PENDING,
&bond->curr_active_slave->dev->state))
dprintk("Needs to send gratuitous arp but not yet\n");
else {
dprintk("sending delayed gratuitous arp on on %s\n",
bond->curr_active_slave->dev->name);
bond_send_gratuitous_arp(bond);
bond->send_grat_arp--;
}
}
read_lock(&bond->curr_slave_lock);
oldcurrent = bond->curr_active_slave;
read_unlock(&bond->curr_slave_lock);
Expand Down Expand Up @@ -2486,6 +2474,13 @@ void bond_mii_monitor(struct work_struct *work)
read_unlock(&bond->lock);
return;
}

if (bond->send_grat_arp) {
read_lock(&bond->curr_slave_lock);
bond_send_gratuitous_arp(bond);
read_unlock(&bond->curr_slave_lock);
}

if (__bond_mii_monitor(bond, 0)) {
read_unlock(&bond->lock);
rtnl_lock();
Expand Down Expand Up @@ -2651,6 +2646,8 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
/*
* Kick out a gratuitous ARP for an IP on the bonding master plus one
* for each VLAN above us.
*
* Caller must hold curr_slave_lock for read or better
*/
static void bond_send_gratuitous_arp(struct bonding *bond)
{
Expand All @@ -2660,9 +2657,13 @@ static void bond_send_gratuitous_arp(struct bonding *bond)

dprintk("bond_send_grat_arp: bond %s slave %s\n", bond->dev->name,
slave ? slave->dev->name : "NULL");
if (!slave)

if (!slave || !bond->send_grat_arp ||
test_bit(__LINK_STATE_LINKWATCH_PENDING, &slave->dev->state))
return;

bond->send_grat_arp--;

if (bond->master_ip) {
bond_arp_send(slave->dev, ARPOP_REPLY, bond->master_ip,
bond->master_ip, 0);
Expand Down Expand Up @@ -3166,6 +3167,12 @@ void bond_activebackup_arp_mon(struct work_struct *work)
if (bond->slave_cnt == 0)
goto re_arm;

if (bond->send_grat_arp) {
read_lock(&bond->curr_slave_lock);
bond_send_gratuitous_arp(bond);
read_unlock(&bond->curr_slave_lock);
}

if (bond_ab_arp_inspect(bond, delta_in_ticks)) {
read_unlock(&bond->lock);
rtnl_lock();
Expand Down Expand Up @@ -3840,6 +3847,7 @@ static int bond_close(struct net_device *bond_dev)

write_lock_bh(&bond->lock);

bond->send_grat_arp = 0;

/* signal timers not to re-arm */
bond->kill_timers = 1;
Expand Down Expand Up @@ -4742,11 +4750,11 @@ static int bond_check_params(struct bond_params *params)
}
}

if (max_bonds < 1 || max_bonds > INT_MAX) {
if (max_bonds < 0 || max_bonds > INT_MAX) {
printk(KERN_WARNING DRV_NAME
": Warning: max_bonds (%d) not in range %d-%d, so it "
"was reset to BOND_DEFAULT_MAX_BONDS (%d)\n",
max_bonds, 1, INT_MAX, BOND_DEFAULT_MAX_BONDS);
max_bonds, 0, INT_MAX, BOND_DEFAULT_MAX_BONDS);
max_bonds = BOND_DEFAULT_MAX_BONDS;
}

Expand Down Expand Up @@ -4945,7 +4953,7 @@ static int bond_check_params(struct bond_params *params)

printk("\n");

} else {
} else if (max_bonds) {
/* miimon and arp_interval not set, we need one so things
* work as expected, see bonding.txt for details
*/
Expand Down
22 changes: 3 additions & 19 deletions drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ extern struct bond_parm_tbl arp_validate_tbl[];
extern struct bond_parm_tbl fail_over_mac_tbl[];

static int expected_refcount = -1;
static struct class *netdev_class;
/*--------------------------- Data Structures -----------------------------*/

/* Bonding sysfs lock. Why can't we just use the subsystem lock?
Expand Down Expand Up @@ -1447,19 +1446,9 @@ static struct attribute_group bonding_group = {
*/
int bond_create_sysfs(void)
{
int ret = 0;
struct bonding *firstbond;

/* get the netdev class pointer */
firstbond = container_of(bond_dev_list.next, struct bonding, bond_list);
if (!firstbond)
return -ENODEV;

netdev_class = firstbond->dev->dev.class;
if (!netdev_class)
return -ENODEV;
int ret;

ret = class_create_file(netdev_class, &class_attr_bonding_masters);
ret = netdev_class_create_file(&class_attr_bonding_masters);
/*
* Permit multiple loads of the module by ignoring failures to
* create the bonding_masters sysfs file. Bonding devices
Expand All @@ -1478,10 +1467,6 @@ int bond_create_sysfs(void)
printk(KERN_ERR
"network device named %s already exists in sysfs",
class_attr_bonding_masters.attr.name);
else {
netdev_class = NULL;
return 0;
}
}

return ret;
Expand All @@ -1493,8 +1478,7 @@ int bond_create_sysfs(void)
*/
void bond_destroy_sysfs(void)
{
if (netdev_class)
class_remove_file(netdev_class, &class_attr_bonding_masters);
netdev_class_remove_file(&class_attr_bonding_masters);
}

/*
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/bonding/bonding.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "bond_3ad.h"
#include "bond_alb.h"

#define DRV_VERSION "3.2.5"
#define DRV_RELDATE "March 21, 2008"
#define DRV_VERSION "3.3.0"
#define DRV_RELDATE "June 10, 2008"
#define DRV_NAME "bonding"
#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"

Expand Down
70 changes: 0 additions & 70 deletions drivers/net/ibm_emac/Kconfig

This file was deleted.

11 changes: 0 additions & 11 deletions drivers/net/ibm_emac/Makefile

This file was deleted.

Loading

0 comments on commit 5bbc172

Please sign in to comment.