* [PATCH REPOST net-next-2.6 0/4] bonding: Four patches @ 2009-08-28 22:05 Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next 1/4] bonding: propogate vlan_features to bonding master Jay Vosburgh 2009-08-29 6:02 ` [PATCH REPOST net-next-2.6 0/4] bonding: Four patches David Miller 0 siblings, 2 replies; 9+ messages in thread From: Jay Vosburgh @ 2009-08-28 22:05 UTC (permalink / raw) To: netdev; +Cc: David Miller Reposting after I screwed up the Subject lines Four patches for bonding: Patch 1 adds the propogation of vlan_features from the slaves to the master device. Patch 2 replaces a cumbersome manual MAC address comparison with compare_ether_addr. Patch 3 removes a useless test against INT_MAX Patch 4 modifies bond_check_dev_link to handle devices that leave carrier up even when adminstratively down. Due to lab machine adventures on my end, I was only able to compile test patches 2 - 4. Please apply for net-next-2.6. -J --- -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH REPOST net-next 1/4] bonding: propogate vlan_features to bonding master 2009-08-28 22:05 [PATCH REPOST net-next-2.6 0/4] bonding: Four patches Jay Vosburgh @ 2009-08-28 22:05 ` Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 2/4] bonding: use compare_ether_addr Jay Vosburgh 2009-08-29 6:02 ` [PATCH REPOST net-next-2.6 0/4] bonding: Four patches David Miller 1 sibling, 1 reply; 9+ messages in thread From: Jay Vosburgh @ 2009-08-28 22:05 UTC (permalink / raw) To: netdev; +Cc: David Miller, Or Gerlitz Propogate the vlan_features of the slave devices to the bonding master device, using the same logic as for regular features. Tested by Or Gerlitz <ogerlitz@voltaire.com>, who also removed the debug logic from the original test patch. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> --- drivers/net/bonding/bond_main.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 4798d30..1aeb36c 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1331,6 +1331,7 @@ static int bond_compute_features(struct bonding *bond) struct slave *slave; struct net_device *bond_dev = bond->dev; unsigned long features = bond_dev->features; + unsigned long vlan_features = 0; unsigned short max_hard_header_len = max((u16)ETH_HLEN, bond_dev->hard_header_len); int i; @@ -1343,10 +1344,14 @@ static int bond_compute_features(struct bonding *bond) features &= ~NETIF_F_ONE_FOR_ALL; + vlan_features = bond->first_slave->dev->vlan_features; bond_for_each_slave(bond, slave, i) { features = netdev_increment_features(features, slave->dev->features, NETIF_F_ONE_FOR_ALL); + vlan_features = netdev_increment_features(vlan_features, + slave->dev->vlan_features, + NETIF_F_ONE_FOR_ALL); if (slave->dev->hard_header_len > max_hard_header_len) max_hard_header_len = slave->dev->hard_header_len; } @@ -1354,6 +1359,7 @@ static int bond_compute_features(struct bonding *bond) done: features |= (bond_dev->features & BOND_VLAN_FEATURES); bond_dev->features = netdev_fix_features(features, NULL); + bond_dev->vlan_features = netdev_fix_features(vlan_features, NULL); bond_dev->hard_header_len = max_hard_header_len; return 0; -- 1.6.0.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH REPOST net-next-2.6 2/4] bonding: use compare_ether_addr 2009-08-28 22:05 ` [PATCH REPOST net-next 1/4] bonding: propogate vlan_features to bonding master Jay Vosburgh @ 2009-08-28 22:05 ` Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX Jay Vosburgh 0 siblings, 1 reply; 9+ messages in thread From: Jay Vosburgh @ 2009-08-28 22:05 UTC (permalink / raw) To: netdev; +Cc: David Miller, Stephen Hemminger From: Stephen Hemminger <shemminger@vyatta.com> Bonding can use compare_ether_addr() in bond_release. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> --- drivers/net/bonding/bond_main.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 1aeb36c..ed00ba9 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1796,7 +1796,6 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) struct bonding *bond = netdev_priv(bond_dev); struct slave *slave, *oldcurrent; struct sockaddr addr; - int mac_addr_differ; /* slave is not a slave or master is not master of this slave */ if (!(slave_dev->flags & IFF_SLAVE) || @@ -1820,9 +1819,8 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) } if (!bond->params.fail_over_mac) { - mac_addr_differ = memcmp(bond_dev->dev_addr, slave->perm_hwaddr, - ETH_ALEN); - if (!mac_addr_differ && (bond->slave_cnt > 1)) + if (!compare_ether_addr(bond_dev->dev_addr, slave->perm_hwaddr) + && bond->slave_cnt > 1) pr_warning(DRV_NAME ": %s: Warning: the permanent HWaddr of %s - " "%pM - is still in use by %s. " -- 1.6.0.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 2/4] bonding: use compare_ether_addr Jay Vosburgh @ 2009-08-28 22:05 ` Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 4/4] bonding: Have bond_check_dev_link examine netif_running Jay Vosburgh 2009-08-28 22:49 ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX David Miller 0 siblings, 2 replies; 9+ messages in thread From: Jay Vosburgh @ 2009-08-28 22:05 UTC (permalink / raw) To: netdev; +Cc: David Miller, Nicolas de Pesloüan [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=utf-8, Size: 887 bytes --] From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> max_bonds is of type int and cannot be greater than INT_MAX. Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> --- drivers/net/bonding/bond_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index ed00ba9..6b9f15b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4759,7 +4759,7 @@ static int bond_check_params(struct bond_params *params) params->ad_select = BOND_AD_STABLE; } - if (max_bonds < 0 || max_bonds > INT_MAX) { + if (max_bonds < 0) { pr_warning(DRV_NAME ": Warning: max_bonds (%d) not in range %d-%d, so it " "was reset to BOND_DEFAULT_MAX_BONDS (%d)\n", -- 1.6.0.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH REPOST net-next-2.6 4/4] bonding: Have bond_check_dev_link examine netif_running 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX Jay Vosburgh @ 2009-08-28 22:05 ` Jay Vosburgh 2009-08-28 22:49 ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX David Miller 1 sibling, 0 replies; 9+ messages in thread From: Jay Vosburgh @ 2009-08-28 22:05 UTC (permalink / raw) To: netdev; +Cc: David Miller, Petri Gynther From: Petri Gynther <pgynther@google.com> bonding: Have bond_check_dev_link examine netif_running Some network devices do not call netif_carrier_off when they are set administratively down. Have the bonding link check function also inspect the netif_running state. Ignore netif_running if the bond_check_dev_link function is called with "reporting" set, as in that case it's inspecting the capabilities of the non-netif_carrier device driver. Signed-off-by: Petri Gynther <pgynther@google.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> --- drivers/net/bonding/bond_main.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 6b9f15b..7c0e0bd 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -695,6 +695,9 @@ static int bond_check_dev_link(struct bonding *bond, struct ifreq ifr; struct mii_ioctl_data *mii; + if (!reporting && !netif_running(slave_dev)) + return 0; + if (bond->params.use_carrier) return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0; -- 1.6.0.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 4/4] bonding: Have bond_check_dev_link examine netif_running Jay Vosburgh @ 2009-08-28 22:49 ` David Miller 2009-08-28 23:18 ` Jay Vosburgh 1 sibling, 1 reply; 9+ messages in thread From: David Miller @ 2009-08-28 22:49 UTC (permalink / raw) To: fubar; +Cc: netdev, nicolas.2p.debian From: Jay Vosburgh <fubar@us.ibm.com> Date: Fri, 28 Aug 2009 15:05:14 -0700 > From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> > > max_bonds is of type int and cannot be greater than INT_MAX. > > Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> > Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> It seems you use two different encodings here for Nicolas's last name, and thus the two-dotted 'u' comes out corrupted in the From: field. This causes patchwork to not be able to parse the patch and thus put it properly into the queue. So all that's in there are patches #1, #2 and #4. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX 2009-08-28 22:49 ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX David Miller @ 2009-08-28 23:18 ` Jay Vosburgh 2009-08-28 23:22 ` David Miller 0 siblings, 1 reply; 9+ messages in thread From: Jay Vosburgh @ 2009-08-28 23:18 UTC (permalink / raw) To: David Miller; +Cc: netdev, nicolas.2p.debian David Miller <davem@davemloft.net> wrote: >From: Jay Vosburgh <fubar@us.ibm.com> >Date: Fri, 28 Aug 2009 15:05:14 -0700 > >> From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> >> >> max_bonds is of type int and cannot be greater than INT_MAX. >> >> Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> >> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> > >It seems you use two different encodings here for Nicolas's >last name, and thus the two-dotted 'u' comes out corrupted >in the From: field. > >This causes patchwork to not be able to parse the patch >and thus put it properly into the queue. So all that's >in there are patches #1, #2 and #4. Hmm. Does this one work any better? I just copied the Signed-off-by text into the From: line. -J From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Date: Sat, 22 Aug 2009 14:17:21 +0200 Subject: [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit max_bonds is of type int and cannot be greater than INT_MAX. Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> --- drivers/net/bonding/bond_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index ed00ba9..6b9f15b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4759,7 +4759,7 @@ static int bond_check_params(struct bond_params *params) params->ad_select = BOND_AD_STABLE; } - if (max_bonds < 0 || max_bonds > INT_MAX) { + if (max_bonds < 0) { pr_warning(DRV_NAME ": Warning: max_bonds (%d) not in range %d-%d, so it " "was reset to BOND_DEFAULT_MAX_BONDS (%d)\n", -- 1.6.0.2 --- -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX 2009-08-28 23:18 ` Jay Vosburgh @ 2009-08-28 23:22 ` David Miller 0 siblings, 0 replies; 9+ messages in thread From: David Miller @ 2009-08-28 23:22 UTC (permalink / raw) To: fubar; +Cc: netdev, nicolas.2p.debian From: Jay Vosburgh <fubar@us.ibm.com> Date: Fri, 28 Aug 2009 16:18:34 -0700 > Hmm. Does this one work any better? Yep, this one made it through, thanks. > I just copied the Signed-off-by text into the From: line. 'git format-patch' and similar tools should provide the From: line for you automatically. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH REPOST net-next-2.6 0/4] bonding: Four patches 2009-08-28 22:05 [PATCH REPOST net-next-2.6 0/4] bonding: Four patches Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next 1/4] bonding: propogate vlan_features to bonding master Jay Vosburgh @ 2009-08-29 6:02 ` David Miller 1 sibling, 0 replies; 9+ messages in thread From: David Miller @ 2009-08-29 6:02 UTC (permalink / raw) To: fubar; +Cc: netdev From: Jay Vosburgh <fubar@us.ibm.com> Date: Fri, 28 Aug 2009 15:05:11 -0700 > Four patches for bonding: > > Patch 1 adds the propogation of vlan_features from the slaves > to the master device. > > Patch 2 replaces a cumbersome manual MAC address comparison with > compare_ether_addr. > > Patch 3 removes a useless test against INT_MAX > > Patch 4 modifies bond_check_dev_link to handle devices that leave > carrier up even when adminstratively down. > > Due to lab machine adventures on my end, I was only able to compile > test patches 2 - 4. > > Please apply for net-next-2.6. All looks good, applied, thanks! ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-08-29 6:01 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-08-28 22:05 [PATCH REPOST net-next-2.6 0/4] bonding: Four patches Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next 1/4] bonding: propogate vlan_features to bonding master Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 2/4] bonding: use compare_ether_addr Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX Jay Vosburgh 2009-08-28 22:05 ` [PATCH REPOST net-next-2.6 4/4] bonding: Have bond_check_dev_link examine netif_running Jay Vosburgh 2009-08-28 22:49 ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX David Miller 2009-08-28 23:18 ` Jay Vosburgh 2009-08-28 23:22 ` David Miller 2009-08-29 6:02 ` [PATCH REPOST net-next-2.6 0/4] bonding: Four patches David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).