* Re: [PATCH 2/7][BNX2]: Refine tx coalescing setup.
From: David Miller @ 2008-01-30 5:34 UTC (permalink / raw)
To: mchan; +Cc: netdev
In-Reply-To: <1201652349.19087.11.camel@dell>
From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 16:19:09 -0800
> [BNX2]: Refine tx coalescing setup.
>
> Make the tx coalescing setup code independent of the MSIX vector.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/7][BNX2]: Fix 5706 serdes link down bug.
From: David Miller @ 2008-01-30 5:33 UTC (permalink / raw)
To: mchan; +Cc: netdev
In-Reply-To: <1201652325.19087.10.camel@dell>
From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 16:18:45 -0800
> [BNX2]: Fix 5706 serdes link down bug.
>
> 1. Correct the MII expansion serdes control register definition.
> 2. Check an additional RUDI_INVALID bit when determining 5706S link.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: pull request: wireless-2.6 'rndis' 2008-01-29
From: David Miller @ 2008-01-30 5:26 UTC (permalink / raw)
To: linville; +Cc: jeff, netdev, linux-wireless
In-Reply-To: <20080129212813.GB3180@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Tue, 29 Jan 2008 16:28:13 -0500
> Dave,
>
> RNDIS is a de facto standard from Microsoft for USB networking devices.
> We already have support for ethernet devices, but wireless devices exist
> as well. This series applies some fixes to the current ethernet RNDIS
> stuff to co-exist with wireless and adds a wireless RNDIS driver. I
> would like to see it in 2.6.25.
Pulled and pushed out to net-2.6, thanks John.
I'm going to review these bits a little bit (as well as the
other merge you just made) before pushing it all out to
Linus.
Thanks!
^ permalink raw reply
* net-2.6.25 is no more...
From: David Miller @ 2008-01-30 5:22 UTC (permalink / raw)
To: netdev
Now that the bulk has been merged over and we are
actively working alongside Linus's tree I have moved
all current patch applying to net-2.6 instead of net-2.6.25,
so the current tree to use is:
kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git
Thanks.
^ permalink raw reply
* Re: [PATCH 0/6] PS3: gelic: gelic updates for 2.6.25
From: Masakazu Mokuno @ 2008-01-30 5:21 UTC (permalink / raw)
To: Jeff Garzik
Cc: netdev, Linux/PPC Development, geoffrey.levand,
Geert Uytterhoeven
In-Reply-To: <20071213181146.BF69.MOKUNO@sm.sony.co.jp>
Hi Jeff,
The patch set I posted on Dec 13 2007 (except v2 of #6) have been
reviewed on the ML and seems to have no more outstanding
comments/requests.
http://marc.info/?l=linux-netdev&m=119754603814092
Is it OK to apply for 2.6.25? If OK, I'll ask Paul to merge this set
into the powerpc tree with my wireless patch because the dependent patch
set will go into the tree.
best regards
--
Masakazu MOKUNO
^ permalink raw reply
* Re: pull request: wireless-2.6 'upstream' 2008-01-29
From: David Miller @ 2008-01-30 5:21 UTC (permalink / raw)
To: linville-2XuSBdqkA4R54TAoqtyWWQ
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20080129212703.GA3180-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
From: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Date: Tue, 29 Jan 2008 16:27:03 -0500
> Here are some stragglers for 2.6.25. Most of them are fixes for the
> new stuff anyway -- I don't think there is anything convroversial.
>
> Please let me know if there are problems!
Pulled and pushed back out to net-2.6, thanks John.
^ permalink raw reply
* Re: [PATCH 6/7][BNX2]: Update firmware.
From: David Miller @ 2008-01-30 5:16 UTC (permalink / raw)
To: mchan; +Cc: max, netdev
In-Reply-To: <1201660196.19087.29.camel@dell>
From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 29 Jan 2008 18:29:56 -0800
> Didn't we beat this topic to death last time?
Yes we did.
> Once again, the driver is tightly coupled with the firmware. We don't
> want things to break when users upgrade or downgrade the kernel. Coding
> the driver to deal with different firmware versions will add a lot of
> complexity.
I absolutely agree with Michael here.
^ permalink raw reply
* Re: [PATCH retry] bluetooth : add conn add/del workqueues to avoid connection fail
From: David Miller @ 2008-01-30 5:14 UTC (permalink / raw)
To: hidave.darkstar; +Cc: netdev, marcel, linux-kernel, bluez-devel
In-Reply-To: <20080130022354.GA3132@darkstar.te-china.tietoenator.com>
From: Dave Young <hidave.darkstar@gmail.com>
Date: Wed, 30 Jan 2008 10:23:54 +0800
>
> The bluetooth hci_conn sysfs add/del executed in the default workqueue.
> If the del_conn is executed after the new add_conn with same target,
> add_conn will failed with warning of "same kobject name".
>
> Here add btaddconn & btdelconn workqueues,
> flush the btdelconn workqueue in the add_conn function to avoid the issue.
>
> Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
This looks good, applied, thanks Dave.
I've queued this up for 2.6.25 merging, if you want me to
schedule it for -stable, just let me know.
Thanks again.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply
* Re: ipcomp regression in 2.6.24
From: David Miller @ 2008-01-30 5:12 UTC (permalink / raw)
To: herbert; +Cc: pupilla, Daniel.Beschorner, netdev
In-Reply-To: <E1JK3QD-0006hM-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 30 Jan 2008 14:15:33 +1100
> Marco Berizzi <pupilla@hotmail.com> wrote:
> >
> >> > With 2.6.24 IPSEC/ESP tunnels to older kernels establish fine, data
> >> > flows in both directions, but no data comes out of the tunnel.
> >> > Needed to disable ipcomp.
> >
> > Same problem here: linux 2.6.24 driven by openswan 2.4.11
> > on Slackware 11.0
>
> My bad. This patch should fix it.
>
> [IPCOMP]: Fetch nexthdr before ipch is destroyed
>
> When I moved the nexthdr setting out of IPComp I accidently moved
> the reading of ipch->nexthdr after the decompression. Unfortunately
> this means that we'd be reading from a stale ipch pointer which
> doesn't work very well.
>
> This patch moves the reading up so that we get the correct nexthdr
> value.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied, and queued for -stable, thanks!
^ permalink raw reply
* Re: [BUILD FAILURE]2.6.24-git6 build failure on sis190 ethernet driver
From: Gabriel C @ 2008-01-30 4:43 UTC (permalink / raw)
To: Kamalesh Babulal; +Cc: LKML, netdev, romieu, Andy Whitcroft
In-Reply-To: <479FF1F0.10907@linux.vnet.ibm.com>
Kamalesh Babulal wrote:
> Hi,
>
> The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure
>
> drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict
> make[2]: *** [drivers/net/sis190.o] Error 1
>
> # gcc --version (machine1)
> gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
>
> # gcc --version (machine2)
> gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
>
Heh :) vger.kernel.org does not like emails directly from gmail , it seems =)
( sorry for sending this 3 time now )
The following patch should fix the build failure.
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index b570402..e48e4ad 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -326,7 +326,7 @@ static const struct {
{ "SiS 191 PCI Gigabit Ethernet adapter" },
};
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static const struct pci_device_id sis190_pci_tbl[] __devinitdata = {
{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
{ 0, },
Gabriel
^ permalink raw reply related
* [BUILD FAILURE]2.6.24-git6 build failure on sis190 ethernet driver
From: Kamalesh Babulal @ 2008-01-30 3:41 UTC (permalink / raw)
To: LKML, netdev, romieu, Andy Whitcroft
Hi,
The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure
drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict
make[2]: *** [drivers/net/sis190.o] Error 1
# gcc --version (machine1)
gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
# gcc --version (machine2)
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
--
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.
^ permalink raw reply
* Re: sis190 build breakage
From: Sam Ravnborg @ 2008-01-30 3:28 UTC (permalink / raw)
To: Francois Romieu; +Cc: maximilian attems, netdev
In-Reply-To: <20080129220310.GC15445@electric-eye.fr.zoreil.com>
On Tue, Jan 29, 2008 at 11:03:10PM +0100, Francois Romieu wrote:
> maximilian attems <max@stro.at> :
> > CC [M] drivers/net/sis190.o
> > drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict
> > make[5]: *** [drivers/net/sis190.o] Error 1
> >
> > gcc --version
> > gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Looks like a bug where __initdata has been used
for const data.
Searching:
static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
struct net_device *dev)
{
static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
struct sis190_private *tp = netdev_priv(dev);
struct pci_dev *isa_bridge;
u8 reg, tmp8;
Try to change this is __initconst and it should be fixed.
Sam
^ permalink raw reply
* Re: ipcomp regression in 2.6.24
From: Herbert Xu @ 2008-01-30 3:15 UTC (permalink / raw)
To: davem, Marco Berizzi; +Cc: Daniel.Beschorner, netdev
In-Reply-To: <BAY103-DAV76D55A34FB3E0924FF49AB2350@phx.gbl>
Marco Berizzi <pupilla@hotmail.com> wrote:
>
>> > With 2.6.24 IPSEC/ESP tunnels to older kernels establish fine, data
>> > flows in both directions, but no data comes out of the tunnel.
>> > Needed to disable ipcomp.
>
> Same problem here: linux 2.6.24 driven by openswan 2.4.11
> on Slackware 11.0
My bad. This patch should fix it.
[IPCOMP]: Fetch nexthdr before ipch is destroyed
When I moved the nexthdr setting out of IPComp I accidently moved
the reading of ipch->nexthdr after the decompression. Unfortunately
this means that we'd be reading from a stale ipch pointer which
doesn't work very well.
This patch moves the reading up so that we get the correct nexthdr
value.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index f4af99a..b79cdbe 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -74,6 +74,7 @@ out:
static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb)
{
+ int nexthdr;
int err = -ENOMEM;
struct ip_comp_hdr *ipch;
@@ -84,13 +85,15 @@ static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb)
/* Remove ipcomp header and decompress original payload */
ipch = (void *)skb->data;
+ nexthdr = ipch->nexthdr;
+
skb->transport_header = skb->network_header + sizeof(*ipch);
__skb_pull(skb, sizeof(*ipch));
err = ipcomp_decompress(x, skb);
if (err)
goto out;
- err = ipch->nexthdr;
+ err = nexthdr;
out:
return err;
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index b276d04..710325e 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -64,6 +64,7 @@ static LIST_HEAD(ipcomp6_tfms_list);
static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
{
+ int nexthdr;
int err = -ENOMEM;
struct ip_comp_hdr *ipch;
int plen, dlen;
@@ -79,6 +80,8 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
/* Remove ipcomp header and decompress original payload */
ipch = (void *)skb->data;
+ nexthdr = ipch->nexthdr;
+
skb->transport_header = skb->network_header + sizeof(*ipch);
__skb_pull(skb, sizeof(*ipch));
@@ -108,7 +111,7 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
skb->truesize += dlen - plen;
__skb_put(skb, dlen - plen);
skb_copy_to_linear_data(skb, scratch, dlen);
- err = ipch->nexthdr;
+ err = nexthdr;
out_put_cpu:
put_cpu();
^ permalink raw reply related
* Re: [Bugme-new] [Bug 9825] New: GPF in kernel when /sbin/ss used for display DCCP sockets.
From: Herbert Xu @ 2008-01-30 2:46 UTC (permalink / raw)
To: Andrew Morton; +Cc: netdev, bugme-daemon, spike
In-Reply-To: <20080126223330.204e1bd1.akpm@linux-foundation.org>
Andrew Morton <akpm@linux-foundation.org> wrote:
>
>> Jan 26 23:38:03 host general protection fault: 0000 [#1] PREEMPT
>> Jan 26 23:38:03 host Modules linked in: iptable_mangle iptable_nat nf_nat
>> ipt_REJECT xt_tcpudp nf_conntrack_ipv4 xt_state ipt_ULOG iptable_filter
>> ip_tables x_
>> Jan 26 23:38:03 host
>> Jan 26 23:38:03 host Pid: 5573, comm: ss Not tainted (2.6.24 #1)
>> Jan 26 23:38:03 host EIP: 0060:[<c031a14f>] EFLAGS: 00010282 CPU: 0
>> Jan 26 23:38:03 host EIP is at inet_diag_dump+0x2a/0x88b
This should be fixed by
[PATCH][INET_DIAG]: Fix inet_diag_lock_handler error path
20080128022050.GQ27661@ghostprotocols.net
that Arnaldo posted recently.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* [PATCH retry] bluetooth : add conn add/del workqueues to avoid connection fail
From: Dave Young @ 2008-01-30 2:23 UTC (permalink / raw)
To: marcel; +Cc: netdev, davem, bluez-devel, linux-kernel
The bluetooth hci_conn sysfs add/del executed in the default workqueue.
If the del_conn is executed after the new add_conn with same target,
add_conn will failed with warning of "same kobject name".
Here add btaddconn & btdelconn workqueues,
flush the btdelconn workqueue in the add_conn function to avoid the issue.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
diff -upr a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
--- a/net/bluetooth/hci_sysfs.c 2008-01-30 10:14:27.000000000 +0800
+++ b/net/bluetooth/hci_sysfs.c 2008-01-30 10:14:14.000000000 +0800
@@ -12,6 +12,8 @@
#undef BT_DBG
#define BT_DBG(D...)
#endif
+static struct workqueue_struct *btaddconn;
+static struct workqueue_struct *btdelconn;
static inline char *typetostr(int type)
{
@@ -279,6 +281,7 @@ static void add_conn(struct work_struct
struct hci_conn *conn = container_of(work, struct hci_conn, work);
int i;
+ flush_workqueue(btdelconn);
if (device_add(&conn->dev) < 0) {
BT_ERR("Failed to register connection device");
return;
@@ -313,6 +316,7 @@ void hci_conn_add_sysfs(struct hci_conn
INIT_WORK(&conn->work, add_conn);
+ queue_work(btaddconn, &conn->work);
schedule_work(&conn->work);
}
@@ -349,6 +353,7 @@ void hci_conn_del_sysfs(struct hci_conn
INIT_WORK(&conn->work, del_conn);
+ queue_work(btdelconn, &conn->work);
schedule_work(&conn->work);
}
@@ -398,31 +403,52 @@ int __init bt_sysfs_init(void)
{
int err;
+ btaddconn = create_singlethread_workqueue("btaddconn");
+ if (!btaddconn) {
+ err = -ENOMEM;
+ goto out;
+ }
+ btdelconn = create_singlethread_workqueue("btdelconn");
+ if (!btdelconn) {
+ err = -ENOMEM;
+ goto out_del;
+ }
+
bt_platform = platform_device_register_simple("bluetooth", -1, NULL, 0);
- if (IS_ERR(bt_platform))
- return PTR_ERR(bt_platform);
+ if (IS_ERR(bt_platform)) {
+ err = PTR_ERR(bt_platform);
+ goto out_platform;
+ }
err = bus_register(&bt_bus);
- if (err < 0) {
- platform_device_unregister(bt_platform);
- return err;
- }
+ if (err < 0)
+ goto out_bus;
bt_class = class_create(THIS_MODULE, "bluetooth");
if (IS_ERR(bt_class)) {
- bus_unregister(&bt_bus);
- platform_device_unregister(bt_platform);
- return PTR_ERR(bt_class);
+ err = PTR_ERR(bt_class);
+ goto out_class;
}
return 0;
+
+out_class:
+ bus_unregister(&bt_bus);
+out_bus:
+ platform_device_unregister(bt_platform);
+out_platform:
+ destroy_workqueue(btdelconn);
+out_del:
+ destroy_workqueue(btaddconn);
+out:
+ return err;
}
void bt_sysfs_cleanup(void)
{
+ destroy_workqueue(btaddconn);
+ destroy_workqueue(btdelconn);
class_destroy(bt_class);
-
bus_unregister(&bt_bus);
-
platform_device_unregister(bt_platform);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply
* [PATCH 7/7] bonding: update MAINTAINERS
From: Jay Vosburgh @ 2008-01-30 2:07 UTC (permalink / raw)
To: netdev; +Cc: Jeff Garzik, Jay Vosburgh
In-Reply-To: <12016588733235-git-send-email-fubar@us.ibm.com>
Remove Chad Tindel; he hasn't been involved for a number
of years.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
MAINTAINERS | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 2340cfb..4b7fa32 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -930,8 +930,6 @@ M: maxk@qualcomm.com
S: Maintained
BONDING DRIVER
-P: Chad Tindel
-M: ctindel@users.sourceforge.net
P: Jay Vosburgh
M: fubar@us.ibm.com
L: bonding-devel@lists.sourceforge.net
--
1.5.3.4.206.g58ba4-dirty
^ permalink raw reply related
* [PATCH 6/7] bonding: update version
From: Jay Vosburgh @ 2008-01-30 2:07 UTC (permalink / raw)
To: netdev; +Cc: Jeff Garzik, Jay Vosburgh
In-Reply-To: <12016588733343-git-send-email-fubar@us.ibm.com>
Update bonding to version 3.2.4.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bonding.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 6d83be4..67ccad6 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -22,8 +22,8 @@
#include "bond_3ad.h"
#include "bond_alb.h"
-#define DRV_VERSION "3.2.3"
-#define DRV_RELDATE "December 6, 2007"
+#define DRV_VERSION "3.2.4"
+#define DRV_RELDATE "January 28, 2008"
#define DRV_NAME "bonding"
#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"
--
1.5.3.4.206.g58ba4-dirty
^ permalink raw reply related
* [PATCH 5/7] bonding: do not acquire rtnl in ARP monitor
From: Jay Vosburgh @ 2008-01-30 2:07 UTC (permalink / raw)
To: netdev; +Cc: Jeff Garzik, Jay Vosburgh
In-Reply-To: <1201658872418-git-send-email-fubar@us.ibm.com>
The ARP monitor functions currently acquire RTNL when performing
failover operations, but do so incorrectly (out of order). This causes
various warnings from might_sleep.
The ARP monitor isn't supported for any of the bonding modes
that actually require RTNL, so it is safe to not hold RTNL when
failing over in the ARP monitor.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_main.c | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 0cc853e..b532125 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2801,14 +2801,11 @@ void bond_loadbalance_arp_mon(struct work_struct *work)
}
if (do_failover) {
- rtnl_lock();
write_lock_bh(&bond->curr_slave_lock);
bond_select_active_slave(bond);
write_unlock_bh(&bond->curr_slave_lock);
- rtnl_unlock();
-
}
re_arm:
@@ -2865,8 +2862,6 @@ void bond_activebackup_arp_mon(struct work_struct *work)
slave->link = BOND_LINK_UP;
- rtnl_lock();
-
write_lock_bh(&bond->curr_slave_lock);
if ((!bond->curr_active_slave) &&
@@ -2902,7 +2897,6 @@ void bond_activebackup_arp_mon(struct work_struct *work)
}
write_unlock_bh(&bond->curr_slave_lock);
- rtnl_unlock();
}
} else {
read_lock(&bond->curr_slave_lock);
@@ -2972,7 +2966,6 @@ void bond_activebackup_arp_mon(struct work_struct *work)
bond->dev->name,
slave->dev->name);
- rtnl_lock();
write_lock_bh(&bond->curr_slave_lock);
bond_select_active_slave(bond);
@@ -2980,8 +2973,6 @@ void bond_activebackup_arp_mon(struct work_struct *work)
write_unlock_bh(&bond->curr_slave_lock);
- rtnl_unlock();
-
bond->current_arp_slave = slave;
if (slave) {
@@ -2999,13 +2990,10 @@ void bond_activebackup_arp_mon(struct work_struct *work)
bond->primary_slave->dev->name);
/* primary is up so switch to it */
- rtnl_lock();
write_lock_bh(&bond->curr_slave_lock);
bond_change_active_slave(bond, bond->primary_slave);
write_unlock_bh(&bond->curr_slave_lock);
- rtnl_unlock();
-
slave = bond->primary_slave;
slave->jiffies = jiffies;
} else {
--
1.5.3.4.206.g58ba4-dirty
^ permalink raw reply related
* [PATCH 4/7] bonding: fix race that causes invalid statistics
From: Jay Vosburgh @ 2008-01-30 2:07 UTC (permalink / raw)
To: netdev; +Cc: Jeff Garzik, Andy Gospodarek, Chris Snook
In-Reply-To: <12016588712034-git-send-email-fubar@us.ibm.com>
From: Andy Gospodarek <andy@greyhouse.net>
I've seen reports of invalid stats in /proc/net/dev for bonding
interfaces, and found it's a pretty easy problem to reproduce. Since
the current code zeros the bonding stats when a read is requested and a
pointer to that data is returned to the caller we cannot guarantee that
the caller has completely accessed the data before a successive call to
request the stats zeroes the stats again.
This patch creates a new stack variable to keep track of the updated
stats and copies the data from that variable into the bonding stats
structure. This ensures that the value for any of the bonding stats
should not incorrectly return zero for any of the bonding statistics.
This does use more stack space and require an extra memcpy, but it seems
like a fair trade-off for consistently correct bonding statistics.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Chris Snook <csnook@redhat.com>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_main.c | 57 ++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 27 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 63866da..0cc853e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3775,41 +3775,44 @@ static struct net_device_stats *bond_get_stats(struct net_device *bond_dev)
{
struct bonding *bond = bond_dev->priv;
struct net_device_stats *stats = &(bond->stats), *sstats;
+ struct net_device_stats local_stats;
struct slave *slave;
int i;
- memset(stats, 0, sizeof(struct net_device_stats));
+ memset(&local_stats, 0, sizeof(struct net_device_stats));
read_lock_bh(&bond->lock);
bond_for_each_slave(bond, slave, i) {
sstats = slave->dev->get_stats(slave->dev);
- stats->rx_packets += sstats->rx_packets;
- stats->rx_bytes += sstats->rx_bytes;
- stats->rx_errors += sstats->rx_errors;
- stats->rx_dropped += sstats->rx_dropped;
-
- stats->tx_packets += sstats->tx_packets;
- stats->tx_bytes += sstats->tx_bytes;
- stats->tx_errors += sstats->tx_errors;
- stats->tx_dropped += sstats->tx_dropped;
-
- stats->multicast += sstats->multicast;
- stats->collisions += sstats->collisions;
-
- stats->rx_length_errors += sstats->rx_length_errors;
- stats->rx_over_errors += sstats->rx_over_errors;
- stats->rx_crc_errors += sstats->rx_crc_errors;
- stats->rx_frame_errors += sstats->rx_frame_errors;
- stats->rx_fifo_errors += sstats->rx_fifo_errors;
- stats->rx_missed_errors += sstats->rx_missed_errors;
-
- stats->tx_aborted_errors += sstats->tx_aborted_errors;
- stats->tx_carrier_errors += sstats->tx_carrier_errors;
- stats->tx_fifo_errors += sstats->tx_fifo_errors;
- stats->tx_heartbeat_errors += sstats->tx_heartbeat_errors;
- stats->tx_window_errors += sstats->tx_window_errors;
- }
+ local_stats.rx_packets += sstats->rx_packets;
+ local_stats.rx_bytes += sstats->rx_bytes;
+ local_stats.rx_errors += sstats->rx_errors;
+ local_stats.rx_dropped += sstats->rx_dropped;
+
+ local_stats.tx_packets += sstats->tx_packets;
+ local_stats.tx_bytes += sstats->tx_bytes;
+ local_stats.tx_errors += sstats->tx_errors;
+ local_stats.tx_dropped += sstats->tx_dropped;
+
+ local_stats.multicast += sstats->multicast;
+ local_stats.collisions += sstats->collisions;
+
+ local_stats.rx_length_errors += sstats->rx_length_errors;
+ local_stats.rx_over_errors += sstats->rx_over_errors;
+ local_stats.rx_crc_errors += sstats->rx_crc_errors;
+ local_stats.rx_frame_errors += sstats->rx_frame_errors;
+ local_stats.rx_fifo_errors += sstats->rx_fifo_errors;
+ local_stats.rx_missed_errors += sstats->rx_missed_errors;
+
+ local_stats.tx_aborted_errors += sstats->tx_aborted_errors;
+ local_stats.tx_carrier_errors += sstats->tx_carrier_errors;
+ local_stats.tx_fifo_errors += sstats->tx_fifo_errors;
+ local_stats.tx_heartbeat_errors += sstats->tx_heartbeat_errors;
+ local_stats.tx_window_errors += sstats->tx_window_errors;
+ }
+
+ memcpy(stats, &local_stats, sizeof(struct net_device_stats));
read_unlock_bh(&bond->lock);
--
1.5.3.4.206.g58ba4-dirty
^ permalink raw reply related
* [PATCH 3/7] bonding: fix NULL pointer deref in startup processing
From: Jay Vosburgh @ 2008-01-30 2:07 UTC (permalink / raw)
To: netdev; +Cc: Jeff Garzik, Jay Vosburgh
In-Reply-To: <12016588714065-git-send-email-fubar@us.ibm.com>
Fix the "are we creating a duplicate" check to not compare
the name if the name is NULL (meaning that the system should select
a name). Bug reported by Benny Amorsen <benny+usenet@amorsen.dk>.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_main.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 591b8b4..63866da 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4896,14 +4896,16 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond
down_write(&bonding_rwsem);
/* Check to see if the bond already exists. */
- list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list)
- if (strnicmp(bond->dev->name, name, IFNAMSIZ) == 0) {
- printk(KERN_ERR DRV_NAME
+ if (name) {
+ list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list)
+ if (strnicmp(bond->dev->name, name, IFNAMSIZ) == 0) {
+ printk(KERN_ERR DRV_NAME
": cannot add bond %s; it already exists\n",
- name);
- res = -EPERM;
- goto out_rtnl;
- }
+ name);
+ res = -EPERM;
+ goto out_rtnl;
+ }
+ }
bond_dev = alloc_netdev(sizeof(struct bonding), name ? name : "",
ether_setup);
--
1.5.3.4.206.g58ba4-dirty
^ permalink raw reply related
* [PATCH 2/7] bonding: fix set_multicast_list locking
From: Jay Vosburgh @ 2008-01-30 2:07 UTC (permalink / raw)
To: netdev; +Cc: Jeff Garzik, Jay Vosburgh
In-Reply-To: <12016588701127-git-send-email-fubar@us.ibm.com>
This patch eliminates a problem (reported by lockdep) in the
bond_set_multicast_list function. It first reduces the locking on
bond->lock to a simple read_lock, and second, adds netif_tx locking
around the bonding mc_list manipulations that occur outside of the
set_multicast_list function.
The original problem was related to IPv6 addrconf activity.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_main.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index f3b1e02..591b8b4 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1464,10 +1464,12 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
dev_set_allmulti(slave_dev, 1);
}
+ netif_tx_lock_bh(bond_dev);
/* upload master's mc_list to new slave */
for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) {
dev_mc_add (slave_dev, dmi->dmi_addr, dmi->dmi_addrlen, 0);
}
+ netif_tx_unlock_bh(bond_dev);
}
if (bond->params.mode == BOND_MODE_8023AD) {
@@ -1821,7 +1823,9 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
}
/* flush master's mc_list from slave */
+ netif_tx_lock_bh(bond_dev);
bond_mc_list_flush(bond_dev, slave_dev);
+ netif_tx_unlock_bh(bond_dev);
}
netdev_set_master(slave_dev, NULL);
@@ -1942,7 +1946,9 @@ static int bond_release_all(struct net_device *bond_dev)
}
/* flush master's mc_list from slave */
+ netif_tx_lock_bh(bond_dev);
bond_mc_list_flush(bond_dev, slave_dev);
+ netif_tx_unlock_bh(bond_dev);
}
netdev_set_master(slave_dev, NULL);
@@ -3937,8 +3943,6 @@ static void bond_set_multicast_list(struct net_device *bond_dev)
struct bonding *bond = bond_dev->priv;
struct dev_mc_list *dmi;
- write_lock_bh(&bond->lock);
-
/*
* Do promisc before checking multicast_mode
*/
@@ -3959,6 +3963,8 @@ static void bond_set_multicast_list(struct net_device *bond_dev)
bond_set_allmulti(bond, -1);
}
+ read_lock(&bond->lock);
+
bond->flags = bond_dev->flags;
/* looking for addresses to add to slaves' mc list */
@@ -3979,7 +3985,7 @@ static void bond_set_multicast_list(struct net_device *bond_dev)
bond_mc_list_destroy(bond);
bond_mc_list_copy(bond_dev->mc_list, bond, GFP_ATOMIC);
- write_unlock_bh(&bond->lock);
+ read_unlock(&bond->lock);
}
/*
@@ -4526,7 +4532,9 @@ static void bond_free_all(void)
struct net_device *bond_dev = bond->dev;
bond_work_cancel_all(bond);
+ netif_tx_lock_bh(bond_dev);
bond_mc_list_destroy(bond);
+ netif_tx_unlock_bh(bond_dev);
/* Release the bonded slaves */
bond_release_all(bond_dev);
bond_deinit(bond_dev);
--
1.5.3.4.206.g58ba4-dirty
^ permalink raw reply related
* [PATCH 1/7] bonding: fix parameter parsing
From: Jay Vosburgh @ 2008-01-30 2:07 UTC (permalink / raw)
To: netdev; +Cc: Jeff Garzik, Jay Vosburgh
In-Reply-To: <12016588691476-git-send-email-fubar@us.ibm.com>
My last fix (commit ece95f7fefe3afae19e641e1b3f5e64b00d5b948)
didn't handle one case correctly. This resolves that, and it will now
correctly parse parameters with arbitrary white space, and either text
names or mode values.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
drivers/net/bonding/bond_main.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 49a1982..f3b1e02 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4549,14 +4549,19 @@ static void bond_free_all(void)
int bond_parse_parm(const char *buf, struct bond_parm_tbl *tbl)
{
int mode = -1, i, rv;
- char modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, };
+ char *p, modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, };
- rv = sscanf(buf, "%d", &mode);
- if (!rv) {
+ for (p = (char *)buf; *p; p++)
+ if (!(isdigit(*p) || isspace(*p)))
+ break;
+
+ if (*p)
rv = sscanf(buf, "%20s", modestr);
- if (!rv)
- return -1;
- }
+ else
+ rv = sscanf(buf, "%d", &mode);
+
+ if (!rv)
+ return -1;
for (i = 0; tbl[i].modename; i++) {
if (mode == tbl[i].mode)
--
1.5.3.4.206.g58ba4-dirty
^ permalink raw reply related
* [PATCH 0/7] bonding: miscellaneous fixes
From: Jay Vosburgh @ 2008-01-30 2:07 UTC (permalink / raw)
To: netdev; +Cc: Jeff Garzik
Following are 7 bonding related patches:
patch 1: Revamp parameter parsing again to handle all cases (missed
an edge case last time).
patch 2: fix set_multicast_list locking issues
patch 3: Fix possible NULL pointer deref at module init time
patch 4: Fix race that causes invalid statistics
patch 5: Don't acquire rtnl in ARP monitor; it's not needed
patch 6: update version
patch 7: update MAINTAINERS
Patches are against the current netdev-2.6#upstream branch.
Please apply.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* Re: [PATCH 6/7][BNX2]: Update firmware.
From: Michael Chan @ 2008-01-30 2:29 UTC (permalink / raw)
To: maximilian attems; +Cc: David Miller, netdev
In-Reply-To: <20080129234615.GB25253@stro.at>
On Wed, 2008-01-30 at 00:46 +0100, maximilian attems wrote:
> happily omitted diffstat:
> drivers/net/bnx2_fw.h | 1499 +++++++++++++++++++--------------------
> drivers/net/bnx2_fw2.h | 464 ++++++------
> 2 files changed, 982 insertions(+), 981 deletions(-)
>
>
> when can bnx2 grow up to proper request_firmware() usage?
>
Didn't we beat this topic to death last time?
Once again, the driver is tightly coupled with the firmware. We don't
want things to break when users upgrade or downgrade the kernel. Coding
the driver to deal with different firmware versions will add a lot of
complexity.
^ permalink raw reply
* Good medication solutions directly from manufacturer tally
From: ask @ 2008-01-30 0:34 UTC (permalink / raw)
To: netdev
Girls actually use to laugh at me!
your online shop. medbestequal | com
secure ordering, very fast chipping
dismissal plywood
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox