Skip to content

Commit 5bbc172

Browse files
committed
Merge branch 'davem-next' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
2 parents 30902dc + ae7b648 commit 5bbc172

32 files changed

+2118
-8116
lines changed

Documentation/networking/bonding.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ max_bonds
376376
Specifies the number of bonding devices to create for this
377377
instance of the bonding driver. E.g., if max_bonds is 3, and
378378
the bonding driver is not already loaded, then bond0, bond1
379-
and bond2 will be created. The default value is 1.
379+
and bond2 will be created. The default value is 1. Specifying
380+
a value of 0 will load bonding, but will not create any devices.
380381

381382
miimon
382383

@@ -539,6 +540,17 @@ mode
539540
swapped with the new curr_active_slave that was
540541
chosen.
541542

543+
num_grat_arp
544+
545+
Specifies the number of gratuitous ARPs to be issued after a
546+
failover event. One gratuitous ARP is issued immediately after
547+
the failover, subsequent ARPs are sent at a rate of one per link
548+
monitor interval (arp_interval or miimon, whichever is active).
549+
550+
The valid range is 0 - 255; the default value is 1. This option
551+
affects only the active-backup mode. This option was added for
552+
bonding version 3.3.0.
553+
542554
primary
543555

544556
A string (eth0, eth2, etc) specifying which slave is the

MAINTAINERS

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,6 +2147,8 @@ P: Jesse Brandeburg
21472147
21482148
P: Bruce Allan
21492149
2150+
P: PJ Waskiewicz
2151+
21502152
P: John Ronciak
21512153
21522154
@@ -2690,12 +2692,10 @@ L: [email protected]
26902692
S: Maintained
26912693

26922694
MARVELL MV643XX ETHERNET DRIVER
2693-
P: Dale Farnsworth
2694-
2695-
P: Manish Lachwani
2696-
2695+
P: Lennert Buytenhek
2696+
26972697
2698-
S: Odd Fixes for 2.4; Maintained for 2.6.
2698+
S: Supported
26992699

27002700
MATROX FRAMEBUFFER DRIVER
27012701
P: Petr Vandrovec
@@ -3233,14 +3233,6 @@ L: [email protected]
32333233
T: git git.infradead.org/battery-2.6.git
32343234
S: Maintained
32353235

3236-
POWERPC 4xx EMAC DRIVER
3237-
P: Eugene Surovegin
3238-
3239-
W: http://kernel.ebshome.net/emac/
3240-
3241-
3242-
S: Maintained
3243-
32443236
PNP SUPPORT
32453237
P: Adam Belay
32463238

drivers/net/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,6 @@ config IBMVETH
12551255
To compile this driver as a module, choose M here. The module will
12561256
be called ibmveth.
12571257

1258-
source "drivers/net/ibm_emac/Kconfig"
12591258
source "drivers/net/ibm_newemac/Kconfig"
12601259

12611260
config NET_PCI

drivers/net/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
obj-$(CONFIG_E1000) += e1000/
66
obj-$(CONFIG_E1000E) += e1000e/
7-
obj-$(CONFIG_IBM_EMAC) += ibm_emac/
87
obj-$(CONFIG_IBM_NEW_EMAC) += ibm_newemac/
98
obj-$(CONFIG_IGB) += igb/
109
obj-$(CONFIG_IXGBE) += ixgbe/

drivers/net/bonding/bond_main.c

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,22 +1189,21 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
11891189

11901190
if (new_active) {
11911191
bond_set_slave_active_flags(new_active);
1192-
}
11931192

1194-
if (new_active && bond->params.fail_over_mac)
1195-
bond_do_fail_over_mac(bond, new_active, old_active);
1193+
if (bond->params.fail_over_mac)
1194+
bond_do_fail_over_mac(bond, new_active,
1195+
old_active);
11961196

1197-
bond->send_grat_arp = bond->params.num_grat_arp;
1198-
if (bond->curr_active_slave &&
1199-
test_bit(__LINK_STATE_LINKWATCH_PENDING,
1200-
&bond->curr_active_slave->dev->state)) {
1201-
dprintk("delaying gratuitous arp on %s\n",
1202-
bond->curr_active_slave->dev->name);
1203-
} else {
1204-
if (bond->send_grat_arp > 0) {
1205-
bond_send_gratuitous_arp(bond);
1206-
bond->send_grat_arp--;
1207-
}
1197+
bond->send_grat_arp = bond->params.num_grat_arp;
1198+
bond_send_gratuitous_arp(bond);
1199+
1200+
write_unlock_bh(&bond->curr_slave_lock);
1201+
read_unlock(&bond->lock);
1202+
1203+
netdev_bonding_change(bond->dev);
1204+
1205+
read_lock(&bond->lock);
1206+
write_lock_bh(&bond->curr_slave_lock);
12081207
}
12091208
}
12101209
}
@@ -2235,17 +2234,6 @@ static int __bond_mii_monitor(struct bonding *bond, int have_locks)
22352234
* program could monitor the link itself if needed.
22362235
*/
22372236

2238-
if (bond->send_grat_arp) {
2239-
if (bond->curr_active_slave && test_bit(__LINK_STATE_LINKWATCH_PENDING,
2240-
&bond->curr_active_slave->dev->state))
2241-
dprintk("Needs to send gratuitous arp but not yet\n");
2242-
else {
2243-
dprintk("sending delayed gratuitous arp on on %s\n",
2244-
bond->curr_active_slave->dev->name);
2245-
bond_send_gratuitous_arp(bond);
2246-
bond->send_grat_arp--;
2247-
}
2248-
}
22492237
read_lock(&bond->curr_slave_lock);
22502238
oldcurrent = bond->curr_active_slave;
22512239
read_unlock(&bond->curr_slave_lock);
@@ -2486,6 +2474,13 @@ void bond_mii_monitor(struct work_struct *work)
24862474
read_unlock(&bond->lock);
24872475
return;
24882476
}
2477+
2478+
if (bond->send_grat_arp) {
2479+
read_lock(&bond->curr_slave_lock);
2480+
bond_send_gratuitous_arp(bond);
2481+
read_unlock(&bond->curr_slave_lock);
2482+
}
2483+
24892484
if (__bond_mii_monitor(bond, 0)) {
24902485
read_unlock(&bond->lock);
24912486
rtnl_lock();
@@ -2651,6 +2646,8 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
26512646
/*
26522647
* Kick out a gratuitous ARP for an IP on the bonding master plus one
26532648
* for each VLAN above us.
2649+
*
2650+
* Caller must hold curr_slave_lock for read or better
26542651
*/
26552652
static void bond_send_gratuitous_arp(struct bonding *bond)
26562653
{
@@ -2660,9 +2657,13 @@ static void bond_send_gratuitous_arp(struct bonding *bond)
26602657

26612658
dprintk("bond_send_grat_arp: bond %s slave %s\n", bond->dev->name,
26622659
slave ? slave->dev->name : "NULL");
2663-
if (!slave)
2660+
2661+
if (!slave || !bond->send_grat_arp ||
2662+
test_bit(__LINK_STATE_LINKWATCH_PENDING, &slave->dev->state))
26642663
return;
26652664

2665+
bond->send_grat_arp--;
2666+
26662667
if (bond->master_ip) {
26672668
bond_arp_send(slave->dev, ARPOP_REPLY, bond->master_ip,
26682669
bond->master_ip, 0);
@@ -3166,6 +3167,12 @@ void bond_activebackup_arp_mon(struct work_struct *work)
31663167
if (bond->slave_cnt == 0)
31673168
goto re_arm;
31683169

3170+
if (bond->send_grat_arp) {
3171+
read_lock(&bond->curr_slave_lock);
3172+
bond_send_gratuitous_arp(bond);
3173+
read_unlock(&bond->curr_slave_lock);
3174+
}
3175+
31693176
if (bond_ab_arp_inspect(bond, delta_in_ticks)) {
31703177
read_unlock(&bond->lock);
31713178
rtnl_lock();
@@ -3840,6 +3847,7 @@ static int bond_close(struct net_device *bond_dev)
38403847

38413848
write_lock_bh(&bond->lock);
38423849

3850+
bond->send_grat_arp = 0;
38433851

38443852
/* signal timers not to re-arm */
38453853
bond->kill_timers = 1;
@@ -4742,11 +4750,11 @@ static int bond_check_params(struct bond_params *params)
47424750
}
47434751
}
47444752

4745-
if (max_bonds < 1 || max_bonds > INT_MAX) {
4753+
if (max_bonds < 0 || max_bonds > INT_MAX) {
47464754
printk(KERN_WARNING DRV_NAME
47474755
": Warning: max_bonds (%d) not in range %d-%d, so it "
47484756
"was reset to BOND_DEFAULT_MAX_BONDS (%d)\n",
4749-
max_bonds, 1, INT_MAX, BOND_DEFAULT_MAX_BONDS);
4757+
max_bonds, 0, INT_MAX, BOND_DEFAULT_MAX_BONDS);
47504758
max_bonds = BOND_DEFAULT_MAX_BONDS;
47514759
}
47524760

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

49464954
printk("\n");
49474955

4948-
} else {
4956+
} else if (max_bonds) {
49494957
/* miimon and arp_interval not set, we need one so things
49504958
* work as expected, see bonding.txt for details
49514959
*/

drivers/net/bonding/bond_sysfs.c

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ extern struct bond_parm_tbl arp_validate_tbl[];
5353
extern struct bond_parm_tbl fail_over_mac_tbl[];
5454

5555
static int expected_refcount = -1;
56-
static struct class *netdev_class;
5756
/*--------------------------- Data Structures -----------------------------*/
5857

5958
/* Bonding sysfs lock. Why can't we just use the subsystem lock?
@@ -1447,19 +1446,9 @@ static struct attribute_group bonding_group = {
14471446
*/
14481447
int bond_create_sysfs(void)
14491448
{
1450-
int ret = 0;
1451-
struct bonding *firstbond;
1452-
1453-
/* get the netdev class pointer */
1454-
firstbond = container_of(bond_dev_list.next, struct bonding, bond_list);
1455-
if (!firstbond)
1456-
return -ENODEV;
1457-
1458-
netdev_class = firstbond->dev->dev.class;
1459-
if (!netdev_class)
1460-
return -ENODEV;
1449+
int ret;
14611450

1462-
ret = class_create_file(netdev_class, &class_attr_bonding_masters);
1451+
ret = netdev_class_create_file(&class_attr_bonding_masters);
14631452
/*
14641453
* Permit multiple loads of the module by ignoring failures to
14651454
* create the bonding_masters sysfs file. Bonding devices
@@ -1478,10 +1467,6 @@ int bond_create_sysfs(void)
14781467
printk(KERN_ERR
14791468
"network device named %s already exists in sysfs",
14801469
class_attr_bonding_masters.attr.name);
1481-
else {
1482-
netdev_class = NULL;
1483-
return 0;
1484-
}
14851470
}
14861471

14871472
return ret;
@@ -1493,8 +1478,7 @@ int bond_create_sysfs(void)
14931478
*/
14941479
void bond_destroy_sysfs(void)
14951480
{
1496-
if (netdev_class)
1497-
class_remove_file(netdev_class, &class_attr_bonding_masters);
1481+
netdev_class_remove_file(&class_attr_bonding_masters);
14981482
}
14991483

15001484
/*

drivers/net/bonding/bonding.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include "bond_3ad.h"
2323
#include "bond_alb.h"
2424

25-
#define DRV_VERSION "3.2.5"
26-
#define DRV_RELDATE "March 21, 2008"
25+
#define DRV_VERSION "3.3.0"
26+
#define DRV_RELDATE "June 10, 2008"
2727
#define DRV_NAME "bonding"
2828
#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"
2929

drivers/net/ibm_emac/Kconfig

Lines changed: 0 additions & 70 deletions
This file was deleted.

drivers/net/ibm_emac/Makefile

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)